DA

Dataverse DevTools MCP Server: User, Security, API Tools

Manage Dataverse/Dynamics 365 users, security, data, APIs and metadata with the MCP server's ready tools for admin, troubleshooting, and Web API calls.

Quick Install
npx -y @vignaesh01/DataverseDevToolsMcpServer

Overview

The Dataverse DevTools MCP Server implements a Model Context Protocol (MCP)–compatible developer tools backend that helps administrators and developers manage Microsoft Dataverse / Dynamics 365 environments. It exposes a set of ready-made tools for user and security management, data operations, metadata inspection, troubleshooting and running Web API calls — all via a consistent HTTP API suitable for automation and integration into developer workflows.

This server is useful when you need programmatic access to common admin tasks (bulk user role assignments, metadata exploration, data fixes), or when debugging client issues by proxying Web API requests and collecting tracing information. It is designed to sit alongside your existing Dataverse tooling and be consumed by local developer tools, CI jobs, or custom admin UIs.

Features

  • User management: create, disable/enable, query and list users and teams
  • Security operations: assign and revoke security roles, inspect role membership
  • Data tools: query, upsert, delete, and bulk operations against records
  • Web API proxy: make authenticated Dataverse Web API calls through the server
  • Metadata browser: list entities, attributes and relationships
  • Troubleshooting and tracing: capture request/response details to aid debugging
  • Automation-friendly: HTTP endpoints suitable for scripts and CI/CD
  • Configurable authentication: uses Dataverse OAuth credentials stored in environment variables

Installation / Configuration

Clone the repository and follow the project README for language/runtime specifics. Typical setup steps:

# clone the project
git clone https://github.com/vignaesh01/DataverseDevToolsMcpServer.git
cd DataverseDevToolsMcpServer

Install and run (examples shown for common runtimes — check the repo for the exact command for this project):

Node.js (example)

npm install
npm run start

.NET (example)

dotnet restore
dotnet run --project src/DataverseDevToolsMcpServer

Environment variables (example)

# required for authenticating to Dataverse
export DATAVERSE_URL="https://yourorg.crm.dynamics.com"
export AZURE_TENANT_ID="your-tenant-id"
export AZURE_CLIENT_ID="your-client-id"
export AZURE_CLIENT_SECRET="your-client-secret"

# server config
export MCP_SERVER_PORT=8080
export LOG_LEVEL=info

After starting, the server typically listens for MCP-compatible HTTP requests on the configured port. See the repository README for any project-specific setup (service accounts, certificate configuration, or deployment manifests).

Available Tools

Below are common tools/endpoints you can expect to find (names may vary slightly — consult the server’s OpenAPI or README for exact routes).

Endpoint (example)Purpose
GET /api/usersList users and teams
POST /api/usersCreate or upsert a user
PATCH /api/users/{id}/disableDisable a user
GET /api/security/rolesList security roles
POST /api/security/assign-roleAssign a role to a user or team
POST /api/data/queryRun a FetchXML or Web API query
POST /api/data/bulkRun bulk upsert/delete operations
POST /api/webapi/proxyProxy an arbitrary Web API request to Dataverse
GET /api/metadata/entitiesBrowse entity/attribute metadata
GET /api/tracesRetrieve recent troubleshooting traces

Example: proxy a Web API GET to query accounts

curl -X POST "http://localhost:8080/api/webapi/proxy" \
  -H "Content-Type: application/json" \
  -d '{"method":"GET","path":"/api/data/v9.2/accounts?$select=name","headers":{}}'

Use Cases

  1. Bulk user provisioning and role assignment

    • Script a pipeline to create new users, add them to teams, and assign security roles using the /api/users and /api/security endpoints. This speeds up onboarding for large teams.
  2. Reproduce and debug client API failures

    • Use the Web API proxy to reproduce a failing request from a client while capturing request/response and server traces to identify authorization or data model issues.
  3. Metadata inspection before automation

    • Programmatically list entity metadata to generate data migration mappings or validate field names before running bulk updates.
  4. Automated environment checks in CI/CD

    • Add a step that queries critical entities and security role assignments to ensure a deployed environment is configured correctly.
  5. Safe ad-hoc fixes by administrators

    • Run targeted upserts or deletes for specific records through an authenticated tool instead of using direct database access or risky GUI operations.

Security and Best Practices

  • Store Dataverse credentials (client secret, tenant ID) in a secure secret store, not in version control.
  • Run the MCP server behind TLS and restrict access to trusted networks or IP ranges.
  • Use an Azure AD app with least privilege scopes necessary for the operations you require.
  • Enable logging and retention policies for traces, but avoid logging sensitive data such as secrets or PII.
  • Review and restrict endpoints that allow destructive operations (bulk delete/upsert) to authorized accounts or IPs.

For full command details, exact endpoints and runtime instructions, refer to the repository: https://github.com/vignaesh01/DataverseDevToolsMcpServer.