mcp-crm
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.com3 つすべて必須です。いずれかが欠けていると、サーバーは起動時に例外をスローします。.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 プロトコルを運ぶためです。
ツール
ツール | 説明 |
| Entra デバイスコード サインインを開始し、アクセス先のコードと URL を返します。戻りは即座で、サインインはバックグラウンドで完了します。 |
| そのサインインが完了したか、まだ保留中か、失敗したかを報告します。 |
| 実際の CRM アカウントを名前で検索します。完了したサインインが必要です。 |
| ハードコードされた小さなサンプルアカウントのリストを検索します。認証は不要です。実 CRM を使わずに接続のテストのために使用します。 |
サインインの流れ
start_crm_login は Entra が完了するまでブロックできないため、次の 2 つに分かれています:
start_crm_loginを呼び出します。デバイスコードとアクセス先の URL が返されます。ブラウザーでサインインを完了します。
確認のために
crm_login_statusを呼び出します。サインインしたユーザーが報告されたら、search_crm_accountsが動作します。
トークンはメモリ内のみに保持されます。サーバーを再起動すると、再びサインインする必要があります。
ライセンス
ISC
This server cannot be installed
Maintenance
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
- FlicenseNot gradedqualityDmaintenanceBridges stdio-based LLM harnesses to OAuth-protected remote MCP servers via Streamable HTTP, handling PKCE browser login and token refresh automatically.9
- AlicenseNot gradedqualityCmaintenanceExposes a user-authenticated Microsoft 365 Copilot Chat browser session as a stdio MCP server, enabling AI-powered chat interactions via MCP tools like copilot_chat and copilot_status.1MIT
- AlicenseNot gradedqualityAmaintenanceEnables managing Onde Inference accounts and model catalog operations through MCP tools such as login, app management, model registration, and assignment. Returns structured JSON over stdio for use with any MCP client.Apache 2.0
- FlicenseNot gradedqualityBmaintenanceProvides 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.
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.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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