Zoho CRM MCP Server
Enables AI assistants to interact with Zoho CRM data through secure OAuth authentication, supporting comprehensive CRM operations including record management, search, bulk operations, and lead conversion.
README
Zoho CRM MCP Server
<div align="center">
🚀 Built by JunnAI - Empowering AI-driven business automation
</div>
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.ALLZohoCRM.settings.ALLZohoCRM.users.ALL
3. Configuration
- Copy the environment template:
cp .env.example .env
- Edit
.envwith 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_IDandZOHO_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.jsonand 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 LICENSE 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
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。