Zoho CRM MCP Server

Zoho CRM MCP Server

A Model Context Protocol server for integrating Zoho CRM with GenAI applications, enabling AI assistants to interact with CRM data through a standardized interface.

Category
访问服务器

README

Zoho CRM MCP Server

<!-- mcp-name: io.github.asklokesh/zoho-crm-mcp-server -->

<div align="center">

Zoho Crm Mcp Server

GitHub stars GitHub forks GitHub watchers

License Issues Pull Requests Last Commit

Python MCP

Commit Activity Code Size Contributors

</div>

A Model Context Protocol (MCP) server for integrating Zoho CRM with GenAI applications.

Overview

This MCP server provides seamless integration with Zoho CRM, enabling AI assistants and applications to interact with your CRM data through a standardized interface.

Features

  • 🔐 OAuth 2.0 Authentication - Secure authentication with automatic token refresh
  • 📊 Comprehensive CRM Operations - Full support for Leads, Contacts, Deals, and more
  • ⚡ Rate Limiting - Built-in rate limiting to respect API quotas
  • 🔄 Automatic Retry Logic - Intelligent retry mechanism with exponential backoff
  • 🛡️ Error Handling - Robust error handling and logging
  • 🎯 MCP Protocol Compliance - Full compliance with Model Context Protocol specification
  • 🚀 Async Support - Asynchronous operations for better performance

Available Tools

The server exposes the following MCP tools:

  1. get_leads - Retrieve leads from Zoho CRM with pagination
  2. create_lead - Create new leads in Zoho CRM
  3. get_contacts - Fetch contacts with pagination support
  4. get_deals - Get deals from Zoho CRM
  5. search_records - Search across any module with custom criteria

Installation

From PyPI (when published)

pip install zoho-crm-mcp-server

From Source

git clone https://github.com/asklokesh/zoho-crm-mcp-server.git
cd zoho-crm-mcp-server
pip install -e .

Development Installation

pip install -e ".[dev]"

Configuration

1. Set Up Zoho OAuth Credentials

  1. Go to Zoho API Console
  2. Create a new Self Client application
  3. Note your Client ID and Client Secret
  4. Generate a refresh token with required scopes:
    • ZohoCRM.modules.ALL
    • ZohoCRM.settings.ALL

2. Create Environment Configuration

Copy the example configuration:

cp .env.example .env

Edit .env with your credentials:

ZOHO_CLIENT_ID=your_client_id_here
ZOHO_CLIENT_SECRET=your_client_secret_here
ZOHO_REFRESH_TOKEN=your_refresh_token_here

# Optional configurations
ZOHO_API_DOMAIN=https://www.zohoapis.com
RATE_LIMIT_REQUESTS=100
RATE_LIMIT_PERIOD=60
MAX_RETRIES=3
LOG_LEVEL=INFO

Usage

As a Standalone Server

zoho-crm-mcp

In Python Code

from zoho_crm_mcp import ZohoCRMMCPServer
import asyncio

async def main():
    server = ZohoCRMMCPServer()
    await server.run()

if __name__ == "__main__":
    asyncio.run(main())

Using the Zoho CRM Client

from zoho_crm_mcp import ZohoCRMClient, Config
import asyncio

async def main():
    config = Config()
    client = ZohoCRMClient(config)
    
    await client.initialize()
    
    # Get leads
    leads = await client.get_leads(page=1, per_page=50)
    print(f"Found {len(leads['data'])} leads")
    
    # Create a new lead
    new_lead = await client.create_lead({
        "Last_Name": "Doe",
        "First_Name": "John",
        "Email": "john.doe@example.com",
        "Company": "Acme Corp"
    })
    
    # Search for records
    results = await client.search_records(
        "Leads",
        "(Email:equals:john.doe@example.com)"
    )
    
    await client.close()

if __name__ == "__main__":
    asyncio.run(main())

Development

Running Tests

pytest tests/ -v --cov=zoho_crm_mcp

Linting

ruff check src/ tests/
ruff format src/ tests/

Building

python -m build

CI/CD

This project includes GitHub Actions workflows for:

  • ✅ Automated testing across Python 3.8-3.12
  • 🔍 Code quality checks with Ruff
  • 📦 Package building and validation
  • 📊 Code coverage reporting

Architecture

zoho-crm-mcp-server/
├── src/zoho_crm_mcp/
│   ├── __init__.py       # Package initialization
│   ├── server.py         # MCP server implementation
│   ├── zoho_client.py    # Zoho CRM API client
│   └── config.py         # Configuration management
├── tests/                # Comprehensive test suite
├── .github/workflows/    # CI/CD pipelines
└── pyproject.toml        # Project configuration

Error Handling

The server includes comprehensive error handling:

  • Token Expiry: Automatic token refresh when tokens expire
  • Rate Limiting: Respects API rate limits with intelligent backoff
  • Network Errors: Automatic retry with exponential backoff
  • Validation Errors: Clear error messages for invalid configurations

Logging

The server uses Python's built-in logging module. Configure log level via environment variable:

export LOG_LEVEL=DEBUG  # Options: DEBUG, INFO, WARNING, ERROR, CRITICAL

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Troubleshooting

Common Issues

Issue: ModuleNotFoundError: No module named 'mcp' Solution: Install the MCP SDK: pip install mcp

Issue: Token refresh fails Solution: Verify your refresh token is valid and has the required scopes

Issue: Rate limit errors Solution: Adjust RATE_LIMIT_REQUESTS and RATE_LIMIT_PERIOD in your .env file

Requirements

  • Python 3.8+
  • requests >= 2.25.0
  • mcp >= 1.0.0
  • python-dotenv >= 0.19.0

License

MIT License - see LICENSE file for details

Support

For issues, questions, or contributions, please visit:

Acknowledgments


Made with ❤️ for the MCP community

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选