# Dataverse Mcp

> Dataverse MCP (Model Context Protocol) Integration. Use when: querying Dataverse data conversationally, Copilot Studio tool integration, schema discovery in constrained environments, live data validation during development.

- **Type:** Skill
- **Install:** `agentstack add skill-korchard333-claude-power-platform-community-dataverse-mcp`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [korchard333](https://agentstack.voostack.com/s/korchard333)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [korchard333](https://github.com/korchard333)
- **Source:** https://github.com/korchard333/claude-power-platform-community/tree/main/.claude/skills/dataverse-mcp

## Install

```sh
agentstack add skill-korchard333-claude-power-platform-community-dataverse-mcp
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Skill: Dataverse MCP (Model Context Protocol) Integration

## When to Use

Use MCP for conversational data operations, schema discovery, and Copilot Studio integration. Use direct Web API for complex builds, batch operations, and solution management.

Trigger this skill when:
- Querying Dataverse data conversationally during development sessions
- Integrating Dataverse as a tool in Copilot Studio agents
- Schema discovery in constrained environments (e.g., Claude Code, VS Code agents)
- Live data validation during development
- Configuring or setting up MCP servers for AI-assisted Dataverse development

---

## Decision Matrix: MCP vs Web API

Before choosing MCP, understand when it is the right tool versus direct Web API calls.

| Capability | MCP Server | Direct Web API | Winner |
|---|---|---|---|
| **Read table schema** | describe_table, list_tables | GET EntityDefinitions | MCP -- conversational, lower effort |
| **Query records** | read_query, Search, Fetch tools | GET entityset?$filter=... | MCP -- natural language driven |
| **Create/update records** | create_record, update_record, delete_record | POST/PATCH/DELETE with full control | Web API -- more control, batch support |
| **Create/modify tables** | Create Table, Update Table, Delete Table | POST EntityDefinitions | Web API -- more control over metadata payloads |
| **Create solution components** | Not supported | Solution API + Web API | Web API -- MCP has no solution tools |
| **Bulk operations** | Not supported | ExecuteMultiple, batch | Web API -- MCP is single-record |
| **Copilot Studio integration** | Native tool pattern (MCP onboarding wizard) | Custom connector required | MCP -- purpose-built for agents |
| **Token efficiency** | Higher per-call overhead | Lower, direct HTTP | Web API -- MCP adds protocol layer |
| **Auth complexity** | Azure App Registration + MCP client enablement | Azure App Registration | Tie |
| **Real-time dev feedback** | Conversational loop | Manual HTTP calls | MCP -- interactive workflow |

**Rule of thumb:** MCP now supports CRUD and basic DDL operations, but Web API gives full control over metadata payloads, batch operations, and solution management. Use MCP for conversational development and Copilot Studio integration. Use Web API (via the `dataverse-web-api` skill) for complex builds, bulk operations, and CI/CD scripts.

---

## Overview

The Dataverse MCP server exposes Dataverse operations as MCP tools, enabling AI assistants to:
- Query table metadata (tables, columns, relationships)
- Create, read, update, and delete records
- Create, update, and delete tables (DDL operations)
- Search across Dataverse data using Dataverse Search
- Execute FetchXML queries via the Fetch tool
- Validate schemas against live environments
- Generate accurate code based on real schema definitions
- Serve as native tools for Copilot Studio agents

---

## MCP Server Options

### Option 1: Microsoft's Official Dataverse MCP Server (GA)

Microsoft's first-party, production-grade MCP server for Dataverse. Generally available and supported by Microsoft.

**Supported tools (GA):** create_record, describe_table, list_tables, read_query, update_record, Create Table, Update Table, Delete Table, Delete Record, Search, Fetch

**Preview tools (via `/api/mcp_preview`):** Additional tools available when preview features are enabled in Power Platform admin center.

**Auth:** Azure App Registration (client credentials flow)

**Cost/Licensing:** Metered since December 15, 2025. The Search tool is billed at the Tenant graph grounding Copilot Credit rate. Other tools (describe_table, read_query, create_record, etc.) are billed at the Text and generative AI tools (basic) per 10 response Copilot Credit rate. License exceptions: Dynamics 365 Premium and M365 Copilot per-user license holders are exempt from metering. Review your tenant's Power Platform billing configuration before enabling in production.

> **Note:** Verify current metering rates at [Copilot Studio billing rates](https://learn.microsoft.com/microsoft-copilot-studio/requirements-messages-management) and [Power Platform licensing overview](https://learn.microsoft.com/power-platform/admin/pricing-billing-skus) before budgeting.

```json
// .claude/settings.json or project-level MCP config
// Configure with your Dataverse environment credentials
{
  "mcpServers": {
    "dataverse": {
      "type": "http",
      "url": "https://.crm.dynamics.com/api/mcp",
      "auth": {
        "type": "azure-ad",
        "clientId": "your-app-registration-client-id",
        "clientSecret": "your-client-secret",
        "tenantId": "your-tenant-id"
      }
    }
  }
}
```

Best for: Teams that want a supported, low-maintenance MCP integration with Dataverse and are comfortable with the metered cost model.

### Option 2: Community MCP Server (mwhesse/mcp-dataverse)

Open-source community-maintained MCP server with 50+ schema tools for deep Dataverse exploration.

**Repository:** github.com/mwhesse/mcp-dataverse

**Capabilities:** Extended schema discovery, relationship mapping, metadata introspection beyond what the official server provides.

Best for: Teams that need deeper schema tooling or want to avoid the metered cost of the official server.

---

## Related MCP Servers for Power Platform Development

### Azure DevOps MCP Server

An MCP server that gives AI assistants (GitHub Copilot, Claude Code, Cursor) access to Azure DevOps data. Use alongside the Dataverse MCP server when your ALM is on Azure DevOps.

**Status:** Local server GA. Remote server in public preview (streamable HTTP, no local install needed).

**Source:** github.com/microsoft/azure-devops-mcp

**Capabilities:**
- Retrieve, create, and update work items (including bulk updates and linking)
- Access pull request details and code search
- Query build/pipeline results
- Generate test cases from work item descriptions
- Search across work items, wikis, and code
- List iterations, team capacity, and backlogs

**Local server setup (VS Code / Claude Code):**

VS Code (`.vscode/mcp.json`):
```json
{
  "servers": {
    "azure-devops": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@azure-devops/mcp", ""]
    }
  }
}
```

Claude Code:
```bash
claude mcp add azure-devops -- npx -y @azure-devops/mcp 
```

**Remote server setup (preview, VS Code only):**
```json
{
  "servers": {
    "ado-remote-mcp": {
      "url": "https://mcp.dev.azure.com/",
      "type": "http"
    }
  }
}
```

> **Note:** The remote server authenticates via Microsoft Entra ID. As of March 2026, only VS Code and Visual Studio are supported as remote MCP clients. Claude Code/Desktop support is pending Entra dynamic client registration.

**When to use:** When your project tracks work items in ADO Boards, uses ADO Repos, or runs ADO Pipelines. Complements Dataverse MCP (data operations) with project management context.

### PAC CLI MCP Server

The Power Platform CLI includes a built-in MCP server that exposes all PAC CLI commands via natural language.

**Status:** GA
**Prerequisite:** .NET 10.0+

**Start the server:**
```bash
# With PAC CLI installed
pac copilot mcp --run

