dataverse-mcp-server

dataverse-mcp-server

MCP server for Microsoft Dataverse API with safe-by-default configuration. Works with any Dataverse / Dynamics 365 environment.

Category
访问服务器

README

dataverse-mcp-server

npm version npm downloads CI Node.js TypeScript License: MIT

MCP (Model Context Protocol) server for Microsoft Dataverse API with safe-by-default configuration. Works with any Dataverse / Dynamics 365 environment.

Tools

Data operations

Tool Description
list_entities List Dataverse tables with optional prefix and solution filters
list_solutions List Dataverse solutions (use uniquename to filter list_entities)
get_entity_schema Get attributes of a specific table
query_records Query records with OData $filter, $select, $top, $orderby, $expand
get_record Get a single record by ID
create_record Create a record
update_record Update a record
delete_record Delete a record (disabled by default, see Safety)

Note: solution / DATAVERSE_SOLUTION_NAME only scopes list_entities (schema browsing). Data tools (query_records, get_record, create_record, …) keep full access to any table regardless of solution membership — shared tables like account or contact remain reachable.

Schema operations

Tool Description
create_entity Create a new table with attributes
add_attribute Add a column to an existing table
update_attribute Update column metadata (display name, required level, bounds, …)
delete_attribute Delete a column (disabled by default, see Safety)
get_attribute_dependencies List CRM components (forms, views, workflows, …) that reference a column — use after delete_attribute fails with 0x8004f01f
create_relationship Create relationships between tables (1:N, N:N)
list_entity_keys List alternate keys on a table (returns key_attributes, entity_key_index_status, …)
add_entity_key Create an alternate key (single or composite) — enables race-safe keyed-PATCH upserts
delete_entity_key Delete an alternate key and its supporting unique index (disabled by default, see Safety)

Dataverse does not allow changing a column's logical name or type. To "rename" or change type: create a new column, migrate data via update_record, then delete_attribute on the old one.

Picklist option management

Tool Description
get_picklist_options Read options of a Local or Global OptionSet as [{ value, label }]
add_picklist_option Add an option to an existing OptionSet (InsertOptionValue)
update_picklist_option Rename an option on an OptionSet (UpdateOptionValue)
delete_picklist_option Remove an option from an OptionSet (DeleteOptionValue)

Picklist tools accept either entity_logical_name + attribute_logical_name (Local OptionSet) or option_set_name (Global OptionSet) — the two modes are mutually exclusive. Write operations require Customizer or System Administrator role on the connected service principal. Deleting an option does not update existing records that hold its numeric value — they are left with an orphan integer.

Quick start (no clone)

Add to .mcp.json in your project root:

{
  "mcpServers": {
    "dataverse": {
      "command": "npx",
      "args": ["-y", "@rededis/dataverse-mcp-server"]
    }
  }
}

Create a .env file next to it with the four required variables (see Environment variables below) and restart your MCP client. The -y flag tells npx to auto-confirm the package install.

Setup

Environment variables

DATAVERSE_TENANT_ID=your-azure-tenant-id
DATAVERSE_CLIENT_ID=your-app-registration-client-id
DATAVERSE_CLIENT_SECRET=your-client-secret
DATAVERSE_RESOURCE_URL=https://your-org.crm.dynamics.com
DATAVERSE_ENTITY_PREFIX=contoso_          # optional, default prefix filter for list_entities
DATAVERSE_SOLUTION_NAME=MySolution        # optional, default solution unique name for list_entities
DATAVERSE_ALLOW_DELETE=true               # optional, enable delete operations (disabled by default)

Azure App Registration

  1. Register an app in Azure AD
  2. Add API permission: Dynamics CRM > user_impersonation (or Application permissions)
  3. Create a client secret
  4. Grant the app a security role in Dataverse (e.g. System Administrator for full access)

Build

npm install
npm run build

Claude Code configuration (local build)

If you cloned the repo instead of using npx:

{
  "mcpServers": {
    "dataverse": {
      "command": "node",
      "args": ["./dist/index.js"]
    }
  }
}

Create a .env file with your credentials (see .env.example).

Safety

Destructive operations are disabled by default to prevent accidental data loss. All four delete tools are gated behind the same DATAVERSE_ALLOW_DELETE=true flag:

  • delete_record — removes a row and all its data
  • delete_attribute — removes a column along with ALL values across every record (no recovery short of a full environment restore)
  • delete_picklist_option — removes an option from an OptionSet; records that hold the option's integer value are left with an orphan number (no label in UI, broken reports)
  • delete_entity_key — drops an alternate key and its supporting unique index; any keyed-PATCH upsert flows relying on it stop working

When the flag is off, each tool registers as a stub that returns an instructional error instead of performing the delete. To enable, add DATAVERSE_ALLOW_DELETE=true to your .env file and restart the MCP server.

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选