MCP server for Zoho CRM API integration
A Model Context Protocol (MCP) server for integrating Zoho CRM with GenAI applications.
This MCP server provides seamless integration with Zoho CRM, enabling AI assistants and applications to interact with your CRM data through a standardized interface.
The server exposes the following MCP tools:
pip install zoho-crm-mcp-servergit clone https://github.com/asklokesh/zoho-crm-mcp-server.git
cd zoho-crm-mcp-server
pip install -e .pip install -e ".[dev]"ZohoCRM.modules.ALLZohoCRM.settings.ALLCopy the example configuration:
cp .env.example .envEdit .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=INFOzoho-crm-mcpfrom zoho_crm_mcp import ZohoCRMMCPServer
import asyncio
async def main():
server = ZohoCRMMCPServer()
await server.run()
if __name__ == "__main__":
asyncio.run(main())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())pytest tests/ -v --cov=zoho_crm_mcpruff check src/ tests/
ruff format src/ tests/python -m buildThis project includes GitHub Actions workflows for:
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 configurationThe server includes comprehensive error handling:
The server uses Python's built-in logging module. Configure log level via environment variable:
export LOG_LEVEL=DEBUG # Options: DEBUG, INFO, WARNING, ERROR, CRITICALContributions are welcome! Please feel free to submit a Pull Request.
git checkout -b feature/AmazingFeature)git commit -m 'Add some AmazingFeature')git push origin feature/AmazingFeature)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
MIT License - see LICENSE file for details
For issues, questions, or contributions, please visit:
Made with ā¤ļø for the MCP community