Skip to main content
Glama
Saipranoy

mcp-crm

by Saipranoy

mcp-crm

学習用プロジェクトです。Model Context Protocol サーバーで、CRM を stdio 経由で MCP クライアントに公開します。

サインインはデバイスコードフローを利用して Microsoft Entra で行われます。取得した ID トークンは CRM アクセストークンに交換され、CRM クエリはサインインしたユーザーとして実行されます。そのため、返されるのは、そのユーザーが閲覧を許可されたデータだけです。

要件

  • Node.js 20+

  • デバイスコード(パブリッククライアント)フローを有効にした Entra アプリの登録

  • POST /api/auth/entra で Entra トークンを受け付け、GET /api/accounts を提供する CRM API

Related MCP server: M365 Copilot Web Bridge

セットアップ

npm install

プロジェクトルートに .env を作成してください:

ENTRA_CLIENT_ID=<your app registration's client id>
ENTRA_TENANT_ID=<your directory tenant id>
CRM_API_BASE_URL=https://your-crm.example.com

3 つすべて必須です。いずれかが欠けていると、サーバーは起動時に例外をスローします。.env は gitignore されているため、コミットしないでください。

実行

npx tsx src/index.ts     # run directly
npx tsc                  # type-check and build to dist/

サーバーは stdio 上で MCP を利用して通信するため、通常は手動ではなくクライアントから起動されます。Claude Code に登録するには:

{
  "mcpServers": {
    "crm": {
      "command": "npx",
      "args": ["tsx", "/absolute/path/to/mcp-crm/src/index.ts"]
    }
  }
}

ログ出力は stderr に送られます。stdout が MCP プロトコルを運ぶためです。

ツール

ツール

説明

start_crm_login

Entra デバイスコード サインインを開始し、アクセス先のコードと URL を返します。戻りは即座で、サインインはバックグラウンドで完了します。

crm_login_status

そのサインインが完了したか、まだ保留中か、失敗したかを報告します。

search_crm_accounts

実際の CRM アカウントを名前で検索します。完了したサインインが必要です。idnamestatussales_rep を含む最大 25 件を返します。

search_accounts

ハードコードされた小さなサンプルアカウントのリストを検索します。認証は不要です。実 CRM を使わずに接続のテストのために使用します。

サインインの流れ

start_crm_login は Entra が完了するまでブロックできないため、次の 2 つに分かれています:

  1. start_crm_login を呼び出します。デバイスコードとアクセス先の URL が返されます。

  2. ブラウザーでサインインを完了します。

  3. 確認のために crm_login_status を呼び出します。サインインしたユーザーが報告されたら、search_crm_accounts が動作します。

トークンはメモリ内のみに保持されます。サーバーを再起動すると、再びサインインする必要があります。

ライセンス

ISC

A
license - permissive license
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Bridges stdio-based LLM harnesses to OAuth-protected remote MCP servers via Streamable HTTP, handling PKCE browser login and token refresh automatically.
    9
  • F
    license
    Not graded
    quality
    B
    maintenance
    Provides MCP tools to interact with GoHighLevel CRM data, including contacts, conversations, call transcripts, broker lead overviews, pipelines/opportunities, and task creation. Supports both stdio and HTTP transports for local and remote use.

View all related MCP servers

Related MCP Connectors

  • Browser MCP for logged-in tasks. Uses your Chrome — credentials stay local. Zero-token replay.

  • Official Microsoft MCP Server to query Microsoft Entra data using natural language

  • Query SEC EDGAR filings, XBRL financials, and company data through MCP. STDIO & Streamable HTTP.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Saipranoy/mcp-crm'

If you have feedback or need assistance with the MCP directory API, please join our Discord server