← Back to Home Dynamics 365 CLI →
MCP Server for Dynamics 365 Preview

Dataverse access for AI agents. Plan-hash safe.

Query tables, describe schemas, create/update/delete records and tables — all from Claude Desktop, Cursor, or Windsurf. Every mutation requires a SHA-256 plan hash from the matching plan tool.

Preview. Read and plan tools available by default. Add --enable-writes to unlock apply tools.

Open source on GitHub

Claude Desktop

You:

List the tables in my Dataverse environment

Claude:

Running dynamics.list_tables...

Dataverse Tables

47 tables found

account, contact, lead, opportunity, systemuser, team...

Custom: cr_dealregistration, cr_partnerportal, cr_routingrule...

How Writes Are Governed

Four layers between your AI assistant and your production environment.

1

Default: read + plan

4 read + 6 plan tools are always registered. Plan tools preview changes and generate hashes but never modify data.

2

Applies require --enable-writes

Pass the flag on server startup to register the 6 apply tools. Without it, they don't exist in the MCP tool list.

3

Mutations are plan → apply only

Every write tool has a matching plan tool. The plan previews the change and generates a SHA-256 plan_hash.

4

Apply rejects mismatched plan_hash

If anything drifts between plan and apply, the hash won't match and the operation is rejected.

What Dynamics Teams Actually Need

AI-assisted Dataverse operations with safety guardrails.

🔍

Query Dataverse from your IDE

Ask Claude to query tables with OData filters. Results come back as structured JSON.

📋

Schema introspection

Describe table metadata and attributes without navigating Power Platform Admin Center.

🛡

Safe record operations

Create, update, delete records — each with a matching plan step and plan-hash verification.

🏗

Safe table operations

Create, update, delete tables with the same plan/apply pattern. No accidental schema changes.

Symmetric plan/apply pairs

Every write tool has a matching plan tool. 6 plan tools, 6 apply tools. No shortcuts.

🏥

Environment health checks

Doctor command verifies Dataverse prerequisites, credentials, and connectivity before you start.

Every Write Has a Matching Plan

6 plan tools generate previews and hashes. 6 apply tools require the exact hash to proceed.

Plan (preview + hash)

dynamics.create_record.plan
dynamics.update_record.plan
dynamics.delete_record.plan
dynamics.create_table.plan
dynamics.update_table.plan
dynamics.delete_table.plan

Apply (requires plan_hash)

dynamics.create_record.apply
dynamics.update_record.apply
dynamics.delete_record.apply
dynamics.create_table.apply
dynamics.update_table.apply
dynamics.delete_table.apply

16 MCP Tools

Tiered access control. Read + plan tools always available. Apply tools gated behind --enable-writes.

🔍 Read READ 4 tools

dynamics.doctor

Check Dataverse runtime prerequisites and credential setup

dynamics.list_tables

List Dataverse tables (EntityDefinitions)

dynamics.describe_table

Describe table metadata and attributes

dynamics.read_query

Read rows from a table using OData query options

👁 Plan PLAN 6 tools · always available

dynamics.create_record.plan

Preview record creation, generate plan_hash

dynamics.update_record.plan

Preview record update, generate plan_hash

dynamics.delete_record.plan

Preview record deletion, generate plan_hash

dynamics.create_table.plan

Preview table creation, generate plan_hash

dynamics.update_table.plan

Preview table schema update, generate plan_hash

dynamics.delete_table.plan

Preview table deletion, generate plan_hash

⚠ Apply WRITE 6 tools · requires --enable-writes + plan_hash

dynamics.create_record.apply

Create record (requires plan_hash from plan step)

dynamics.update_record.apply

Update record (requires plan_hash from plan step)

dynamics.delete_record.apply

Delete record (requires plan_hash from plan step)

dynamics.create_table.apply

Create table (requires plan_hash from plan step)

dynamics.update_table.apply

Update table schema (requires plan_hash from plan step)

dynamics.delete_table.apply

Delete table (requires plan_hash from plan step)

Two-Phase Safety on Every Mutation

Nothing writes to your Dataverse until you've reviewed the plan. Every mutation requires a cryptographic hash.

1

Plan (read-only)

Tool previews the change without modifying Dataverse. Returns a full preview plus a SHA-256 plan_hash.

"action": "create_record",

"table": "account",

"plan_hash": "sha256:c9a1d3e7...",

"preview": { "name": "Contoso", "industry": "Tech" }

2

Apply (explicit)

Caller passes the plan_hash. Mismatched or missing hash = rejected.

"plan_hash": "sha256:c9a1d3e7...",

"ok": true, "id": "a1b2c3d4-..."

Dataverse API Capacity

Every query and write the MCP server makes counts against your Dataverse API entitlement. Monitor usage in the Power Platform Admin Center. The server doesn't add overhead beyond the API calls it makes on your behalf.

Claude Desktop Configuration

Add this JSON block to your MCP client config.

Read + plan (default)

{ "mcpServers": { "g-gremlin-dynamics": { "command": "g-gremlin", "args": ["mcp", "serve", "--provider", "dynamics"] } } }

With writes enabled

{ "mcpServers": { "g-gremlin-dynamics": { "command": "g-gremlin", "args": ["mcp", "serve", "--provider", "dynamics", "--enable-writes"] } } }
PREVIEW

Start Free Trial

Preview access available. Start a 30-day free trial for full access.

Setup steps:

1

Install

pipx install g-gremlin[mcp]

Requires the MCP-enabled build. Check release notes for availability.

2

Configure Dataverse credentials

Set your Dataverse environment URL and Azure AD / Entra ID credentials.
3

Add to your MCP client

Add the JSON config block to Claude Desktop, Cursor, or Windsurf settings.
FAQ

Common Questions

How is this different from Microsoft's official Dataverse tools?

Microsoft provides the pac CLI and Power Platform Admin Center for Dataverse management. This MCP server gives AI assistants structured access to Dataverse with plan-hash safety on every mutation — something the native tools don't provide. We don't replace pac CLI; we add an AI-safe access layer.

Is it safe to let an AI write to my Dataverse environment?

Yes. The server starts with 10 tools (4 read + 6 plan). Plan tools preview changes and generate hashes but never modify data. The 6 apply tools require --enable-writes on server startup. Every mutation follows a plan-then-apply pattern: the plan step generates a SHA-256 plan_hash, and the apply step rejects any request with a mismatched or missing hash.

Does this cost extra in Dataverse API capacity?

Every query and write counts against your Dataverse API entitlement. Monitor usage in the Power Platform Admin Center. The MCP server doesn't add overhead beyond the API calls it makes on your behalf.

Which MCP clients are supported?

Claude Desktop, Cursor, Windsurf, and any MCP-compatible client that supports stdio transport.

What authentication does it use?

The MCP server authenticates via Azure AD / Entra ID credentials. You configure your Dataverse environment URL, and the server handles token acquisition.

How do I install it?

pipx install g-gremlin[mcp], configure your Dataverse credentials, and add the server JSON block to your MCP client config. Requires the MCP-enabled g-gremlin build — check release notes for availability.

Your AI assistant just got safe Dataverse access.

Preview access available. Start a 30-day free trial for full access.