CRM MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@CRM MCP Server which customers haven't ordered in 60 days? show the most valuable first"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
CRM MCP Server
Connect Claude, ChatGPT, Cursor or any MCP client to a CRM database, so you can ask questions and get work done in plain English:
"Which customers haven't ordered in 60 days and are worth more than $5,000? Add a note to each and create a call task for Friday."
The assistant finds the customers, reads their history, writes the notes and creates the tasks through this server. Every step is validated, permission-checked and logged.
This is a working reference build: the same pattern connects an AI assistant to HubSpot, Salesforce, Postgres / Supabase or your own REST API.
What it does
Tool | Type | What it's for |
| read | Find customers by name, company or email; filter by status and segment |
| read | Profile, lifetime value, recent orders, notes and open tasks for one customer |
| read | Customers with no order in N days, most valuable first (churn / win-back list) |
| read | Revenue, orders, top customers, by product and by segment for the last N days |
| write | Add a note to a customer (never edits or deletes existing notes) |
| write | Create a dated follow-up task |
| write | Move a customer between lead / active / at_risk / churned |
Related MCP server: crm-mcp-server
Built to be safe with real business data
Validated input. Every argument has a type, range and length limit; bad input is rejected before it reaches the database.
No raw SQL, no deletes. The AI can only do what the tools allow. Queries are parameterized, so injection attempts are treated as plain text (there is a test for this).
Read-only mode.
CRM_READ_ONLY=trueremoves the write tools entirely, ideal for a first rollout.Write tools are labelled. MCP annotations mark read vs. write vs. destructive tools, so clients like Claude can ask the user before changing anything.
Audit log. Every call is written to
data/audit.jsonl: time, tool, arguments, success, duration.API-key auth for the remote server.
/mcprequiresAuthorization: Bearer <key>(constant-time check);/healthstays open for uptime monitors.Tested. 17 tests run each tool through a real MCP client, in memory and over HTTP.
Quick start (5 minutes)
git clone https://github.com/projectsdealnepal/crm-mcp-server.git
cd crm-mcp-server
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
crm-mcp-seed # loads 60 sample customers, ~380 orders, notes and tasks
pytest -q # 17 passedUse it in Claude Desktop
Copy
claude_desktop_config.example.jsoninto Claude Desktop's config (Settings → Developer → Edit Config), replacing the/ABSOLUTE/PATH/TO/parts.Restart Claude Desktop. The crm tools appear in the tools menu.
Ask: "Give me a sales report for the last 30 days."
The same command + env block works in Cursor, Claude Code and other MCP clients.
Run it as a remote server
export CRM_API_KEY=$(python -c "import secrets; print(secrets.token_urlsafe(32))")
crm-mcp --http # serves http://0.0.0.0:8000/mcp
curl localhost:8000/health # {"status":"ok","read_only":false}Or with Docker:
docker build -t crm-mcp .
docker run -p 8000:8000 -e CRM_API_KEY=... -v crm-data:/data crm-mcpDeploy the container anywhere that runs Docker (AWS ECS / App Runner, Fly.io, Render, a VPS) behind HTTPS, then add the URL and key as a custom connector in your AI client.
Try these prompts
"Which customers haven't ordered in 60 days? Show the most valuable first."
"Summarize everything about the top customer on that list."
"Give me a sales report for the last 90 days, by segment."
"Add a note to customer 12: sent a 20% win-back offer. Then create a call task for next Friday."
"Mark every churned customer worth more than $10k as at_risk so sales can try to win them back."
Project layout
crm_mcp/
server.py tools, validation, annotations, read-only mode
audit.py JSONL audit log for every tool call
db.py schema + SQLite connection (standard SQL, Postgres-ready)
seed.py deterministic demo data
config.py settings from environment variables
__main__.py stdio or HTTP (API-key auth, /health)
tests/ in-memory and HTTP end-to-end testsAdapting it to your system
Replace the queries in server.py with calls to your CRM's API or your own database, keep the same tool names and validation, and you have an assistant that works on your real data. Typical adaptations: HubSpot / Salesforce / Zoho, Postgres / Supabase, Shopify, an internal REST API, OAuth with per-user permissions.
Built by Anand Gachhadar, AI agent & LLM engineer (Python, AWS, Claude / OpenAI). Need an MCP server for your own system? Find me on Upwork.
MIT licensed.
Available Tools
7 toolsadd_noteA
Add a note to a customer's record. Adds only; never edits or deletes existing notes.
Inputs: text (required), customer_id (required). Returns: object
create_followup_taskB
Create a follow-up task for a customer (for example a call or a renewal email).
Inputs: title (required), due_date (required), customer_id (required). Returns: object
get_customer_summaryARead-onlyIdempotent
Everything about one customer: profile, revenue, recent orders, notes and open tasks.
Inputs: customer_id (required). Returns: object
list_inactive_customersARead-onlyIdempotent
Customers who have bought before but not in the last N days, most valuable first. Use it to find churn risks and win-back opportunities.
Inputs: days, limit, min_lifetime_value. Returns: object
sales_reportBRead-onlyIdempotent
Revenue, order count, top customers and revenue by product and segment for the last N days.
Inputs: period_days. Returns: object
search_customersARead-onlyIdempotent
Find customers by name, company or email, optionally filtered by status and segment.
Inputs: limit, query, status, segment. Returns: object
update_customer_statusBDestructiveIdempotent
Change a customer's status (lead, active, at_risk, churned). Returns the old and new value.
Inputs: status (required), customer_id (required). Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Each tool has a distinct role: search for discovery, summary for full detail, inactive list for churn targeting, and sales_report for aggregate analysis. The mutation tools (add_note, create_followup_task, update_customer_status) are also clearly separated by action and object. There is little risk of an agent misselecting among these seven tools.
Most names follow a predictable verb_noun snake_case pattern (search_customers, get_customer_summary, list_inactive_customers, add_note, create_followup_task, update_customer_status). sales_report is the main deviation, using a noun phrase without a verb, though it remains readable and consistent in casing style.
Seven tools is well-scoped for a focused CRM server, with each tool covering a recognizable workflow: lookup, detail, churn detection, reporting, notes, tasks, and status updates. None feel redundant or extraneous.
The surface covers read/search, reporting, notes, tasks, and status changes, but notable CRM operations are missing: creating a customer, updating customer profile fields, and managing or closing follow-up tasks. Agents can still handle core workflows but will hit gaps for full customer lifecycle management.
Maintenance
Related MCP Connectors
API-first CRM for LLMs - contacts, companies, deals and activities over a native MCP server.
The HubSpot MCP Server acts as a bridge that enables AI assistants and Large Language Models to securely interact with HubSpot CRM data through natural conversation, without requiring users to understand complex API structures. It provides read-only access to standard CRM objects (contacts, companies, deals, tickets, products, invoices, and more) and their associations, secured via OAuth 2.0, allowing AI agents to perform tasks like summarizing deals, fetching company updates, and looking up record changes.
A CRM you talk to: leads, deals and a pipeline board inside ChatGPT, Grok and other MCP clients.
CRM: Claude, ChatGPT or any MCP client works with records, inbox and company knowledge.
Related MCP Servers
- AlicenseAqualityDmaintenanceMCP server that connects to a sales CRM database, enabling AI agents to search prospects, view pipeline status, manage follow-ups, and update records using natural language commands.5MIT
- FlicenseNot gradedqualityDmaintenanceA read-only MCP server providing structured access to CRM data (companies, contacts, deals, activities) backed by SQLite. It enables LLMs to search contacts and deals, view full company accounts, find stale deals, and get pipeline summaries.-
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to manage a fully customizable CRM, including contacts, companies, sales pipelines, custom objects and fields, file uploads, and data relationships via MCP over HTTP.MIT
- AlicenseNot gradedqualityCmaintenanceEnables MCP clients such as Claude, ChatGPT and Cursor to answer business questions about sales, customers, orders and spreadsheets in natural language by reading live Postgres/SQLite databases and Google Sheets without exporting files or gaining write access. Guardrails include AST-based read-only SQL validation, read-only database roles, row/byte caps with pagination, PII masking, bearer-token auth for remote HTTP use, and a full JSONL audit log of every tool call.MIT