Enable SQL queries in Dataverse using MCP Server with Docker or dotnet tool for seamless AI integrations
The Dataverse MCP Server has been meticulously designed to provide seamless integration and enhanced capabilities for developers working on AI applications. This server acts as a bridge between Model Context Protocol (MCP) clients, such as Claude Desktop and GitHub Copilot, and the Dynamics 365 Data Environment, enabling powerful data access and manipulation right within the development lifecycle.
The Dataverse MCP Server offers an extensive list of capabilities that empower AI developers. It supports CRUD operations for Common Data Service entities, enables solutions management including creation, import, and export, provides robust plugin registration support, and facilitates direct SQL execution—all while adhering strictly to MCP protocol standards.
The diagram below outlines the flow of interaction between an AI application (Claude Desktop) and the Dataverse MCP Server, interacting with Data Environment resources:
graph TD
A[AI Application] -->|MCP Client| B[MCP Protocol]
B --> C[MCP Server]
C --> D[Data Source/Tool]
style A fill:#e1f5fe
style C fill:#f3e5f5
style D fill:#e8f5e8
This data architecture diagram provides a high-level overview of how the MCP protocol is implemented within the Dataverse environment, ensuring secure and efficient communication:
graph TD
A[Data Source Metadata] --> B[MCP Server]
B --> C[MCP Protocol Stack]
C --> D[AI Application Client]
E[Security & Authentication] --> F[MCP Server]
style A fill:#fde0df
style B fill:#d9e6e4
style C fill:#f6e2c1
style D fill:#ecebe3
style E fill:#efebeb
style F fill:#def1fa
Using Docker, you can quickly get up and running without setting up your environment from scratch.
1. Install Docker Desktop if not already installed.
2. Navigate to the Dataverse MCP Server root directory in a terminal.
3. Run `docker run -e AZURE_CLIENT_ID -e AZURE_CLIENT_SECRET -e AZURE_TENANT_ID -e DATAVERSE_ENVIRONMENT_URL -p 80:80 --name dataverse-mcp-server rajyraman/mcp-stdio-dataverse`.
4. Use the attached MCP client or API to interact with the server.
Installing the dotnet tool is a seamless way to run the MCP Server on supported platforms.
1. Ensure you have .NET SDK 9.x installed.
2. Install the Dataverse MCP Server as a dotnet tool by running `dotnet tool install -g Mcp.Dataverse.Stdio`.
3. Use the `.env` file for environment variable configuration.
4. Configure and use the server in your AI workflows with MCP clients or APIs.
MCP Client Interaction:
- User initiates a request to import a solution bundle.
- MCP Server validates the solution’s metadata and dependencies.
- Successful import triggers notifications back to the AI client for confirmation.
MCP Client Interaction:
- Developer requests registration of a new plugin on specific entities.
- MCP Server checks entity permissions and deploys the plugin if conditions are met.
- Success/failure updates are sent back to the developer via MCP protocol for further actions.
MCP Client | Resources | Tools | Prompts | Status |
---|---|---|---|---|
Claude Desktop | ✅ | ✅ | ✅ | Full Support |
Continue | ✅ | ❌ | ❌ | Limited Data Access Only |
Cursor | ❌ | ✅ | ❌ | Tools Only |
This matrix highlights compatibility and performance metrics across different MCP clients, ensuring developers choose the best fit for their use case.
AZURE_CLIENT_ID=aba9829f-6288-44d7-9168-53eca9a1f4a5
AZURE_CLIENT_SECRET=abcd
AZURE_TENANT_ID=2caa17e6-884b-473b-80c5-c05d8859a2fa
DATAVERSE_ENVIRONMENT_URL=https://abc.crm6.dynamics.com
DOCKER_CONTAINER=true
Does this server require Docker installation?
How do I secure environment variables in production?
Can this server handle multiple clients simultaneously?
Will the server work with both private and public Data Environments?
Is there a logging mechanism in place for debugging issues?
For more information on Model Context Protocol (MCP), visit the official ModelContextProtocol Documentation. Explore additional resources and join the community to stay updated about ongoing developments in MCP integrations.
Next-generation MCP server enhances documentation analysis with AI-powered neural processing and multi-language support
Learn to connect to MCP servers over HTTP with Python SDK using SSE for efficient protocol communication
Python MCP client for testing servers avoid message limits and customize with API key
Discover easy deployment and management of MCP servers with Glutamate platform for Windows Linux Mac
Learn how to use MCProto Ruby gem to create and chain MCP servers for custom solutions
Analyze search intent with MCP API for SEO insights and keyword categorization