Zoho Crm

MCP server for Zoho CRM API integration

0MITcrm

Install

Config snippet generator goes here (5 client tabs)

README

# Zoho CRM MCP Server

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

<div align="center">

# Zoho Crm Mcp Server

[![GitHub stars](https://img.shields.io/github/stars/LokiMCPUniverse/zoho-crm-mcp-server?style=social)](https://github.com/LokiMCPUniverse/zoho-crm-mcp-server/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/LokiMCPUniverse/zoho-crm-mcp-server?style=social)](https://github.com/LokiMCPUniverse/zoho-crm-mcp-server/network)
[![GitHub watchers](https://img.shields.io/github/watchers/LokiMCPUniverse/zoho-crm-mcp-server?style=social)](https://github.com/LokiMCPUniverse/zoho-crm-mcp-server/watchers)

[![License](https://img.shields.io/github/license/LokiMCPUniverse/zoho-crm-mcp-server?style=for-the-badge)](https://github.com/LokiMCPUniverse/zoho-crm-mcp-server/blob/main/LICENSE)
[![Issues](https://img.shields.io/github/issues/LokiMCPUniverse/zoho-crm-mcp-server?style=for-the-badge)](https://github.com/LokiMCPUniverse/zoho-crm-mcp-server/issues)
[![Pull Requests](https://img.shields.io/github/issues-pr/LokiMCPUniverse/zoho-crm-mcp-server?style=for-the-badge)](https://github.com/LokiMCPUniverse/zoho-crm-mcp-server/pulls)
[![Last Commit](https://img.shields.io/github/last-commit/LokiMCPUniverse/zoho-crm-mcp-server?style=for-the-badge)](https://github.com/LokiMCPUniverse/zoho-crm-mcp-server/commits)

[![Python](https://img.shields.io/badge/Python-3776AB?style=for-the-badge&logo=python&logoColor=white)](https://python.org)
[![MCP](https://img.shields.io/badge/Model_Context_Protocol-DC143C?style=for-the-badge)](https://modelcontextprotocol.io)

[![Commit Activity](https://img.shields.io/github/commit-activity/m/LokiMCPUniverse/zoho-crm-mcp-server?style=flat-square)](https://github.com/LokiMCPUniverse/zoho-crm-mcp-server/pulse)
[![Code Size](https://img.shields.io/github/languages/code-size/LokiMCPUniverse/zoho-crm-mcp-server?style=flat-square)](https://github.com/LokiMCPUniverse/zoho-crm-mcp-server)
[![Contributors](https://img.shields.io/github/contributors/LokiMCPUniverse/zoho-crm-mcp-server?style=flat-square)](https://github.com/LokiMCPUniverse/zoho-crm-mcp-server/graphs/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)

```bash
pip install zoho-crm-mcp-server
```

### From Source

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

### Development Installation

```bash
pip install -e ".[dev]"
```

## Configuration

### 1. Set Up Zoho OAuth Credentials

1. Go to [Zoho API Console](https://api-console.zoho.com/)
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:

```bash
cp .env.example .env
```

Edit `.env` with your credentials:

```env
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

```bash
zoho-crm-mcp
```

### In Python Code

```python
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

```python
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")