junnaisystems/Zoho-CRM-MCP
If you are the rightful owner of Zoho-CRM-MCP and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
A comprehensive Model Context Protocol (MCP) server for seamless integration with Zoho CRM, enabling AI assistants to interact with Zoho CRM data securely.
Zoho CRM MCP Server
š Built by JunnAI - Empowering AI-driven business automation
A comprehensive Model Context Protocol (MCP) server for seamless integration with Zoho CRM. This server enables AI assistants like Claude to interact with your Zoho CRM data through a secure, OAuth-based authentication system.
Free & Open Source - Built with ā¤ļø by the team at JunnAI
⨠Features
- š Secure OAuth Authentication - Full OAuth 2.0 flow with automatic token refresh
- š Complete CRM Operations - Create, read, update, delete records across all modules
- š Advanced Search - Powerful search and filtering capabilities
- š Analytics Support - Access to user information and organization data
- š Bulk Operations - Efficiently handle multiple records at once
- šÆ Lead Conversion - Convert leads to accounts, contacts, and deals
- š± Relationship Management - Access related records across modules
- ā” Real-time Token Management - Automatic token refresh and error handling
- š Comprehensive Logging - Detailed logging for debugging and monitoring
š Quick Start
Prerequisites
- Python 3.9 or higher
- Zoho CRM account with API access
- Claude Pro subscription (for AI integration)
1. Installation
Option A: Using pip (Recommended)
pip install -r requirements.txt
Option B: Using uv (Alternative)
# Install uv (if not already installed)
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
# Create virtual environment and install dependencies
uv venv
uv pip install -r requirements.txt
2. Zoho CRM Setup
Create a Zoho CRM Application
- Go to Zoho Developer Console
- Click "Add Client"
- Choose "Server-based Applications"
- Fill in the details:
- Client Name: Your application name
- Homepage URL: Your website URL
- Authorized Redirect URIs:
http://localhost:8080/callback
- Click "Create"
- Note down your Client ID and Client Secret
Configure API Scopes
Make sure your application has the following scopes:
ZohoCRM.modules.ALL
ZohoCRM.settings.ALL
ZohoCRM.users.ALL
3. Configuration
- Copy the environment template:
cp .env.example .env
- Edit
.env
with your Zoho credentials:
# Zoho OAuth Configuration
ZOHO_CLIENT_ID=your_client_id_here
ZOHO_CLIENT_SECRET=your_client_secret_here
ZOHO_REDIRECT_URI=http://localhost:8080/callback
ZOHO_SCOPE=ZohoCRM.modules.ALL,ZohoCRM.settings.ALL,ZohoCRM.users.ALL
# Optional: Customize other settings
# ZOHO_API_DOMAIN=https://www.zohoapis.com
# ZOHO_ACCOUNTS_DOMAIN=https://accounts.zoho.com
# LOG_LEVEL=INFO
4. Using with AI Assistants
This MCP server is designed to work with AI assistants that support the Model Context Protocol (MCP).
For Warp Terminal Users:
Tell your AI assistant:
I have a Zoho CRM MCP server ready to use. Here are the details:
Path to MCP Server: /path/to/your/zoho-crm-mcp/src/server.py
Please use this MCP server to help me work with my Zoho CRM data.
Start by running authenticate_zoho() to connect to my Zoho CRM account.
For Claude Desktop Users:
Add this to your Claude Desktop MCP configuration:
{
"mcpServers": {
"zoho-crm": {
"command": "python",
"args": ["/path/to/your/zoho-crm-mcp/src/server.py"],
"env": {
"ZOHO_CLIENT_ID": "your_client_id_here",
"ZOHO_CLIENT_SECRET": "your_client_secret_here"
}
}
}
}
First-Time Setup:
On first use, the server will:
- Open your web browser for Zoho authentication
- Redirect you to Zoho's login page
- After successful login, redirect back to the server
- Store authentication tokens securely for future use
5. Quick Reference - Available Tools
Once connected, your AI assistant can use these tools:
⢠authenticate_zoho() - Authenticate with Zoho CRM (opens browser)
⢠get_modules() - Get all available CRM modules
⢠get_records(module_name, page, per_page) - Get records from modules
⢠search_records(module_name, criteria) - Search for specific records
⢠create_record(module_name, record_data) - Create new records
⢠update_record(module_name, record_id, record_data) - Update existing records
⢠get_record_by_id(module_name, record_id) - Get specific record by ID
⢠convert_lead(lead_id, convert_data) - Convert leads to accounts/contacts/deals
⢠get_organization_info() - Get organization details
⢠get_users() - Get CRM users information
⢠bulk_create_records(module_name, records_data) - Create multiple records
⢠get_related_records(module_name, record_id, related_module) - Get related records
⢠get_record_count(module_name, criteria) - Get record counts
š Available Tools
Authentication Tools
authenticate_zoho()
- Authenticate with Zoho CRM (handles OAuth flow)revoke_authentication()
- Revoke stored authentication tokens
Module & Metadata Tools
get_modules()
- Get all available CRM modulesget_module_fields(module_name)
- Get field information for a specific module
Record Management Tools
get_records(module_name, page, per_page, sort_order, sort_by)
- Get records from a moduleget_record_by_id(module_name, record_id)
- Get a specific record by IDsearch_records(module_name, criteria, page, per_page)
- Search records using criteriacreate_record(module_name, record_data, trigger_workflow)
- Create a new recordupdate_record(module_name, record_id, record_data, trigger_workflow)
- Update an existing recorddelete_record(module_name, record_id)
- Delete a recordbulk_create_records(module_name, records_data, trigger_workflow)
- Create multiple records
Relationship Tools
get_related_records(module_name, record_id, related_module, page, per_page)
- Get related records
Analytics & Info Tools
get_organization_info()
- Get organization informationget_users(type_filter)
- Get CRM users informationget_record_count(module_name, criteria)
- Get record count with optional filtering
Utility Tools
convert_lead(lead_id, convert_data)
- Convert leads to accounts, contacts, and deals
š” Usage Examples
Example 1: Get All Leads
# This will be called by the AI assistant
result = get_records("Leads", page=1, per_page=50)
print(f"Found {result['count']} leads")
Example 2: Search for Contacts
# Search for contacts with specific email
result = search_records("Contacts", "(Email:equals:john@example.com)")
Example 3: Create a New Lead
lead_data = {
"First_Name": "John",
"Last_Name": "Doe",
"Email": "john.doe@example.com",
"Company": "Example Corp",
"Phone": "+1234567890"
}
result = create_record("Leads", lead_data)
Example 4: Convert a Lead
convert_data = {
"overwrite": False,
"notify_lead_owner": True,
"notify_new_entity_owner": True,
"Accounts": {
"Account_Name": "Example Corp"
},
"Deals": {
"Deal_Name": "New Business Opportunity",
"Amount": 50000
}
}
result = convert_lead("lead_id_here", convert_data)
š§ Configuration Options
Environment Variables
Variable | Default | Description |
---|---|---|
ZOHO_CLIENT_ID | - | Required: Your Zoho app client ID |
ZOHO_CLIENT_SECRET | - | Required: Your Zoho app client secret |
ZOHO_REDIRECT_URI | http://localhost:8080/callback | OAuth redirect URI |
ZOHO_SCOPE | ZohoCRM.modules.ALL,ZohoCRM.settings.ALL,ZohoCRM.users.ALL | API permissions scope |
ZOHO_API_DOMAIN | https://www.zohoapis.com | Zoho API base URL |
ZOHO_ACCOUNTS_DOMAIN | https://accounts.zoho.com | Zoho accounts URL |
TOKEN_FILE_PATH | .zoho_tokens.json | Path to store OAuth tokens |
LOG_LEVEL | INFO | Logging level |
REQUEST_TIMEOUT | 30 | API request timeout in seconds |
RATE_LIMIT | 100 | Requests per minute limit |
š Security Features
- OAuth 2.0 Flow: Secure authentication without exposing passwords
- Token Auto-Refresh: Automatically refreshes expired tokens
- Secure Token Storage: Tokens stored locally and encrypted
- Rate Limiting: Built-in protection against API abuse
- Request Timeout: Prevents hanging requests
- Comprehensive Logging: Track all API interactions
š Troubleshooting
Common Issues
-
"Authentication failed"
- Check your
ZOHO_CLIENT_ID
andZOHO_CLIENT_SECRET
- Ensure redirect URI matches exactly:
http://localhost:8080/callback
- Verify your Zoho app has the required scopes
- Check your
-
"Token refresh failed"
- Delete
.zoho_tokens.json
and re-authenticate - Check if your Zoho app is still active
- Delete
-
"Module not found"
- Use
get_modules()
to see available modules - Check module name spelling (case-sensitive)
- Use
-
"Permission denied"
- Verify your user has access to the requested module
- Check if the module is enabled in your CRM
Debug Mode
Enable debug logging by setting:
LOG_LEVEL=DEBUG
This will show detailed API requests and responses.
š License
This project is licensed under the MIT License - see the file for details.
š¤ Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
š About JunnAI
JunnAI is a leading provider of AI-driven business automation solutions. We specialize in:
- š¤ AI Voice Agents - Intelligent conversational AI for customer service
- š CRM Integrations - Seamless connections between AI and business systems
- š Sales Automation - AI-powered lead generation and conversion
- āļø Custom AI Solutions - Tailored automation for your business needs
Why choose JunnAI?
- ā Proven expertise in AI and business automation
- ā Open-source contributions to the community
- ā Enterprise-grade solutions with dedicated support
- ā Cutting-edge technology stack
š Ready to transform your business with AI? ā”ļø Visit junnaisystem.com to learn more!
š Support
- š Website: junnaisystem.com
- š§ Email: jennifer@junnaisystem.com
- š Issues: Report bugs via GitHub Issues
- š Documentation: See this README and inline code documentation
- š¬ Contact: Get in touch
š¦ Status
- ā OAuth Authentication
- ā Core CRUD Operations
- ā Advanced Search
- ā Bulk Operations
- ā Lead Conversion
- ā Relationship Management
- ā Error Handling
- ā Token Management
- š Enhanced Analytics (planned)
- š Webhook Support (planned)
Made with ā¤ļø by JunnAI - Empowering AI-driven business automation
š Explore more AI solutions at junnaisystem.com