PowerPlatform Dataverse MCP server

Integrates with Microsoft PowerPlatform/Dataverse to enable intelligent access to entity metadata, attributes, relationships, and records with support for OData queries and context-rich prompts for data modeling and exploration.
Back to servers
Setup instructions
Provider
Michal Sobieraj
Release date
Mar 17, 2025
Language
TypeScript
Package
Stats
2.2K downloads
16 stars

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.

Installation

You can install and run this tool in two ways:

Option 1: Install globally

npm install -g powerplatform-mcp

Then run it:

powerplatform-mcp

Option 2: Run directly with npx

Run without installing:

npx powerplatform-mcp

Configuration

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

Usage

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.

Available Tools

  • get-entity-metadata: Get metadata about a PowerPlatform entity
  • get-entity-attributes: Get attributes/fields of a PowerPlatform entity
  • get-entity-attribute: Get a specific attribute/field of a PowerPlatform entity
  • get-entity-relationships: Get relationships for a PowerPlatform entity
  • get-global-option-set: Get a global option set definition
  • get-record: Get a specific record by entity name and ID
  • query-records: Query records using an OData filter expression
  • use-powerplatform-prompt: Use pre-defined prompt templates for PowerPlatform entities

MCP Prompts

The server includes a prompts feature that provides formatted, context-rich information about PowerPlatform entities.

Available Prompt Types

The use-powerplatform-prompt tool supports the following prompt types:

  1. ENTITY_OVERVIEW: Comprehensive overview of an entity
  2. ATTRIBUTE_DETAILS: Detailed information about a specific entity attribute
  3. QUERY_TEMPLATE: OData query template for an entity with example filters
  4. RELATIONSHIP_MAP: Visual map of entity relationships

Example Usage

Entity Overview Prompt

// 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.

Attribute Details Prompt

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.

Query Template Prompt

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.

Relationship Map Prompt

await mcpClient.invoke("use-powerplatform-prompt", {
  promptType: "RELATIONSHIP_MAP",
  entityName: "contact"
});

Generates a visual map showing all relationships for the contact entity.

Interaction Examples

You can interact with AI assistants using natural language to leverage these prompts:

Entity Understanding

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.

Building Queries

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.

Understanding Relationships

User: "How are Accounts and Contacts related in our system?"

The assistant will use RELATIONSHIP_MAP prompts to explain the connections between these entities.

Field/Attribute Investigation

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.

How to install this MCP server

For Claude Code

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.

For Cursor

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.

Adding an MCP server to Cursor globally

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"
            ]
        }
    }
}

Adding an MCP server to a project

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.

How to use the MCP server

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.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.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

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later