# Without PAC CLI installed (uses .NET dnx)
dnx Microsoft.PowerApps.CLI.Tool --yes copilot mcp --run
```

**Claude Code registration:**
```bash
claude mcp add-json pac-cli '{"type":"stdio","command":"dnx","args":["Microsoft.PowerApps.CLI.Tool","--yes","copilot","mcp","--run"]}'
```

**VS Code registration (`.vscode/mcp.json`):**
```json
{
  "servers": {
    "pac-mcp": {
      "type": "stdio",
      "command": "dnx",
      "args": ["Microsoft.PowerApps.CLI.Tool", "--yes", "copilot", "mcp", "--run"]
    }
  }
}
```

**Capabilities:** All PAC CLI operations via natural language -- environment management, solution operations, auth management, code app deployment, PCF operations, copilot management.

**When to use:** When you want to invoke PAC CLI commands conversationally instead of memorizing syntax. Useful for environment provisioning, solution import/export, and deployment operations.

---

### Dataverse Management MCP Server (Wave 1 2026)

> **Preview (Wave 1 2026):** A new MCP server focused on Dataverse management — discover, build, customize, and extend environments.

| Capability | Data MCP (existing) | Management MCP (new) |
|---|---|---|
| Query records | Yes | No |
| CRUD operations | Yes | No |
| Create/modify tables | Limited | Yes — primary purpose |
| Solution management | No | Yes |
| Environment discovery | No | Yes |

---

### Option 3: Custom MCP Server (Build Your Own)

Build a custom MCP server that connects to your Dataverse environment for live schema and data queries. This gives you full control over which tools are exposed, security boundaries, and response shaping.

#### Project Setup
```bash
mkdir dataverse-mcp && cd dataverse-mcp
npm init -y
npm install @modelcontextprotocol/sdk @azure/identity @azure/msal-node
npm install -D typescript @types/node
```

#### MCP Server Implementation
```typescript
// src/server.ts
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import {
  CallToolRequestSchema,
  ListToolsRequestSchema,
} from "@modelcontextprotocol/sdk/types.js";
import { ConfidentialClientApplication } from "@azure/msal-node";

