PowerPlatform MCP Server is a tool that provides intelligent access to PowerPlatform/Dataverse entities and records. It offers rich entity metadata exploration, advanced OData query support, relationship mapping, and AI-assisted query building through a Model Context Protocol (MCP) interface.
You can install and run this tool in two ways:
npm install -g powerplatform-mcp
Then run it:
powerplatform-mcp
Run without installing:
npx powerplatform-mcp
Before running, set the following environment variables:
# PowerPlatform/Dataverse connection details
POWERPLATFORM_URL=https://yourenvironment.crm.dynamics.com
POWERPLATFORM_CLIENT_ID=your-azure-app-client-id
POWERPLATFORM_CLIENT_SECRET=your-azure-app-client-secret
POWERPLATFORM_TENANT_ID=your-azure-tenant-id
This MCP server works with MCP-compatible clients like Cursor, Claude App and GitHub Copilot. Once running, it exposes tools for retrieving PowerPlatform entity metadata and records.
get-entity-metadata
: Get metadata about a PowerPlatform entityget-entity-attributes
: Get attributes/fields of a PowerPlatform entityget-entity-attribute
: Get a specific attribute/field of a PowerPlatform entityget-entity-relationships
: Get relationships for a PowerPlatform entityget-global-option-set
: Get a global option set definitionget-record
: Get a specific record by entity name and IDquery-records
: Query records using an OData filter expressionuse-powerplatform-prompt
: Use pre-defined prompt templates for PowerPlatform entitiesThe server includes a prompts feature that provides formatted, context-rich information about PowerPlatform entities.
The use-powerplatform-prompt
tool supports the following prompt types:
// Example client code
await mcpClient.invoke("use-powerplatform-prompt", {
promptType: "ENTITY_OVERVIEW",
entityName: "account"
});
This will return a formatted overview of the account entity with details about its attributes, relationships, and usage.
await mcpClient.invoke("use-powerplatform-prompt", {
promptType: "ATTRIBUTE_DETAILS",
entityName: "account",
attributeName: "revenue"
});
This provides detailed information about the revenue attribute of the account entity.
await mcpClient.invoke("use-powerplatform-prompt", {
promptType: "QUERY_TEMPLATE",
entityName: "account"
});
Returns a template for building OData queries against the accounts entity with example filters.
await mcpClient.invoke("use-powerplatform-prompt", {
promptType: "RELATIONSHIP_MAP",
entityName: "contact"
});
Generates a visual map showing all relationships for the contact entity.
You can interact with AI assistants using natural language to leverage these prompts:
User: "Tell me about the Account entity in our PowerPlatform environment"
The assistant will use the ENTITY_OVERVIEW prompt to provide information about the Account entity.
User: "Help me write a query to find active accounts with revenue over $1M in California"
The assistant will use the QUERY_TEMPLATE prompt to help construct an appropriate OData query.
User: "How are Accounts and Contacts related in our system?"
The assistant will use RELATIONSHIP_MAP prompts to explain the connections between these entities.
User: "What kind of field is the revenue field on Account?"
The assistant will use the ATTRIBUTE_DETAILS prompt to provide specific information about the field.
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "powerplatform-mcp" '{"command":"npx","args":["powerplatform-mcp"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"powerplatform-mcp": {
"command": "npx",
"args": [
"powerplatform-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"powerplatform-mcp": {
"command": "npx",
"args": [
"powerplatform-mcp"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect