PowerPlatform MCP
PowerPlatform MCP / CLI
A Model Context Protocol (MCP) server and standalone CLI for querying and configuring PowerPlatform / Dataverse environments. Supports multiple environments, entity metadata, records, plugins, flows, solutions, workflows, business rules, security roles, custom APIs, web resources, and more — including write operations for automated environment setup.
Why MCP + CLI?
MCP integrates directly with AI clients (Claude, Cursor, GitHub Copilot) for interactive, conversational exploration of your environments.
CLI writes results to a file system cache instead of returning them inline. MCP tool responses are bound by the AI client's context window, which can truncate or degrade results when querying environments with hundreds of entities, flows, or plugin steps. The CLI avoids this limitation by persisting full results to disk, making them available for follow-up analysis without context pressure. Both interfaces share the same tools and capabilities.
Related MCP server: Dataverse MCP Server
Installation
Requires Node.js 22+ (< 25).
MCP Server
npm install -g powerplatform-mcp
# or
npx powerplatform-mcpCLI
npm install -g powerplatform-cli
# or
npx powerplatform-cliDocker
# MCP Server
docker pull ghcr.io/michsob/powerplatform-mcp
docker run --env-file .env ghcr.io/michsob/powerplatform-mcp
# CLI
docker pull ghcr.io/michsob/powerplatform-cli
docker run --env-file .env ghcr.io/michsob/powerplatform-cli entity-attributes accountConfiguration
The tool supports multiple environments. Define them via environment variables:
POWERPLATFORM_ENVIRONMENTS=DEV,UAT,PROD
# For each environment, set:
POWERPLATFORM_DEV_URL=https://dev-org.crm.dynamics.com
POWERPLATFORM_DEV_CLIENT_ID=your-client-id
POWERPLATFORM_DEV_CLIENT_SECRET=your-client-secret
POWERPLATFORM_DEV_TENANT_ID=your-tenant-id
POWERPLATFORM_UAT_URL=https://uat-org.crm.dynamics.com
POWERPLATFORM_UAT_CLIENT_ID=...
POWERPLATFORM_UAT_CLIENT_SECRET=...
POWERPLATFORM_UAT_TENANT_ID=...For local development, copy .env.example to .env and fill in your credentials.
MCP Server
The MCP server is designed for AI-powered clients (Claude, Cursor, GitHub Copilot).
Available MCP Tools (58)
All tools accept an optional environment parameter to target a specific environment (defaults to the first configured).
Entity
Tool | Description | Required Params | Optional |
| Get entity metadata |
| |
| List all attributes/fields |
| |
| Get a specific attribute |
| |
| Get 1:N and N:N relationships |
| |
| Create a Single Line of Text column |
|
|
| List alternate keys on an entity |
| |
| Create an alternate key |
|
|
Records
Tool | Description | Required Params | Optional |
| Get a record by ID |
| |
| OData query |
|
|
Plugins
Tool | Description | Required Params | Optional |
| List plugin assemblies |
| |
| Assembly with types, steps, images |
|
|
| Plugins executing on an entity |
|
|
| Plugin trace logs |
| |
| All SDK message processing steps |
| |
| Look up a plugin type by class name |
| |
| Look up an SDK message by name |
| |
| Register a plugin step |
|
|
Flows (Power Automate)
Tool | Description | Required Params | Optional |
| List cloud flows (smart filtering) |
| |
| Search workflows and flows |
| |
| Full definition or parsed summary |
|
|
| Flow run history |
|
|
| Run details with action-level errors |
| |
| Cancel a running/waiting run |
| |
| Retry a failed run |
| |
| Batch health scan (success rates) |
| |
| Lightweight flow inventory |
|
Solutions
Tool | Description | Required Params | Optional |
| List non-readonly publishers | ||
| List visible solutions | ||
| Get solution by unique name |
| |
| List components in a solution |
| |
| Export solution (base64) |
|
|
| Add a component to a solution |
|
|
| Publish entity or all customizations |
|
Workflows (Classic)
Tool | Description | Required Params | Optional |
| List classic workflows |
| |
| XAML definition or summary |
|
|
| Background, BPFs, actions, on-demand |
|
Business Rules
Tool | Description | Required Params | Optional |
| List business rules |
| |
| Business rule with XAML |
|
Option Sets
Tool | Description | Required Params |
| Get a global option set definition |
|
Configuration
Tool | Description | Required Params | Optional |
| Connection references |
| |
| Environment variable definitions + values |
| |
| Create an environment variable definition |
|
|
| Set or update an environment variable value |
|
|
Custom APIs
Tool | Description | Required Params | Optional |
| List Custom API definitions |
| |
| Get a Custom API by unique name |
| |
| Create a Custom API definition |
|
|
| List response properties |
| |
| Create a response property |
|
|
| List request parameters |
| |
| Create a request parameter |
|
|
Web Resources
Tool | Description | Required Params | Optional |
| List web resources |
| |
| Get a web resource by name |
| |
| Upload a new web resource |
|
|
Security Roles
Tool | Description | Required Params | Optional |
| List customizable security roles |
| |
| Privileges for a role |
|
|
Dependencies
Tool | Description | Required Params |
| Dependencies blocking deletion |
|
| Check if a component can be deleted |
|
Service Endpoints
Tool | Description | Optional |
| Service Bus, webhooks, Event Hub, Event Grid |
|
MCP Prompts
Prompt | Description | Required Args |
| Entity overview with key attributes and relationships |
|
| Detailed attribute info (type, format, requirements) |
|
| OData query template with example filters |
|
| Complete 1:N and N:N relationship map |
|
CLI
Same tools as the MCP server, but results are cached to the file system for full-fidelity output on large data sets.
Global Option
--env <name> — target environment (defaults to first configured).
Commands
Entity
entity-metadata <entityName>
entity-attributes <entityName>
entity-attribute <entityName> <attributeName>
entity-relationships <entityName>
entity-keys <entityName>
create-entity <schemaName> <displayName> <displayCollectionName> [--primary-name-schema <name>] [--primary-name-display <name>] [--description <desc>] [--ownership <UserOwned|OrganizationOwned>] [--has-activities] [--has-notes] [--solution <name>]
create-entity-string-attribute <entityName> <schemaName> <displayName> [--max-length <n>] [--required-level <level>] [--description <desc>] [--solution <name>]
create-entity-memo-attribute <entityName> <schemaName> <displayName> [--max-length <n>] [--required-level <level>] [--description <desc>] [--solution <name>]
create-entity-integer-attribute <entityName> <schemaName> <displayName> [--min <n>] [--max <n>] [--required-level <level>] [--description <desc>] [--solution <name>]
create-entity-decimal-attribute <entityName> <schemaName> <displayName> [--precision <n>] [--min <n>] [--max <n>] [--required-level <level>] [--description <desc>] [--solution <name>]
create-entity-money-attribute <entityName> <schemaName> <displayName> [--precision-source <0|1|2>] [--precision <n>] [--min <n>] [--max <n>] [--required-level <level>] [--description <desc>] [--solution <name>]
create-entity-boolean-attribute <entityName> <schemaName> <displayName> [--true-label <label>] [--false-label <label>] [--default-value <true|false>] [--required-level <level>] [--description <desc>] [--solution <name>]
create-entity-datetime-attribute <entityName> <schemaName> <displayName> [--format <DateOnly|DateAndTime>] [--behavior <UserLocal|DateOnly|TimeZoneIndependent>] [--required-level <level>] [--description <desc>] [--solution <name>]
create-entity-picklist-attribute <entityName> <schemaName> <displayName> [-o <value:label>]... [--required-level <level>] [--description <desc>] [--solution <name>]
create-entity-lookup <referencingEntity> <referencedEntity> <relationshipSchemaName> <lookupSchemaName> <displayName> [--required-level <level>] [--description <desc>] [--cascade-delete <NoCascade|RemoveLink|Restrict|Cascade>] [--solution <name>]
create-entity-alternate-key <entityName> <schemaName> <displayName> <keyAttributes...> [--solution <name>]
delete-entity-attribute <entityName> <attributeName>Records
record <entityNamePlural> <recordId>
query-records <entityNamePlural> <filter> [--max <n>]
create-record <entityNamePlural> <jsonBody>
update-record <entityNamePlural> <recordId> <jsonBody>
delete-record <entityNamePlural> <recordId>
associate-records <entityNamePlural> <recordId> <navigationProperty> <relatedEntityNamePlural> <relatedRecordId>
disassociate-records <entityNamePlural> <recordId> <navigationProperty> [relatedRecordId]Plugins
plugin-assemblies [--include-managed] [--max <n>]
plugin-assembly <assemblyName> [--include-disabled]
plugin-packages [--include-managed] [--max <n>]
plugin-type <typeName>
entity-pipeline <entityName> [--message <msg>] [--include-disabled]
plugin-trace-logs [--entity <name>] [--message <msg>] [--correlation-id <id>] [--step-id <id>] [--hours <n>] [--max <n>] [--exceptions-only]
all-plugin-steps [--include-disabled] [--max <n>]
sdk-message <messageName>
register-plugin-package <filePath> [--pkg-version <version>] [--solution <name>]
update-plugin-package <filePath> --plugin-package-id <id> [--pkg-version <version>]
create-plugin-step <name> <pluginTypeId> <sdkMessageId> [--stage <n>] [--mode <n>] [--rank <n>] [--supported-deployment <n>] [--description <desc>] [--configuration <cfg>] [--message-filter-id <id>] [--solution <name>]
create-plugin-step-image <stepId> [--name <name>] [--entity-alias <alias>] [--image-type <0|1|2>] [--message-property-name <name>] [--attributes <csv>]Flows
flows [--active] [--name <contains>] [--include-managed] [--max <n>]
flow-definition <flowId> [--summary]
flow-inventory [--max <n>]
flow-runs <flowId> [--status <s>] [--after <iso>] [--before <iso>] [--max <n>]
flow-run-details <flowId> <runId>
flow-health [--days <n>] [--max-runs <n>] [--max-flows <n>] [--active]
search-workflows [--name <name>] [--entity <entity>] [--category <n>] [--active] [--max <n>]
create-cloud-flow <clientDataFile> [--primary-entity <entity>] [--solution <name>]
activate-flow <flowId>
deactivate-flow <flowId>Solutions
solutions
solution <uniqueName>
solution-components <uniqueName>
publishers
add-solution-component <solutionUniqueName> <componentId> <componentType> [--add-required]
publish-customizations [--entity <logicalName>]Workflows
workflows [--active] [--max <n>]
workflow-definition <workflowId> [--summary]
ootb-workflows [--categories <0,1,2,3,4>]Business Rules
business-rules [--active] [--max <n>]
business-rule <workflowId>Option Sets
optionset <optionSetName>Dependencies
check-dependencies <componentId> <componentType>Configuration
connection-references [--managed-only] [--has-connection] [--no-connection] [--inactive] [--max-records <n>]
create-connection-reference <logicalName> <displayName> <connectorId> [--description <desc>] [--solution <name>]
environment-variables [--managed-only] [--max-records <n>]
create-environment-variable <schemaName> <displayName> [--type <type>] [--default-value <val>] [--description <desc>] [--solution <name>]
set-environment-variable-value <definitionId> <value> [--existing-value-id <id>]Custom APIs
custom-apis [--include-managed] [--max <n>]
custom-api <uniqueName>
create-custom-api <uniqueName> <displayName> [--binding-type <n>] [--bound-entity <name>] [--is-function] [--is-private] [--processing-type <n>] [--plugin-type-id <id>] [--plugin-type-name <name>] [--description <desc>] [--solution <name>]
custom-api-response-properties <customApiId>
create-custom-api-response-property <customApiId> <uniqueName> <displayName> [--type <n>] [--description <desc>] [--solution <name>]
custom-api-request-parameters <customApiId>
create-custom-api-request-parameter <customApiId> <uniqueName> <displayName> [--type <n>] [--description <desc>] [--optional] [--solution <name>]Web Resources
web-resources [--type <n>] [--name <contains>] [--max <n>]
web-resource <name>
create-web-resource <name> <displayName> <filePath> [--type <n>] [--description <desc>] [--solution <name>]
set-entity-icon <entityName> <svgFilePath> [--solution <name>] [--web-resource-name <name>] [--display-name <name>] [--no-publish]Forms & Views
entity-forms <entityName> [--type <n>]
entity-form-fields <formId>
add-form-field <entityName> <formId> <attributeName>
remove-form-field <entityName> <formId> <attributeName>
entity-views <entityName>
add-view-column <entityName> <viewId> <attributeName> [--width <n>]
set-view-columns <entityName> <viewId> <columns...> [--order-by <attr>] [--desc]
remove-view-column <entityName> <viewId> <attributeName>PAC Integration
pac-auth Authenticate pac CLI using environment credentials
generate-models <outdirectory> [--settings <path>] [--entities <filter>] [--namespace <ns>]
deploy-plugin <pluginFile> --plugin-id <id> [--type <Nuget|Assembly>] [--configuration <config>]Security Roles
security-roles [--solution <name>] [--include-system] [--include-privileges] [--max-records <n>]
security-role-privileges <roleId> [--entity <name>] [--access-right <type>]Service Endpoints
service-endpoints [--max <n>]Development
git clone https://github.com/michsob/powerplatform-mcp.git
cd powerplatform-mcp
npm install
cp .env.example .env # fill in credentials
npm run build
npm run inspector # test with MCP InspectorReleasing
To publish a new version:
Update
versioninpackage.jsonCommit the change to
mainCreate and push a version tag:
git tag v1.0.2 git push origin v1.0.2
GitHub Actions will automatically publish:
Package | npm | GitHub Packages | Docker (GHCR) |
MCP Server |
|
|
|
CLI |
|
|
|
npm publishing uses Trusted Publishing (OIDC) — no tokens or secrets needed. GitHub Packages and GHCR use the built-in GITHUB_TOKEN automatically.
License
MIT
Available Tools
38 toolscancel-flow-runCancel Flow RunA
Cancel a running or waiting flow run. Cannot cancel flows already in a terminal state (Succeeded, Failed, Cancelled).
Inputs: flowId (required), runId (required), environment. Returns: success, flowId, runId, previousStatus
check-component-dependenciesCheck Component DependenciesA
Check dependencies for a PowerPlatform component before deletion. Returns all components that depend on the specified component.
Inputs: componentId (required), componentType (required), environment. Returns: componentId, componentType, dependencies
check-delete-eligibilityCheck Delete EligibilityA
Check if a PowerPlatform component can be safely deleted. Returns whether deletion is allowed and lists blocking dependencies.
Inputs: componentId (required), componentType (required), environment. Returns: componentId, componentType, canDelete, dependencies
export-solutionExport SolutionA
Export a solution as a base64-encoded package. This is a read-only operation that serializes the solution.
Inputs: solutionName (required), managed, environment. Returns: solutionName, exportResult
get-all-plugin-stepsGet All Plugin StepsC
Get all plugin SDK message processing steps across all assemblies in the environment
Inputs: includeDisabled, maxRecords, environment.
get-business-ruleGet Business RuleB
Get a specific business rule with its complete XAML definition
Inputs: workflowId (required), environment. Returns: workflowid, name, description, state, +12 more
get-business-rulesGet Business RulesC
Get all business rules in the environment
Inputs: activeOnly, maxRecords, environment. Returns: totalCount, businessRules
get-connection-referencesGet Connection ReferencesB
Get connection references in the PowerPlatform environment with optional filtering by managed status, connection presence, and active state
Inputs: maxRecords, managedOnly, hasConnection, inactive, +1 more. Returns: connectionReferences
get-entity-attributeGet Entity AttributeC
Get a specific attribute/field of a PowerPlatform entity
Inputs: entityName (required), attributeName (required), environment. Returns: entityName, attributeName, attribute
get-entity-attributesGet Entity AttributesC
Get attributes/fields of a PowerPlatform entity
Inputs: entityName (required), environment. Returns: entityName, attributes
get-entity-metadataGet Entity MetadataC
Get metadata about a PowerPlatform entity
Inputs: entityName (required), environment. Returns: entityName, metadata
get-entity-plugin-pipelineGet Entity Plugin PipelineA
Get all plugins that execute on a specific entity, organized by message and stage
Inputs: entityName (required), messageFilter, includeDisabled, environment. Returns: entity, messages, steps, executionOrder
get-entity-relationshipsGet Entity RelationshipsB
Get relationships (one-to-many and many-to-many) for a PowerPlatform entity
Inputs: entityName (required), environment. Returns: entityName, relationships
get-environment-variablesGet Environment VariablesB
Get environment variable definitions and their current values from the PowerPlatform environment
Inputs: maxRecords, managedOnly, environment. Returns: environmentVariables
get-flow-definitionGet Flow DefinitionB
Get a Power Automate flow with its complete definition or a parsed summary of triggers, actions, and connectors
Inputs: flowId (required), summary, environment. Returns: name, flowDefinition
get-flow-inventoryGet Flow InventoryA
Get complete inventory of all cloud flows (name, state, modified date). Lighter than scan-flow-health as it does not fetch run history.
Inputs: maxRecords, environment.
get-flow-run-detailsGet Flow Run DetailsA
Get detailed flow run information including action-level outputs and errors. For failed actions, fetches detailed error messages.
Inputs: flowId (required), runId (required), environment. Returns: flowId, status, actionsSummary, failedActionErrors
get-flow-runsGet Flow RunsC
Get flow run history for a specific Power Automate flow
Inputs: flowId (required), status, startedAfter, startedBefore, +2 more. Returns: flowId, totalCount, hasMore, runs
get-flowsGet FlowsB
Get Power Automate cloud flows with smart filtering (excludes system, Copilot Sales, and Customer Insights flows by default)
Inputs: activeOnly, maxRecords, excludeCustomerInsights, excludeSystem, +3 more. Returns: totalCount, hasMore, flows
get-global-option-setGet Global Option SetC
Get a global option set definition by name
Inputs: optionSetName (required), environment. Returns: optionSetName, optionSet
get-ootb-workflowsGet OOTB WorkflowsA
Get all non-cloud-flow workflows: background workflows, business rules, actions, BPFs, on-demand workflows
Inputs: maxRecords, categories, environment.
get-plugin-assembliesGet Plugin AssembliesC
Get all plugin assemblies in the environment
Inputs: includeManaged, maxRecords, environment. Returns: totalCount, assemblies
get-plugin-assembly-completeGet Plugin Assembly CompleteB
Get a plugin assembly by name with all related plugin types, steps, and images
Inputs: assemblyName (required), includeDisabled, environment. Returns: assembly, pluginTypes, steps, validation
get-plugin-trace-logsGet Plugin Trace LogsC
Get plugin trace logs with filtering options
Inputs: entityName, messageName, correlationId, pluginStepId, +4 more. Returns: totalCount, logs
get-publishersGet PublishersA
Get all non-readonly publishers in the PowerPlatform environment
Inputs: environment. Returns: publishers
get-recordGet RecordC
Get a specific record by entity name (plural) and ID
Inputs: entityNamePlural (required), recordId (required), environment. Returns: entityNamePlural, recordId, record
get-security-role-privilegesGet Security Role PrivilegesC
Get privileges assigned to a specific security role, optionally filtered by entity or access right
Inputs: roleId (required), entityFilter, accessRightFilter, environment. Returns: roleId, privileges
get-security-rolesGet Security RolesA
Get security roles in the PowerPlatform environment, filtered to unmanaged or customizable roles. Supports solution scoping and optional privilege details.
Inputs: solutionUniqueName, excludeSystemRoles, maxRecords, includePrivileges, +1 more. Returns: roles
get-service-endpointsGet Service EndpointsC
Get all service endpoints (Service Bus, webhooks, Event Hub, Event Grid)
Inputs: maxRecords, environment.
get-solutionGet SolutionC
Get a specific solution by its unique name
Inputs: uniqueName (required), environment. Returns: uniqueName, solution
get-solution-componentsGet Solution ComponentsB
Get all components in a solution, ordered by component type
Inputs: solutionUniqueName (required), environment. Returns: solutionUniqueName, components
get-solutionsGet SolutionsA
Get all visible solutions in the PowerPlatform environment, ordered by creation date
Inputs: environment. Returns: solutions
get-workflow-definitionGet Workflow DefinitionB
Get a specific classic workflow with its complete XAML definition or a structured summary
Inputs: workflowId (required), summary, environment.
get-workflowsGet WorkflowsC
Get all classic Dynamics workflows in the environment
Inputs: activeOnly, maxRecords, environment. Returns: totalCount, hasMore, requestedMax, workflows
query-recordsQuery RecordsC
Query records using an OData filter expression
Inputs: entityNamePlural (required), filter (required), maxRecords, environment. Returns: entityNamePlural, filter, count, records
resubmit-flow-runResubmit Flow RunB
Resubmit/retry a failed flow run using the original trigger inputs
Inputs: flowId (required), runId (required), environment. Returns: success, flowId, originalRunId, newRunId, +1 more
scan-flow-healthScan Flow HealthA
Batch-scan all Power Automate cloud flows for health metrics. Fetches run history for each flow and computes success rates, failure counts. WARNING: batch operation that may take several minutes.
Inputs: daysBack, maxRunsPerFlow, maxFlows, activeOnly, +1 more.
search-workflowsSearch WorkflowsB
Search workflows (both classic workflows and Power Automate flows) by name, entity, description, category, or state
Inputs: name, primaryEntity, description, category, +4 more. Returns: totalCount, hasMore, workflows
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 38 tools
Most tools have distinct purposes targeting specific PowerPlatform components like flows, solutions, entities, plugins, and workflows, with clear naming that minimizes overlap. However, some tools like 'get-flows', 'get-flow-inventory', and 'scan-flow-health' could cause minor confusion as they all retrieve flow information but with different scopes or detail levels, requiring careful reading of descriptions.
Tool names follow a highly consistent verb_noun pattern throughout, such as 'get-flow-runs', 'export-solution', and 'query-records'. All tools use snake_case without deviation, and verbs like 'get', 'export', 'cancel', and 'scan' are applied predictably across the set, making the naming scheme easy to understand and navigate.
With 38 tools, the count is borderline high for a single server, suggesting potential over-scoping or fragmentation. While PowerPlatform is a broad domain, this many tools might overwhelm agents and indicate that some could be consolidated (e.g., multiple 'get' tools for similar entities). A more focused set of 15-25 tools would likely improve usability without losing functionality.
The tool set provides comprehensive coverage for PowerPlatform operations, including CRUD-like actions (e.g., 'export-solution', 'query-records'), monitoring ('scan-flow-health', 'get-flow-run-details'), and management tasks ('cancel-flow-run', 'check-delete-eligibility'). It spans key areas like flows, solutions, entities, plugins, and workflows with no obvious gaps, enabling agents to handle most common scenarios in this domain.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
The Cortex MCP server provides read-only access to real-time engineering context from the Cortex developer portal, allowing AI coding assistants to answer natural language questions about your organization's catalog (microservices, libraries, domains, teams, infrastructure), scorecards (engineering standards and best practices), initiatives (goals and deadlines), and Engineering Intelligence metrics. It includes tools for querying documentation, tracking personal entities, and accessing AI-assisted insights across the entire Cortex ecosystem.
Official Microsoft MCP Server to query Microsoft Entra data using natural language
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
Related MCP Servers
- AlicenseBqualityDmaintenanceA Model Context Protocol server that enables interaction with Microsoft Dynamics 365 CRM from Claude Desktop, allowing users to retrieve, create, and update CRM data through natural language.522MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables CRUD operations and querying on Microsoft Dataverse through natural language.MIT
- AlicenseAqualityCmaintenanceModel Context Protocol (MCP) server for Microsoft Dynamics 365 Business Central. Provides AI assistants with direct access to Business Central data through properly formatted API v2.0 calls.610MIT
- AlicenseAqualityDmaintenanceProvides intelligent access to PowerPlatform/Dataverse entities and records, enabling entity metadata exploration, OData querying, relationship mapping, and AI-assisted query building through MCP.8MIT