Skip to main content
Glama
@theyahia/amocrm-mcp

@theyahia/amocrm-mcp

by theYahia

@theyahia/amocrm-mcp

本番運用グレードのMCPサーバーです。amoCRM API用に、リード、連絡先、企業、パイプライン、タスク、メモ、検索、イベント、未選別リードをカバーする19のツールを提供します。OAuth 2.0による自動トークン更新、レート制限(7 req/sec)、指数バックオフ再試行を備えています。

インストール

npx -y @theyahia/amocrm-mcp

Related 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_SUBDOMAIN

必須

amoCRMのサブドメイン(例: mycompany.amocrm.ru の mycompany)

AMOCRM_ACCESS_TOKEN

必須

OAuth アクセストークン

AMOCRM_REFRESH_TOKEN

任意

OAuth リフレッシュトークン(401時に自動更新を有効化)

AMOCRM_CLIENT_ID

任意

OAuth クライアントID(トークン更新に必要)

AMOCRM_CLIENT_SECRET

任意

OAuth クライアントシークレット(トークン更新に必要)

AMOCRM_DOMAIN は AMOCRM_SUBDOMAIN のエイリアスとしても受け付けられます(後方互換性)。

ツール (19)

リード

ツール

説明

list_leads

フィルター(パイプライン、ステータス、クエリ)で取引を検索・一覧表示。連絡先、失注理由を埋め込み。

get_lead

IDで単一のリードを取得。リンクされた連絡先とカタログ要素を含む。

create_lead

名前、価格、パイプライン、ステータス、カスタムフィールドを持つ新しいリードを作成。

update_lead

リードのフィールドを更新 — ステージ間の移動、価格変更、担当者変更。

連絡先

ツール

説明

list_contacts

名前、電話、メールで連絡先を検索。

get_contact

すべてのカスタムフィールドを含む単一の連絡先を取得。

create_contact

電話、メール、カスタムフィールドを持つ連絡先を作成。

企業

ツール

説明

list_companies

企業を検索。リンクされたリードと連絡先を埋め込む。

create_company

カスタムフィールドを持つ企業を作成。

パイプライン

ツール

説明

list_pipelines

すべての営業パイプラインとそのステータス(ステージ)を一覧表示。

タスク

ツール

説明

list_tasks

エンティティ、完了状態、担当ユーザーで絞り込んでタスクを一覧表示。

create_task

リード/連絡先/企業にリンクされ、期限付きのタスクを作成。

complete_task

タスクを完了にして結果テキストを追加。

未選別

ツール

説明

list_unsorted

受信した未選別リード(フォーム、メール解析)を一覧表示。

accept_unsorted

未選別リードをパイプラインに受け入れる。

メモ

ツール

説明

add_note

任意のエンティティにメモ(common、call_in、call_out、service_message)を追加。

検索

ツール

説明

search

リード、連絡先、企業を横断するユニバーサル検索。

イベント

ツール

説明

list_events

アクティビティログ — ステータス変更、通話、メモ、リンク。

アカウント

ツール

説明

get_account

アカウント情報、ユーザー、タスクタイプ、amojo設定。

デモプロンプト

営業概要:

「Sales」パイプライン内で現在「Negotiation」ステージにあるすべてのリードを表示してください。連絡先情報も含めてください。

タスク管理:

リード #12345 にフォローアップ通話タスクを作成してください。期限は明日の午前10:00です。その後、私の未完了タスクをすべて一覧表示してください。

新規クライアントのオンボーディング:

「Ivan Petrov」という連絡先を電話番号 +79001234567 で作成し、次に「Petrov Solutions」という企業と、メインパイプラインに 150,000 RUB の「Website Development」というリードを作成してください。

OAuth 2.0 設定ガイド

  1. amoCRMのアカウント設定に移動: https://YOUR_SUBDOMAIN.amocrm.ru/settings/widgets/

  2. 新しいインテグレーション(外部インテグレーション)を作成

  3. リダイレクトURIを https://YOUR_SUBDOMAIN.amocrm.ru に設定

  4. Client ID と Client Secret をコピー

  5. インテグレーションを認証して初期のAuthorization Codeを取得

  6. コードをトークンと交換:

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"
  }'
  1. レスポンスから access_token と refresh_token を保存

  2. AMOCRM_REFRESH_TOKEN、AMOCRM_CLIENT_ID、AMOCRM_CLIENT_SECRET が設定されている場合、サーバーは期限切れのトークンを自動的に更新します。

エラーハンドリング

  • 401 Unauthorized: リフレッシュ資格情報が設定されている場合はトークンを自動更新して再試行

  • 429 Rate Limited: Retry-After ヘッダーを尊重し、待機して再試行

  • 5xx Server Errors: 指数バックオフで再試行(最大3回)

  • Rate Limiting: amoCRMの制限内に収めるため、リクエスト間に150msの遅延を内蔵(約7 req/sec)

開発

git clone https://github.com/theYahia/amocrm-mcp.git
cd amocrm-mcp
npm install
npm run build
npm test

ライセンス

MIT

Available Tools

19 tools
accept_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.

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

    A3.7/5.0

    Scored across 19 tools

    Disambiguation5/5

    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.

    Naming Consistency5/5

    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.

    Tool Count3/5

    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.

    Completeness3/5

    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

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      Enables users to interact with AmoCRM via Claude Desktop using natural language, with 17 tools for accessing CRM entities like leads, contacts, and pipelines.
      18
      1
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      AI-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
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to interact with amoCRM, providing access to deals, contacts, companies, notes, tasks, and custom fields via natural language.
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Manage Kommo CRM leads, contacts, companies, pipelines, tasks, notes, tags and custom fields from natural language. Also packaged as a Kiro Power.
      30
      28 PyPI
      2
      MIT