Xrm/Power Platform/Dataverse MCP for devs, Azure CLI auth, Web API and multi-environment support
Lightweight MCP server for day-to-day Dataverse and Power Platform development.
Connect your agents to multiple Dataverse environments using your existing Azure CLI identity. The server exposes a thin, agent-friendly layer over the Web API for data, metadata, solutions, components, troubleshooting, and development tasks.
Agent → MCP → Azure CLI identity → Dataverse Web API
Add the server to .vscode/mcp.json:
{
"servers": {
"dataverse-dev": {
"command": "npx",
"args": [ "-y", "jaj-dataverse-dev-mcp" ]
}
}
}
Save the file and press Start. The first start may take some time while npx downloads the package.
Sign in with Azure CLI:
az login
Create environments.json in your project root with the environments you need:
{
"environments": {
"dev": {
"url": "https://org8ffb6d07.crm.dynamics.com/",
"allowWrite": true
}
}
}
Open Copilot and try:
That's it!
Other MCP-compatible agents follow the same pattern: run jaj-dataverse-dev-mcp over stdio and provide access to your local Azure CLI session and connection configuration.
Add the server to claude_desktop_config.json:
%APPDATA%\Claude\claude_desktop_config.json~/Library/Application Support/Claude/claude_desktop_config.json{
"mcpServers": {
"dataverse-dev": {
"command": "npx",
"args": ["-y", "jaj-dataverse-dev-mcp"],
"env": { "DATAVERSE_ENVIRONMENTS_PATH": "C:/Users/you/project/environments.json" }
}
}
}
Save the file and fully quit and restart Claude Desktop (config changes aren't picked up by simply closing the window).
Continue from "Sign in with Azure CLI..." in Quick Start for VS Code + GitHub Copilot
There are already several Dataverse MCP implementations, including Microsoft's own tooling.
This project grew out of day-to-day development work where agents frequently needed capabilities beyond the available specialized tools. In many cases, the agent could solve the task successfully by constructing Dataverse Web API requests directly.
This MCP embraces that approach.
Instead of hiding Dataverse behind a large abstraction, it provides broad access to the Web API through a thin wrapper.
It is also designed for developers and consultants who regularly move between projects, customers, and Dataverse environments.
One MCP server can work with multiple Dataverse environments while using existing Azure CLI identity. No separate app registration, client ID, or client secret is required.
# Authentication is based on your current Azure CLI identity:
az login
# Useful variants:
az login --tenant <tenant-id> # Specific tenant, if your tenant is not the default
az login --allow-no-subscriptions # Tenant without subscriptions
az login --use-device-code # Remote/headless environments
# To inspect the currently active Azure CLI account:
az account show
Environments are configured in environments.json in the project root and identified by friendly names such as dev, test, prod.
Agents use these names when selecting which Dataverse environment to work with.
If an environment is in a different tenant than the default Azure CLI tenant, add a tenantId for that environment.
DATAVERSE_ENVIRONMENTS_PATH can be used to override the config file path at runtime.
Example:
{
"environments": {
"dev": {
"url": "https://YOUR-DEV.crm.dynamics.com/",
"allowWrite": true
},
"test": {
"url": "https://YOUR-TEST.crm4.dynamics.com",
"allowWrite": false
},
"prod": {
"url": "https://YOUR-PROD.crm4.dynamics.com",
"allowWrite": false,
"tenantId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
}
}
For better agent behavior, add Dataverse-specific instructions to the project where you use the MCP.
Copy docs/examples/copilot-instructions.md to .github/copilot-instructions.md in the workspace where you use the MCP server, then customize it for your project:
YOUR-dev, YOUR-test, and YOUR-prod with the environment names from environments.jsonYOUR_DEFAULT_SOLUTION with the unique name of the primary Dataverse solutionCommit the customized file to the project repository so all contributors use the same guidance.
The package can also be launched manually with stdio as default transport:
npx -y jaj-dataverse-dev-mcp
For development or clients that use Streamable HTTP add --http.
Although the MCP is intentionally a thin wrapper around the Dataverse Web API, it can support a broad range of development and troubleshooting tasks, for example:
This makes it useful for both direct development tasks and agent-driven workflows where the agent inspects Dataverse, decides on the next action, and performs it through the MCP.
Source-derived launch command. Check the maintainer’s required arguments and credentials before running:
npx -y jaj-dataverse-dev-mcpMerge this template into ~/Library/Application Support/Claude/claude_desktop_config.json. Keep existing servers. Add any arguments, credentials, and permissions required by the maintainer; this template has not been install-tested.
{
"mcpServers": {
"io-github-jjohnsen-jaj-dataverse-dev-mcp": {
"command": "npx",
"args": [
"-y",
"jaj-dataverse-dev-mcp"
]
}
}
}Restart Claude Desktop completely for changes to take effect. Confirm the server appears connected in the client’s tool list, then try a read-only example from its documentation.
Claude Desktop setup referencejaj-dataverse-dev-mcpnpmJAJ Dataverse Dev MCP works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.
~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.~/.cursor/mcp.jsonRestart Cursor for changes to take effect..vscode/mcp.jsonReload VS Code window for changes to take effect.~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect..mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.