home / mcp / powerplatform mcp server
PowerPlatform Model Context Protocol server
Configuration
View docs{
"mcpServers": {
"michsob-powerplatform-mcp": {
"command": "powerplatform-mcp",
"args": [],
"env": {
"POWERPLATFORM_URL": "https://yourenvironment.crm.dynamics.com",
"POWERPLATFORM_CLIENT_ID": "YOUR_AZURE_CLIENT_ID",
"POWERPLATFORM_TENANT_ID": "YOUR_TENANT_ID",
"POWERPLATFORM_CLIENT_SECRET": "YOUR_AZURE_CLIENT_SECRET"
}
}
}
}You can deploy and run a PowerPlatform MCP Server to gain intelligent, context-aware access to Dataverse entities and records. This server exposes tools to explore metadata, build OData queries, map relationships, and generate AI-assisted data models, enabling powerful, integrated assistance for Power Platform development tasks.
To use the PowerPlatform MCP Server, run it with a compatible MCP client and interact with the available tools to retrieve entity metadata, fetch records, and build complex queries. You can leverage pre-defined prompts to get entity overviews, attribute details, query templates, and relationship maps. Use natural language requests or explicit tool invocations to guide the AI in your environment.
Prerequisites: Node.js installed on your machine. Ensure you have a supported MCP client that can communicate with the MCP server.
# Option 1: Install globally and run
npm install -g powerplatform-mcp
# Start the server
powerplatform-mcp
# Option 2: Run directly with npx
npx powerplatform-mcpConfigure your Power Platform connection details using the following environment variables before starting the server.
# 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-idIf you are developing or testing locally, follow these steps to clone, install, and run the project with your credentials.
# 1. Clone the repository and install dependencies
git clone https://github.com/michsob/powerplatform-mcp.git
cd powerplatform-mcp
npm install
# 2. Copy environment template and fill in credentials
cp .env.example .envThe server provides tools for entity metadata and records retrieval, plus prompts for rich, context-aware information. You can invoke prompts to obtain an ENTITY_OVERVIEW, ATTRIBUTE_DETAILS, QUERY_TEMPLATE, or RELATIONSHIP_MAP for a given entity.
Available tools let you retrieve metadata, attributes, records, and relationship information, as well as use pre-defined prompts to generate structured outputs.
# Example tool usage
# Get metadata for an entity
get-entity-metadata
# Get a specific attribute
get-entity-attribute
# Use a powerplatform prompt to get an ENTITY_OVERVIEW for the account entity
USE Prompts:
- ENTITY_OVERVIEW
- ATTRIBUTE_DETAILS
- QUERY_TEMPLATE
- RELATIONSHIP_MAPKeep credentials secure and limit access to the MCP server to trusted clients. Use environment variables to supply sensitive information and avoid hard-coding secrets in code.
If you encounter connection or authentication issues, verify your POWERPLATFORM_URL, CLIENT_ID, CLIENT_SECRET, and TENANT_ID. Ensure the MCP server process has network access to your Dataverse environment and that the Azure app has the required permissions.
Retrieve comprehensive metadata for a PowerPlatform entity including schema, display names, and key attributes.
Fetch all attributes/fields for a specified entity.
Retrieve details for a single attribute of an entity.
Obtain the relationships associated with a specific entity.
Access the global option sets available in the Dataverse environment.
Fetch a single record by entity name and ID.
Query multiple records using an OData filter expression.
Invoke predefined AI prompts to generate structured, context-rich outputs about entities.
Prompt type that provides a comprehensive overview of an entity.
Prompt type that gives detailed information about a specific attribute.
Prompt type that returns an OData query template for an entity.
Prompt type that produces a visual-like map of entity relationships.