@theyahia/amocrm-mcp
@theyahia/amocrm-mcp
面向 amoCRM API 的生产级 MCP 服务器。19 个工具涵盖线索、联系人、公司、管道、任务、备注、搜索、事件和未分类线索。支持 OAuth 2.0 自动刷新令牌。速率限制(7 请求/秒)。采用指数退避重试。
安装
npx -y @theyahia/amocrm-mcpRelated MCP server: KommoMCP
MCP 配置
添加到你的 Claude Desktop、Cursor 或任何 MCP 客户端配置中:
{
"mcpServers": {
"amocrm": {
"command": "npx",
"args": ["-y", "@theyahia/amocrm-mcp"],
"env": {
"AMOCRM_SUBDOMAIN": "mycompany",
"AMOCRM_ACCESS_TOKEN": "your-access-token",
"AMOCRM_REFRESH_TOKEN": "your-refresh-token",
"AMOCRM_CLIENT_ID": "your-client-id",
"AMOCRM_CLIENT_SECRET": "your-client-secret"
}
}
}
}环境变量
变量 | 必填 | 描述 |
| 是 | 你的 amoCRM 子域名(例如 |
| 是 | OAuth 访问令牌 |
| 否 | OAuth 刷新令牌(在 401 时启用自动刷新) |
| 否 | OAuth 客户端 ID(刷新令牌时必须填写) |
| 否 | OAuth 客户端密钥(刷新令牌时必须填写) |
AMOCRM_DOMAIN也可作为AMOCRM_SUBDOMAIN的别名(向后兼容)。
工具(19)
线索
工具 | 描述 |
| 按筛选条件(管道、状态、查询)搜索并列出线索。嵌入联系人和失败原因。 |
| 按 ID 获取单个线索,包含关联的联系人和目录元素。 |
| 创建一个新线索,包含名称、金额、管道、状态和自定义字段。 |
| 更新线索字段——在阶段之间移动、修改金额、重新分配。 |
联系人
工具 | 描述 |
| 按姓名、电话、电子邮件搜索联系人。 |
| 获取单个联系人及其所有自定义字段。 |
| 创建联系人,包含电话、电子邮件和自定义字段。 |
公司
工具 | 描述 |
| 搜索公司。嵌入关联的线索和联系人。 |
| 创建公司,包含自定义字段。 |
管道
工具 | 描述 |
| 列出所有销售管道及其状态(阶段)。 |
任务
工具 | 描述 |
| 按实体、完成状态、负责人筛选并列出任务。 |
| 创建与线索/联系人/公司关联的任务,并设置截止时间。 |
| 将任务标记为已完成并添加结果文本。 |
未分类线索
工具 | 描述 |
| 列出进入的未分类线索(表单、邮件解析)。 |
| 将未分类线索接收至管道。 |
备注
工具 | 描述 |
| 向任意实体添加备注(common、call_in、call_out、service_message)。 |
搜索
工具 | 描述 |
| 跨线索、联系人和公司的通用搜索。 |
事件
工具 | 描述 |
| 活动日志——状态变更、通话、备注、关联。 |
账户
工具 | 描述 |
| 账户信息、用户、任务类型、amojo 设置。 |
演示提示
销售概览:
“显示‘Sales’管道中当前处于‘Negotiation’阶段的所有线索。包含联系人信息。”
任务管理:
“为线索 #12345 创建跟进电话任务,截止时间为明天上午 10:00。然后列出我所有未完成的任务。”
新客户引导:
“创建联系人‘Ivan Petrov’,电话 +79001234567;然后创建公司‘Petrov Solutions’和线索‘Website Development’,金额为 150,000 RUB,放入主管道。”
OAuth 2.0 设置指南
转到你的 amoCRM 账户设置:
https://YOUR_SUBDOMAIN.amocrm.ru/settings/widgets/创建一个新的集成(外部集成)
将重定向 URI 设置为
https://YOUR_SUBDOMAIN.amocrm.ru复制客户端 ID和客户端密钥
授权该集成以获取初始授权码
用该授权码换取令牌:
curl -X POST https://YOUR_SUBDOMAIN.amocrm.ru/oauth2/access_token \
-H "Content-Type: application/json" \
-d '{
"client_id": "YOUR_CLIENT_ID",
"client_secret": "YOUR_CLIENT_SECRET",
"grant_type": "authorization_code",
"code": "YOUR_AUTH_CODE",
"redirect_uri": "https://YOUR_SUBDOMAIN.amocrm.ru"
}'保存响应中的
access_token和refresh_token如果设置了
AMOCRM_REFRESH_TOKEN、AMOCRM_CLIENT_ID和AMOCRM_CLIENT_SECRET,服务器将自动刷新过期的令牌。
错误处理
401 未授权:如果配置了刷新凭据,则自动刷新令牌,然后重试。
429 请求过多:遵循
Retry-After响应头,等待并重试。5xx 服务器错误:指数退避重试(最多 3 次)。
速率限制:内置 150ms 请求间隔(约 7 请求/秒),以保持在 amoCRM 限制范围内。
开发
git clone https://github.com/theYahia/amocrm-mcp.git
cd amocrm-mcp
npm install
npm run build
npm test许可证
MIT
Available Tools
19 toolsaccept_unsortedA
Accept an unsorted lead — moves it into a pipeline as a real lead. Optionally specify target pipeline, status, and responsible user.
Inputs: uid (required), user_id, status_id, pipeline_id.
add_noteA
Add a note to a lead, contact, or company. Supports common notes, incoming/outgoing call logs, and service messages.
Inputs: text (required), entity_id (required), entity_type (required), note_type.
complete_taskA
Mark a task as completed and add a result text. The result will appear in the entity's activity feed.
Inputs: task_id (required), result_text (required).
create_companyA
Create a new company in amoCRM. Use custom_fields_values for address, website, etc.
Inputs: name (required), responsible_user_id, custom_fields_values.
create_contactA
Create a new contact in amoCRM. Use custom_fields_values to set phone, email, and other fields.
Inputs: name, last_name, first_name, responsible_user_id, +1 more.
create_leadA
Create a new lead (deal) in amoCRM. Requires a name. Optionally set price, pipeline, status, responsible user, and custom fields.
Inputs: name (required), price, status_id, pipeline_id, +2 more.
create_taskA
Create a task linked to a lead, contact, or company. Set deadline (complete_till as Unix timestamp) and task type (1=Call, 2=Meeting, 3=Email).
Inputs: text (required), entity_id (required), entity_type (required), complete_till (required), +2 more.
get_accountA
Get current amoCRM account info — name, plan, users, task types, etc. Use 'with' to include users_groups, task_types, and amojo_id.
Inputs: with.
get_contactA
Get a single contact by ID with full details including custom fields (phone, email, etc.).
Inputs: contact_id (required), with.
get_leadA
Get a single lead by ID with full details. Use 'with' to include linked contacts and catalog elements.
Inputs: lead_id (required), with.
list_companiesA
Search and list companies in amoCRM. Use 'with' to embed linked leads and contacts.
Inputs: page, with, limit, query.
list_contactsB
Search and list contacts in amoCRM. Supports full-text search across name, phone, and email.
Inputs: page, with, limit, query.
list_eventsA
List events (activity log) in amoCRM. Filter by entity type, entity ID, or event type. Shows status changes, calls, notes, and other activities.
Inputs: page, type, limit, entity, +1 more.
list_leadsA
Search and list deals (leads) in amoCRM. Supports filtering by pipeline, statuses, and full-text search. Use 'with' to embed contacts or loss reasons.
Inputs: page, with, limit, query, +2 more.
list_pipelinesA
List all sales pipelines with their statuses (stages). Essential for understanding the sales funnel structure before creating or filtering leads.
Inputs: no named parameters.
list_tasksA
List tasks in amoCRM. Filter by entity (lead/contact/company), completion status, or responsible user.
Inputs: page, limit, entity_id, entity_type, +2 more.
list_unsortedA
List incoming unsorted leads (from forms, email parsing, etc.) that need to be accepted or declined.
Inputs: page, limit, pipeline_id.
searchA
Universal search across amoCRM — finds leads, contacts, and companies matching the query. Min 3 characters.
Inputs: query (required), limit.
update_leadA
Update an existing lead — change name, price, status, pipeline, responsible user, or custom fields. Useful for moving deals between stages.
Inputs: lead_id (required), name, price, status_id, +3 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 19 tools
Each tool maps to a distinct resource and action, such as list_leads vs get_lead vs create_lead, and list_unsorted/accept_unsorted are clearly separate from regular lead tools. No two tools appear to do the same job.
Tool names consistently use lowercase snake_case verb_noun patterns like list_leads, create_contact, complete_task, and accept_unsorted. The bare 'search' is a reasonable exception for a universal action and does not break the overall convention.
At 19 tools, the set falls into the heavy 16-25 range and begins to feel borderline bloated, even though the CRM domain covers many entities. The organization by entity helps, but the count is above the ideal 3-15 sweet spot.
Core lead and task workflows are well covered, but contacts and companies lack update/delete operations, there is no get_company, and unsorted leads can only be accepted, not declined. These are notable lifecycle gaps that agents may need to work around.
Maintenance
Related MCP Connectors
Manage projects, tasks, time tracking, and team collaboration through natural language.
Operate Obriym CRM from your AI assistant: leads, deals, orders, catalog, stock, marketplaces.
A CRM you talk to: leads, deals and a pipeline board inside ChatGPT, Grok and other MCP clients.
Ask your Quickbase apps in plain language. Read-only by default; writes need human approval.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables users to interact with AmoCRM via Claude Desktop using natural language, with 17 tools for accessing CRM entities like leads, contacts, and pipelines.181MIT
- FlicenseNot gradedqualityDmaintenanceAI-powered CRM assistant for Kommo/amoCRM that provides natural language management via Telegram bot and MCP protocol, enabling analytics, entity operations, and CRM setup.8-
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to interact with amoCRM, providing access to deals, contacts, companies, notes, tasks, and custom fields via natural language.MIT
- AlicenseAqualityBmaintenanceManage Kommo CRM leads, contacts, companies, pipelines, tasks, notes, tags and custom fields from natural language. Also packaged as a Kiro Power.3028 PyPI2MIT