const ENV_URL = process.env.DATAVERSE_URL!;
const CLIENT_ID = process.env.DATAVERSE_CLIENT_ID!;
const CLIENT_SECRET = process.env.DATAVERSE_CLIENT_SECRET!;
const TENANT_ID = process.env.DATAVERSE_TENANT_ID!;

let accessToken: string | null = null;
let tokenExpiry: number = 0;

async function getToken(): Promise {
  if (accessToken && Date.now()  {
  const token = await getToken();
  const response = await fetch(`${ENV_URL}/api/data/v9.2/${path}`, {
    headers: {
      Authorization: `Bearer ${token}`,
      Accept: "application/json",
      "OData-MaxVersion": "4.0",
      "OData-Version": "4.0",
      Prefer: 'odata.include-annotations="*"',
    },
  });
  if (!response.ok) throw new Error(`Dataverse API error: ${response.status} ${await response.text()}`);
  return response.json();
}

const server = new Server(
  { name: "dataverse-mcp", version: "1.0.0" },
  { capabilities: { tools: {} } }
);

server.setRequestHandler(ListToolsRequestSchema, async () => ({
  tools: [
    {
      name: "list_tables",
      description: "List all custom tables in the Dataverse environment with their schema names and display names",
      inputSchema: {
        type: "object",
        properties: {
          filter: {
            type: "string",
            description: "Optional: filter to 'custom' (default), 'system', or 'all' tables",
          },
        },
      },
    },
    {
      name: "describe_table",
      description: "Get detailed metadata for a specific table including all columns, types, and relationships",
      inputSchema: {
        type: "object",
        properties: {
          tableName: {
            type: "string",
            description: "Logical name of the table (e.g., 'contact', 'contoso_project')",
          },
        },
        required: ["tableName"],
      },
    },
    {
      name: "query_records",
      description: "Query records from a Dataverse table with OData filter, select, and top",
      inputSchema: {
        type: "object",
        properties: {
          entitySet: {
            type: "string",
            description: "Entity set name (plural, e.g., 'contacts', 'contoso_projects')",
          },
          select: {
            type: "string",
            description: "Comma-separated column names to return",
          },
          filter: {
            type: "string",
            description: "OData filter expression",
          },
          top: {
            type: "number",
            description: "Max records to return (default 10, max 50)",
          },
          orderby: {
            type: "string",
            description: "OData orderby expression",
          },
        },
        required: ["entitySet"],
      },
    },
    {
      name: "list_solutions",
      description: "List all solutions in the environment",
      inputSchema: { type: "object", properties: {} },
    },
    {
      name: "list_environment_variables",
      description: "List all environment variable definitions and their current values",
      inputSchema: { type: "object", properties: {} },
    },
    {
      name: "describe_relationships",
      description: "Get all relationships for a specific table",
      inputSchema: {
        type: "object",
        properties: {
          tableName: {
            type: "string",
            description: "Logical name of the table",
          },
        },
        required: ["tableName"],
      },
    },
    {
      name: "list_security_roles",
      description: "List all security roles in the environment",
      inputSchema: { type: "object", properties: {} },
    },
    {
      name: "list_views",
      description: "List all views (saved queries) for a specific table",
      inputSchema: {
        type: "object",
        properties: {
          tableName: {
            type: "string",
            description: "Logical name of the table",
          },
        },
        required: ["tableName"],
      },
    },
    {
      name: "list_custom_apis",
      description: "List all Custom APIs defined in the environment",
      inputSchema: { type: "object", properties: {} },
    },
    {
      name: "list_plugins",
      description: "List all registered plugin assemblies and their steps",
      inputSchema: { type: "object", properties: {} },
    },
    {
      name: "list_business_process_flows",
      description: "List all active Business Process Flows in the environment",
      inputSchema: { type: "object", properties: {} },
    },
  ],
}));

server.setRequestHandler(CallToolRequestSchema, async (request) => {
  const { name, arguments: args } = request.params;

  try {
    switch (name) {
      case "list_tables": {
        const filter = (args?.filter as string) || "custom";
        let oDataFilter = "";
        if (filter === "custom") oDataFilter = "&$filter=IsCustomEntity eq true";
        else if (filter === "system") oDataFilter = "&$filter=IsCustomEntity eq false";

        const result = await dataverseRequest(
          `EntityDefinitions?$select=LogicalName,DisplayName,SchemaName,EntitySetName,PrimaryIdAttribute,PrimaryNameAttribute,IsCustomEntity,OwnershipType${oDataFilter}`
        );

        const tables = result.value.map((t: any) => ({
          logicalName: t.LogicalName,
          displayName: t.DisplayName?.UserLocalizedLabel?.Label || t.LogicalName,
          schemaName: t.SchemaName,
          entitySetName: t.EntitySetName,
          primaryId: t.PrimaryIdAttribute,
          primaryName: t.PrimaryNameAttribute,
          ownershipType: t.OwnershipType,
        }));

        return { content: [{ type: "text", text: JSON.stringify(tables, null, 2) }] };
      }

      case "describe_table": {
        const tableName = args!.tableName as string;
        const result = await dataverseRequest(
          `EntityDefinitions(LogicalName='${tableName}')?$expand=Attributes($select=LogicalName,DisplayName,AttributeType,RequiredLevel,MaxLength,MinValue,MaxValue,Precision,Format,SchemaName,IsPrimaryName,IsCustomAttribute)`
        );

        const columns = result.Attributes
          .filter((a: any) => !a.LogicalName.startsWith("yomi") && !a.LogicalName.endsWith("_base"))
          .map((a: any) => ({
            logicalName: a.LogicalName,
            displayName: a.DisplayName?.UserLocalizedLabel?.Label || a.LogicalName,
            type: a.AttributeType,
            required: a.RequiredLevel?.Value || "None",
            isPrimaryName: a.IsPrimaryName,
            isCustom: a.IsCustomAttribute,
            maxLength: a.MaxLength,
            format: a.Format,
          }));

        return {
          content: [{
            type: "text",

…

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [korchard333](https://github.com/korchard333)
- **Source:** [korchard333/claude-power-platform-community](https://github.com/korchard333/claude-power-platform-community)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** yes
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-korchard333-claude-power-platform-community-dataverse-mcp
- Seller: https://agentstack.voostack.com/s/korchard333
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
