The Dynamics 365 MCP Server enables interaction with Microsoft Dynamics 365 using the Model Context Protocol (MCP). With this server, you can:
- Retrieve authenticated user information (
get-user-info
) - Fetch all accounts from Dynamics 365 (
fetch-accounts
) - Retrieve opportunities associated with a specific account (
get-associated-opportunities
) - Create new accounts in Dynamics 365 (
create-account
) - Update existing accounts in Dynamics 365 using its ID and updated details (
update-account
)
Manages environment configuration for Dynamics 365 connection credentials including client ID, client secret, tenant ID, and service URL.
Provides version control for the codebase, allowing collaborative development through clone, branch, and pull request operations.
Hosts the repository for the MCP server code, enabling collaborative development and issue tracking.
Uses Node.js runtime environment (v16+) to execute the MCP server that connects to Dynamics 365.
Manages package dependencies for the project, including the Model Context Protocol SDK.
Displays status badges in the README showing Node.js version, TypeScript version, MCP status, and license information.
Implements the server using TypeScript 4.x for type-safe interaction with the Dynamics 365 APIs.
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:
1. Clone the Repository
2. Install Dependencies
3. Configure Environment Variables
Create a .env file in the root of the project and add the following variables:
4. Compile TypeScript Files
4. Run MCP Server
You should see the following output:
5. (Optional) Register your MCP Server with Claude Desktop
- Install Claude Desktop
- Navigate to Settings > Developer > Edit Config
- Edit claude_desktop_config.json
- Restart Claude Desktop
- Now you should be able to see the server tools in the prompt window
- Let's test a prompt by invoking tool - get-user-info
6. (Optional) Test tools using MCP Interceptor
- Run following command in terminal
- Go to 🔍 http://localhost:5173 🚀
- Now you can connect to server and terst all the tools!!
Debugging 🐛
If you encounter issues, ensure the following:
If you encounter issues, ensure the following:
- The .env file is properly configured.
- The Azure AD application has the necessary permissions for Dynamics 365 APIs.
- The Dynamics 365 instance is accessible from - your environment.
- You can also add debug logs in the code to trace issues. For example:
Contributing 🤝
Contributions are welcome! Feel free to submit a pull request or open an issue for any bugs or feature requests.
To contribute:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Commit your changes and submit a pull request.
- We appreciate your contributions! 😊
You must be authenticated.
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
A Model Context Protocol server that enables interaction with Microsoft Dynamics 365/ Power Platform from MCP clients ex. Claude Desktop, allowing users to retrieve, create, and update data through natural language.
Related MCP Servers
- -securityFlicense-qualityThis server provides a standardized framework using the Model Context Protocol (MCP) to seamlessly integrate and manage diverse tools, enabling features like Twitter automation, cryptocurrency updates, and ElizaOS interaction.Last updated -2Python
- -securityFlicense-qualityA Model Context Protocol server built with mcp-framework that allows users to create and manage custom tools for processing data, integrating with the Claude Desktop via CLI.Last updated -484TypeScript
- -securityAlicense-qualityA 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.Last updated -4661JavaScriptMIT License
- AsecurityAlicenseAqualityA Model Context Protocol server that enables Claude Desktop to interact with Microsoft Dynamics 365, allowing users to retrieve information, create and update accounts, and manage opportunities through natural language.Last updated -54TypeScriptMIT License