GitHub - vignaesh01/DataverseDevToolsMcpServer: Dataverse DevTools Mcp Server Repository (original) (raw)

DataverseDevTools MCP Server

A Model Context Protocol (MCP) server exposing ready-to-use Dataverse tools for user and security administration, data operations, metadata exploration, and troubleshooting. Stay in your flow: as a Dynamics 365/Dataverse developer, you don’t need to switch to XrmToolBox, make.powerapps.com, or admin.powerplatform.com for common tasks—run them right inside Visual Studio/VS Code or any MCP‑enabled client.

Prerequisites

Install as global .NET tool

dotnet tool install --global vignaesh01.dataversedevtoolsmcpserver

Note: The executable command name is the tool command published with the package. If unsure, check with dotnet tool list -g.

Setup in MCP clients

Use the server from your favorite MCP-enabled client. Below are quick setups for VS Code, Visual Studio, and Claude on Windows.

VS Code (GitHub Copilot Chat)

Prerequisites:

Step-by-Step instructions with Screenshots:

mcp.json - using the Global Tool (Recommended)

{ "servers": { "dvmcp": { "type": "stdio", "command": "dataversedevtoolsmcpserver", "args": [ "--environmentUrl", "https://yourorg.crm.dynamics.com" ] } } }

mcp.json - Using Client Credentials Authentication (Service Principal)

For automated scenarios or when interactive login is not possible, you can use client credentials authentication with an Azure AD application:

{ "servers": { "dvmcp": { "type": "stdio", "command": "dataversedevtoolsmcpserver", "args": [ "--environmentUrl", "https://yourorg.crm.dynamics.com", "--tenantId", "your-tenant-id", "--clientId", "your-client-id", "--clientSecret", "your-client-secret" ] } } }

Note: To use client credentials authentication, you need to:

  1. Register an application in Azure Active Directory
  2. Create a client secret for the application
  3. Add the application user in Dataverse with appropriate security roles
  4. Use the tenant ID, client ID (application ID), and client secret in the configuration

mcp.json - For Corporate Networks behind a proxy

{ "servers": { "dvmcp": { "type": "stdio", "command": "dataversedevtoolsmcpserver", "args": [ "--environmentUrl", "https://yourorg.crm.dynamics.com" ], "env":{ "HTTP_PROXY": "http://username@domain.com:@<proxy.domain.com>:8080", "HTTPS_PROXY": "http://username@domain.com:@<proxy.domain.com>:8080" } } } }

Sample mcp.json if you have cloned the GitHub Repository (For Explorers):

{ "servers": { "dvmcp": { "type": "stdio", "command": "dotnet", "args": [ "run", "--project", "C:/Projects/DataverseDevToolsMcpServer/DataverseDevToolsMcpServer/DataverseDevToolsMcpServer.csproj", "--environmentUrl", "https://yourorg.crm.dynamics.com" ] } } }

Sample mcp.json with Client Credentials (For Explorers using cloned repository):

{ "servers": { "dvmcp": { "type": "stdio", "command": "dotnet", "args": [ "run", "--project", "C:/Projects/DataverseDevToolsMcpServer/DataverseDevToolsMcpServer/DataverseDevToolsMcpServer.csproj", "--environmentUrl", "https://yourorg.crm.dynamics.com", "--tenantId", "your-tenant-id", "--clientId", "your-client-id", "--clientSecret", "your-client-secret" ] } } }

Usage: Open Copilot Chat in Agent mode and ask to use the Dataverse tools or dvmcp tools; the client will discover the server automatically.

Visual Studio (GitHub Copilot Chat)

Prerequisites:

Step-by-Step instructions with Screenshots:

Claude Desktop

Prerequisites:

{ "mcpServers": { "dvmcp": { "type": "stdio", "command": "dataversedevtoolsmcpserver", "args": [ "--environmentUrl", "https://yourorg.crm.dynamics.com" ] } } }

With Client Credentials:

{ "mcpServers": { "dvmcp": { "type": "stdio", "command": "dataversedevtoolsmcpserver", "args": [ "--environmentUrl", "https://yourorg.crm.dynamics.com", "--tenantId", "your-tenant-id", "--clientId", "your-client-id", "--clientSecret", "your-client-secret" ] } } }

Sample prompts

Use natural-language prompts in your MCP client; the client will map them to tool calls.

User Management

Team Management

Security Management

Data Management

Entity Metadata

Custom Actions & Custom APIs

Troubleshooting

Tools overview

Below are the tools exposed by the server, grouped by category. Each item links to its source.

User, Team & Queue Management

Tool Name Description
GetCurrentUser Get details of the current logged-in user
GetUserById Get user details by user ID
SearchUsersByKeyword Search users where fullname contains a keyword (with paging)
GetUserQueues List queues for a user (with paging)
GetUserTeams List teams for a user (with paging)
GetUserRoles List security roles for a user
SearchBUByKeyword Search BUs by keyword (with paging)
GetRootBU Get the root BU
SearchRolesByKeywordAndBU Search roles by keyword in a BU (with paging)
AssignRoleToUser Assign role to user
RemoveRoleFromUser Remove role from user
ChangeUserBU Change user’s BU
SearchQueuesByKeyword Search queues by keyword (with paging)
AddUserToQueue Add user to queue
RemoveUserFromQueue Remove user from queue
SearchTeamsByKeyword Search teams by keyword (with paging)
AddUserToTeam Add user to team
RemoveUserFromTeam Remove user from team
AssignRoleToTeam Assign role to team
RemoveRoleFromTeam Remove role from team
ChangeTeamBU Change team’s BU
GetRolesByTeamId List roles assigned to a team

Security Management

Tool Name Description
GetEntityPrivByRoleId Privileges a role has on a specific entity
GetAllPrivByRoleId All privileges for a role
ListRolesByPrivId Roles having a specific privilege ID

Data Management

Tool Name Description
ExecuteFetchXml Run a FetchXML query (supports paging-cookie)
ExecuteWebApi Execute raw Dataverse Web API requests
CreateRecord Create a record (Web API)
UpdateRecord Update by ID (Web API)
UpsertRecord Upsert using alternate keys (Web API)
DeleteRecord Delete by ID (Web API)

Entity Metadata

Tool Name Description
FindEntityLogicalNameUsingKeyword Find entities by keyword
ListAllEntities List all entities
GetEntityMetadata Entity metadata information only
GetFields Attributes/fields metadata with pagination
GetRelationships Relationships metadata with pagination
GetOptionSetValuesForEntityField OptionSet values for a field
FindGlobalOptionSet Find global OptionSets
GetGlobalOptionSetValues Values of a global OptionSet
ListAllGlobalOptionSets List all global OptionSets
GetEntityPrivileges Privileges defined on an entity

Custom Actions & Custom APIs

Tool Name Description
FindCustomActionUsingKeyword Find custom actions by keyword
GetCustomActionMetadata Get custom action metadata with Web API usage info
FindCustomApiUsingKeyword Find custom APIs by keyword
GetCustomApiMetadata Get custom API metadata with request/response parameters and Web API usage info

Troubleshooting

Tool Name Description
GetPluginTracesByName Plugin trace logs by type name (with paging)
GetPluginTracesByCorrId Plugin trace logs by correlation ID (with paging)

Manage .Net Tool

Notes