
MCP Server for Microsoft Dynamics 365
概览
这是一个MCP服务器,提供使用Anthorpic与Microsoft Dynamics 365交互的工具。它允许用户执行多种操作,如获取用户信息、账户、与账户相关的机会,创建和更新账户。 该项目使用 @modelcontextprotocol/SDK 库实现 MCP 服务器和工具,并与 Dynamics 365 API 集成进行数据操作。 在设置项目前,请确保您已安装以下设备: - (v16或更高版本)- (节点包管理器)- 一个带有API访问权限的Dynamics 365实例- 配置为支持Dynamics 365 API访问的Azure Active Directory(AAD)应用 请按照以下步骤在本地搭建和运行项目: 在项目根创建一个 .env 文件,并添加以下变量: - 安装 Claude Desktop - 进入设置>开发者 > 编辑配置 - 编辑 claude_desktop_config。
概述(AI 翻译)
概述
Microsoft Dynamics 365 MCP 服务器 是一台 MCP 服务器,提供使用 Anthorpic 的 Model Context Protocol(MCP) 与 Microsoft Dynamics 365 交互的工具。它允许用户执行多种操作,如获取用户信息、账户、与账户相关的机会,创建和更新 Claude Desktop 中的账户。
该项目使用 @modelcontextprotocol/sdk 库实现 MCP 服务器和工具,并与 Dynamics 365 API 集成进行数据操作。
工具🛠️列表
| 工具名称 | 说明 | 输入 | 输出 |
|---|---|---|---|
get-user-info |
获取当前认证用户的信息。 | 无 | 用户信息,包括姓名、用户ID和业务单元ID。 |
fetch-accounts |
从Dynamics 365获取所有账户。 | 无 | 账户列表以JSON格式呈现。 |
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Dynamics 365 MCP Server 🚀
Overview
The Microsoft Dynamics 365 MCP Server is a MCP server that provides tools to interact with Microsoft Dynamics 365 using the Model Context Protocol(MCP) by Anthorpic. It allows users to perform various operations such as retrieving user information, accounts, opportunities associated with an account, create and update accounts from Claude Desktop.
This project uses the @modelcontextprotocol/sdk library to implement the MCP server and tools, and it integrates with Dynamics 365 APIs for data operations.
List of Tools 🛠️
| Tool Name | Description | Input | Output |
|---|---|---|---|
get-user-info |
Fetches information about the currently authenticated user. | None | User details including name, user ID, and business unit ID. |
fetch-accounts |
Fetches all accounts from Dynamics 365. | None | List of accounts in JSON format. |
get-associated-opportunities |
Fetches opportunities associated with a given account. | accountId (string, required) |
List of opportunities in JSON format. |
create-account |
Creates a new account in Dynamics 365. | accountData (object, required) containing account details. |
Details of the created account in JSON format. |
update-account |
Updates an existing account in Dynamics 365. | accountId (string, required), accountData (object, required) containing updated details. |
Details of the updated account in JSON format. |
Prerequisites 📝
Before setting up the project, ensure you have the following installed:
- Node.js (v16 or higher)
- NPM (Node Package Manager)
- A Dynamics 365 instance with API access
- Azure Active Directory (AAD) application configured for Dynamics 365 API access
Configuration Steps ⚙️
Follow these steps to set up and run the project locally:
安装
npx @modelcontextprotocol/inspector node build/index.js配置
{
"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"
}
}
}
}