Home / MCP / Dataverse MCP Server

Dataverse MCP Server

Provides a Dataverse-focused MCP server for schema management, solution-context persistence, and WebAPI/PowerPages tooling.

typescript
Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
    "mcpServers": {
        "dataverse": {
            "command": "cmd",
            "args": [
                "/c",
                "node",
                "C:\\\\DEV\\\\projects\\\\dataverse-mcp\\\\build\\\\index.js"
            ],
            "env": {
                "DATAVERSE_URL": "https://yourorg.crm.dynamics.com",
                "DATAVERSE_CLIENT_ID": "your-client-id",
                "DATAVERSE_CLIENT_SECRET": "your-client-secret",
                "DATAVERSE_TENANT_ID": "your-tenant-id"
            }
        }
    }
}

You can deploy and manage Dataverse schema changes with this MCP server, which provides enterprise-grade tooling to create and modify tables, columns, relationships, option sets, and more. It also generates ready-to-use API calls and diagrams, supports solution-based context, and helps enforce governance across environments.

How to use

You interact with the MCP server through an MCP client or tooling layer that talks to a local or remote MCP server. Start by ensuring you have a running MCP server instance configured for Dataverse, then set a solution context so all new components use your publisher prefix. Use the tooling commands to create publishers, solutions, and schema objects, and leverage the WebAPI and PowerPages generators to produce ready-to-use calls and UI-ready code samples. You can export schemas and generate Mermaid diagrams to document your data model, and use the PowerPages features to integrate with portal sites.

Key actions you’ll perform include creating a publisher, creating a solution, setting the solution context, and then creating tables, columns, relationships, and option sets. After building your schema, you can export the solution schema to JSON, generate Mermaid ERD diagrams, and generate WebAPI calls for various Dataverse operations.

How to install

Prerequisites: you need Node.js and npm installed to build and run the MCP server locally. You also need access to a Dataverse environment and the proper Azure AD app registrations for authentication.

Follow these concrete steps to set up and run the MCP server locally:

1) Install dependencies and build the server

Configuration

The MCP server supports multiple configuration options for running in different environments. You can configure the server via environment variables or a configuration file. The example below shows a Windows-based runtime configuration for a local Dataverse server, using CMD to launch a Node.js process that runs the built MCP index.

{
  "mcpServers": {
    "dataverse": {
      "command": "cmd",
      "args": [
        "/c",
        "node",
        "C:\\DEV\\projects\\dataverse-mcp\\build\\index.js"
      ],
      "env": {
        "DATAVERSE_URL": "https://yourorg.crm.dynamics.com",
        "DATAVERSE_CLIENT_ID": "your-client-id",
        "DATAVERSE_CLIENT_SECRET": "your-client-secret",
        "DATAVERSE_TENANT_ID": "your-tenant-id"
      },
      "disabled": false,
      "alwaysAllow": [],
      "disabledTools": [],
      "timeout": 900
    }
  }
}

Security and access control

Set up an Application User in Dataverse and assign security roles appropriate for your development or production needs. Use roles to control who can perform schema operations versus data operations. Always follow the principle of least privilege and rotate credentials regularly.

Troubleshooting

If authentication fails, verify the Azure app registration and application user setup in Dataverse and ensure the client ID, secret, and tenant ID match what you configured in your MCP settings. For permission issues, confirm the correct roles are assigned to the application user and that the user is enabled.

Notes on usage patterns

Persisted solution context ensures you don’t have to re-enter prefixes after restarts. Use the WebAPI and PowerPages generators to produce ready-to-run calls and code samples that align with your current solution setup. Export complete schemas to JSON for documentation and diagram generation. Maintain clean separation between publishers and solutions to support multiple environments and teams.

Example Windows MCP configuration (exact snippet)

{
  "mcpServers": {
    "dataverse": {
      "command": "cmd",
      "args": [
        "/c",
        "node",
        "C:\\DEV\\projects\\dataverse-mcp\\build\\index.js"
      ],
      "env": {
        "DATAVERSE_URL": "https://yourorg.crm.dynamics.com",
        "DATAVERSE_CLIENT_ID": "your-client-id",
        "DATAVERSE_CLIENT_SECRET": "your-client-secret",
        "DATAVERSE_TENANT_ID": "your-tenant-id"
      },
      "disabled": false,
      "alwaysAllow": [],
      "disabledTools": [],
      "timeout": 900
    }
  }
}

PowerPages and schema visualization

Use the PowerPages WebAPI and configuration tools to manage table permissions, authentication context, and code-site integration. Generate PowerPages-specific API calls, manage site permissions, and export solution schemas to JSON for Mermaid diagrams.

Export and diagram features

Export the solution schema to JSON with filters for system vs. custom components, then generate Mermaid diagrams to visualize relationships and keys. This combination helps document your data model and prepare professional diagrams for stakeholders.

Available tools

create_dataverse_table

Create a new custom Dataverse table within the active solution context, with automatic publisher prefixing and schema association.

create_dataverse_column

Add a new column to a Dataverse table with supported data types and configuration.

set_solution_context

Set the active Dataverse solution context so all new components are added to that solution.

export_solution_schema

Export a complete JSON schema of the current Dataverse solution, including tables, columns, relationships, and option sets.

generate_mermaid_diagram

Generate a Mermaid ERD from an exported schema to visualize tables and relationships.

generate_webapi_call

Generate HTTP/WebAPI calls for Dataverse operations including CRUD, associations, and actions.