home / mcp / dynamics 365 mcp server
MCP Server for Microsoft Dynamics 365
Configuration
View docs{
"mcpServers": {
"srikanth-paladugula-mcp-dynamics365-server": {
"command": "node",
"args": [
"<Path to your MCP server build file ex: rootfolder/build/index.js>"
],
"env": {
"D365_URL": "Dynamics 365 url",
"CLIENT_ID": "<D365 Client Id>",
"TENANT_ID": "<D365 Tenant ID>",
"CLIENT_SECRET": "<D365 Client Secret>"
}
}
}
}The Dynamics 365 MCP Server exposes a set of managed tools that interact with Microsoft Dynamics 365 via the Model Context Protocol (MCP). It enables actions such as retrieving the current user, listing accounts, fetching opportunities related to an account, and creating or updating accounts from Claude Desktop or other MCP clients.
To use the Dynamics 365 MCP Server from an MCP client, connect to the local MCP runtime and invoke the provided tools to perform common Dynamics 365 operations. You can get information about the authenticated user, retrieve accounts from Dynamics 365, fetch opportunities linked to specific accounts, and create or update accounts. Tools are exposed through the MCP server so you can integrate them into your prompts and automation workflows.
Prerequisites and initial setup are required before running the MCP server. Follow these concrete steps to get started.
# 1. Clone the repository
git clone https://github.com/your-repo/dynamics365-mcp-server.git
cd dynamics365-mcp-server
# 2. Install dependencies
npm install
# 3. Configure environment variables
# Create a .env file in the project root with the following values
CLIENT_ID=your-client-id
CLIENT_SECRET=your-client-secret
TENANT_ID=your-tenant-id
D365_URL=https://your-org.crm.dynamics.com
# 4. Compile TypeScript files
npm run build
# 5. Run MCP Server
node build\index.js
# You should see: Dynamics365 MCP server running on stdio...Configuration notes, troubleshooting tips, and testing guidance are provided below to help you operate the MCP server reliably.
Optional integration with Claude Desktop allows you to register your MCP server and access its tools directly from the Claude interface. The README includes a sample claude_desktop_config.json with a Dynamics365 entry that runs the MCP server via Node and passes the necessary environment variables.
Debugging tips include ensuring the .env file is correctly configured, confirming the Azure AD application has the required Dynamics 365 permissions, and validating that the Dynamics 365 instance is accessible from your environment.
Fetches information about the currently authenticated user.
Fetches all accounts from Dynamics 365.
Fetches opportunities associated with a given account.
Creates a new account in Dynamics 365.
Updates an existing account in Dynamics 365.