mcp-dynamics365
MCP Server for Microsoft Dynamics 365
claude mcp add --transport stdio srikanth-paladugula-mcp-dynamics365-server node build/index.js \ --env D365_URL="https://your-org.crm.dynamics.com" \ --env CLIENT_ID="your-client-id" \ --env TENANT_ID="your-tenant-id" \ --env CLIENT_SECRET="your-client-secret"
How to use
This MCP server exposes a set of tools to interact with Microsoft Dynamics 365 via the Model Context Protocol (MCP). The available tools include: get-user-info to fetch details about the currently authenticated user; fetch-accounts to retrieve all Dynamics 365 accounts; get-associated-opportunities to obtain opportunities linked to a specific account; create-account to create a new account in Dynamics 365; and update-account to modify an existing account. The server is implemented with the @modelcontextprotocol/sdk and exposes these tools through the MCP interface, enabling Claude Desktop or other MCP clients to invoke them programmatically. To use the server, first ensure your environment is configured with the proper Azure AD credentials and Dynamics 365 URL, then start the MCP server and optionally register it with Claude Desktop for easy access to the tools.
How to install
Prerequisites:
- Node.js v16+ and NPM
- Dynamics 365 instance with API access
- Azure Active Directory (AAD) app configured for Dynamics 365 API access
Step-by-step:
- Clone the repository
git clone https://github.com/your-repo/dynamics365-mcp-server.git
cd dynamics365-mcp-server
- Install dependencies
npm install
- Configure environment variables Create a .env file in the project root and add:
CLIENT_ID=your-client-id
CLIENT_SECRET=your-client-secret
TENANT_ID=your-tenant-id
D365_URL=https://your-org.crm.dynamics.com
- Build the TypeScript sources
npm run build
- Run the MCP server
node build/index.js
You should see output indicating the server is running, e.g.,
Dynamics365 MCP server running on stdio...
- (Optional) Register with Claude Desktop
- Install Claude Desktop
- In claude_desktop_config.json, add a server entry pointing to node build/index.js with the necessary environment variables placed in the env section.
{
"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"
}
}
}
}
- Restart Claude Desktop and you should see the server tools available.
Optional: To test tools using the MCP Interceptor, run:
npx @modelcontextprotocol/inspector node build/index.js
Then navigate to http://localhost:5173 to connect and test tools.
Additional notes
Tips and notes:
- Ensure the .env file (or environment variables) are properly loaded before starting the server.
- The D365_URL should be the instance URL provided by your Dynamics 365 tenant (e.g., https://your-org.crm.dynamics.com).
- For production deployments, consider securing credentials and using a secret manager rather than plain environment variables.
- The tool set relies on Dynamics 365 API permissions; verify the Azure AD app has the necessary API permissions granted and consented.
- If you encounter TLS or network issues, verify that your environment can reach the Dynamics 365 API endpoint from your host.
- When testing via Claude Desktop, ensure the path to your built MCP server (build/index.js) is correct in the config.
Related MCP Servers
iterm
A Model Context Protocol server that executes commands in the current iTerm session - useful for REPL and CLI assistance
mcp
Octopus Deploy Official MCP Server
furi
CLI & API for MCP management
editor
MCP Server for Phaser Editor
DoorDash
MCP server from JordanDalton/DoorDash-MCP-Server
mcp
MCP сервер для автоматического создания и развертывания приложений в Timeweb Cloud