JM

joriskalz/mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

0 stars 0 forks 质量 61 趋势 4

Local Model Context Protocol server for Microsoft Dataverse. It exposes 171 tools covering data access, schema/solution (ALM) authoring, model-driven app and form design, security, plug-ins, theming,...

概览

Local Model Context Protocol server for Microsoft Dataverse. It exposes 171 tools covering data access, schema/solution (ALM) authoring, model-driven app and form design, security, plug-ins, theming, and demo-environment generation — all with a dry-run-first safety model. Edit .env with your Dataverse URL and Azure app registration values. For local interactive auth (device code flow): Set DATAVERSE_MCP_TRANSPORT=http and run npm run dev; the endpoint defaults to http://127.0.0.1:3000/mcp (host/port/path configurable below). All settings are environment variables (loaded from .env via dotenv). Every write tool is : without dryRun: false plus confirmWrite: true (or confirmDelete: true for deletions) it only returns the exact request it would send. Executing additionally requires the matching gate flag below — so an agent can always plan, but writing is a deliberate, layered opt-in. Tool results default to compact YAML to reduce token usage.

README

以下为原文 README 节选,完整内容请查看原文。

Dataverse MCP Server

Local Model Context Protocol server for Microsoft Dataverse. It exposes 171 tools covering data access, schema/solution (ALM) authoring, model-driven app and form design, security, plug-ins, theming, and demo-environment generation — all with a dry-run-first safety model.

Setup

npm install
cp .env.example .env

Edit .env with your Dataverse URL and Azure app registration values.

For local interactive auth (device code flow):

DATAVERSE_AUTH_MODE=device_code
AZURE_CLIENT_ID=
AZURE_TENANT_ID=

For app-only auth (service principal):

DATAVERSE_AUTH_MODE=client_credentials
AZURE_CLIENT_ID=
AZURE_TENANT_ID=
AZURE_CLIENT_SECRET=

Run

npm run dev        # development (tsx)
npm run build      # compile to dist/
npm start          # run the compiled server
npm test           # vitest unit tests
npm run typecheck  # tsc --noEmit

MCP Client Command

Use this server over stdio:

{
  "mcpServers": {
    "dataverse": {
      "command": "npm",
      "args": ["run", "dev"],
      "cwd": ""
    }
  }
}

Streamable HTTP

Set DATAVERSE_MCP_TRANSPORT=http and run npm run dev; the endpoint defaults to http://127.0.0.1:3000/mcp (host/port/path configurable below).

Configuration Reference

All settings are environment variables (loaded from .env via dotenv).

Connection & authentication

Variable Default Description
DATAVERSE_BASE_URL (required) Environment URL, e.g. https://yourorg.crm4.dynamics.com (no trailing slash needed).
DATAVERSE_API_VERSION v9.2 Web API version segment used for every request.
DATAVERSE_AUTH_MODE device_code device_code (interactive, public client) or client_credentials (app-only; requires the secret).
AZURE_CLIENT_ID (required) Entra ID app registration (client) id.
AZURE_TENANT_ID (required) Entra ID tenant id.
AZURE_CLIENT_SECRET — Client secret; required only for client_credentials.
DATAVERSE_TOKEN_CACHE_PATH .dataverse-token-cache.json MSAL token cache file so re-auth is rare. Set empty to disable persistence.

Transport

Variable Default Description
DATAVERSE_MCP_TRANSPORT stdio stdio for editor/CLI clients, http for Streamable HTTP.
DATAVERSE_MCP_HTTP_HOST 127.0.0.1 HTTP listen host.
DATAVERSE_MCP_HTTP_PORT 3000 HTTP listen port.
DATAVERSE_MCP_HTTP_PATH /mcp HTTP endpoint path.

Safety gates & allowlists

Every write tool is dry-run by default: without dryRun: false plus confirmWrite: true (or confirmDelete: true for deletions) it only returns the exact request it would send. Executing additionally requires the matching gate flag below — so an agent can always plan, but writing is a deliberate, layered opt-in.

在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "dataverse": { "command": "npm", "args": ["run", "dev"], "cwd": "<path-to-this-repo>" } } }