Dynamics 365 MCP Server
Dynamics 365 MCP サーバー 🚀
概要
Microsoft Dynamics 365 MCP サーバーは、Anthorpic の**Model Context Protocol (MCP)**を使用して Microsoft Dynamics 365 と連携するためのツールを提供する MCP サーバーです。ユーザーは、 Claude Desktopからユーザー情報、アカウント、アカウントに関連付けられた商談の取得、アカウントの作成と更新など、さまざまな操作を実行できます。
このプロジェクトでは@modelcontextprotocol/sdkライブラリを使用して MCP サーバーとツールを実装し、データ操作のために Dynamics 365 API と統合します。
Related MCP server: Dataverse MCP Server
ツールのリスト 🛠️
ツール名 | 説明 | 入力 | 出力 |
| 現在認証されているユーザーに関する情報を取得します。 | なし | 名前、ユーザー ID、ビジネス ユニット ID などのユーザーの詳細。 |
| Dynamics 365 からすべてのアカウントを取得します。 | なし | JSON 形式のアカウントのリスト。 |
| 指定されたアカウントに関連付けられた商談を取得します。 |
| JSON 形式での機会のリスト。 |
| Dynamics 365 に新しいアカウントを作成します。 | アカウントの詳細を含む | 作成されたアカウントの詳細(JSON 形式)。 |
| Dynamics 365 内の既存のアカウントを更新します。 | 更新された詳細を含む | 更新されたアカウントの詳細(JSON 形式)。 |
前提条件 📝
プロジェクトをセットアップする前に、以下がインストールされていることを確認してください。
Node.js (v16 以上)
NPM (ノードパッケージマネージャー)
APIアクセスを備えたDynamics 365インスタンス
Dynamics 365 API アクセス用に構成された Azure Active Directory (AAD) アプリケーション
設定手順 ⚙️
プロジェクトをローカルでセットアップして実行するには、次の手順に従います。
1. リポジトリのクローンを作成する
git clone https://github.com/your-repo/dynamics365-mcp-server.git
cd dynamics365-mcp-server2. 依存関係をインストールする
npm install3. 環境変数を設定する
プロジェクトのルートに .env ファイルを作成し、次の変数を追加します。
CLIENT_ID=your-client-id
CLIENT_SECRET=your-client-secret
TENANT_ID=your-tenant-id
D365_URL=https://your-org.crm.dynamics.com
4. TypeScriptファイルをコンパイルする
npm run build
4. MCPサーバーを実行する
node build\index.js次の出力が表示されます。
Dynamics365 MCP server running on stdio...5. (オプション) Claude DesktopにMCPサーバーを登録する
Claude Desktopをインストールする
設定 > 開発者 > 設定の編集に移動します
claude_desktop_config.jsonを編集する
{
"mcpServers": {
"Dynamics365": {
"command": "node",
"args": [
"<Path to your MCP server build file ex: rootfolder/build/index.js>"
],
"env": {
"CLIENT_ID": "<D365 Client Id>",
"CLIENT_SECRET": "<D365 Client Secret>",
"TENANT_ID": "<D365 Tenant ID>",
"D365_URL": "Dynamics 365 url"
}
}
}
}Claudeデスクトップを再起動します
これで、プロンプトウィンドウにサーバーツールが表示されるはずです。

ツールget-user-infoを呼び出してプロンプトをテストしてみましょう

6. (オプション) MCP Interceptorを使用したテストツール
ターミナルで次のコマンドを実行します
npx @modelcontextprotocol/inspector node build/index.js
🔍 http://localhost:5173にアクセスしてください🚀

これでサーバーに接続してすべてのツールをテストできます。
デバッグ🐛
問題が発生した場合は、次の点を確認してください。
問題が発生した場合は、次の点を確認してください。
.env ファイルは適切に構成されています。
Azure AD アプリケーションには、Dynamics 365 API に必要なアクセス許可があります。
Dynamics 365 インスタンスは、ご使用の環境からアクセスできます。
コードにデバッグログを追加して、問題を追跡することもできます。例:
console.error("Debugging: Loaded environment variables:", process.env);貢献中🤝
貢献を歓迎します!バグや機能のリクエストについては、お気軽にプルリクエストを送信したり、問題を報告してください。
貢献するには:
リポジトリをフォークします。
機能またはバグ修正用の新しいブランチを作成します。
変更をコミットし、プル リクエストを送信します。
ご協力ありがとうございます!😊
Available Tools
5 toolscreate-accountC
Create a new account in Dynamics 365
Inputs: accountData (required).
fetch-accountsB
Fetch accounts from Dynamics 365
Inputs: no named parameters.
get-associated-opportunitiesC
Fetch opportunities for a given account from Dynamics 365
Inputs: accountId (required).
get-user-infoC
Get user info from Dynamics 365
Inputs: no named parameters.
update-accountC
Update an existing account in Dynamics 365
Inputs: accountId (required), accountData (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a clearly distinct purpose with no overlap: create-account and update-account handle account creation and modification, fetch-accounts retrieves accounts, get-associated-opportunities fetches related opportunities, and get-user-info handles user data. The descriptions clearly differentiate the target resources and actions.
The tools follow a consistent verb-noun pattern with hyphens (e.g., create-account, fetch-accounts), except for get-user-info which uses 'info' instead of a more specific noun like 'user'. This minor deviation slightly affects consistency, but the overall pattern is clear and readable.
With 5 tools, the server is well-scoped for managing Dynamics 365 accounts and related data. Each tool earns its place by covering essential CRUD operations for accounts and providing useful related functions like fetching opportunities and user info, without being overly sparse or bloated.
The toolset provides solid coverage for account management with create, fetch, and update operations, plus useful extensions for opportunities and user info. A minor gap exists in lacking a delete-account tool, which agents might need to work around, but core workflows are well-supported.
Related MCP Connectors
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
Official Microsoft MCP Server to query Microsoft Entra data using natural language
API-first CRM for LLMs - contacts, companies, deals and activities over a native MCP server.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Related MCP Servers
- AlicenseBqualityBmaintenanceA Model Context Protocol (MCP) server that provides intelligent access to PowerPlatform/Dataverse entities and records. This tool offers context-aware assistance, entity exploration and metadata access.38970 npm45MIT
- AlicenseAqualityCmaintenanceA Model Context Protocol server that enables CRUD operations and querying on Microsoft Dataverse through natural language.6MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that lets Claude and any other MCP-compatible client work with an OpenText AppWorks Platform tenant in plain English.MIT
- FlicenseNot gradedqualityCmaintenanceMCP server that integrates with Microsoft Dynamics 365 Business Central, enabling querying of customers, items, and sales orders through natural language commands in Claude Desktop.10-