MCP D365 Developer Toolkit
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Quick Start Guide
Get up and running with MCP D365 Developer Toolkit in 5 minutes.
Prerequisites
Node.js 18+: Download here
D365/Dataverse Environment: With administrator access
Azure AD App Registration: For authentication
Related MCP server: Dataverse MCP Server
Step 1: Azure AD App Setup (5 minutes)
Create App Registration
Go to Azure Portal → Azure Active Directory → App registrations
Click New registration
Name:
MCP D365 ToolkitSupported account types: Single tenant
Redirect URI: Leave blank
Click Register
Configure Permissions
Go to API permissions
Click Add a permission → Dynamics CRM
Select Delegated permissions →
user_impersonationClick Add permissions
Click Grant admin consent (requires admin)
Create Client Secret
Go to Certificates & secrets
Click New client secret
Description:
MCP Toolkit SecretExpires: 12 months (or custom)
Click Add
Copy the secret value immediately (won't be shown again)
Note Your Details
Copy these values (you'll need them):
Application (client) ID: From app overview page
Directory (tenant) ID: From app overview page
Client secret: From previous step
D365 URL: Your environment URL (e.g.,
https://yourorg.crm.dynamics.com)
Step 2: Install & Configure (2 minutes)
# Navigate to project folder
cd mcp-d365-dev-toolkit
# Install dependencies
npm install
# Create environment file
cp .env.example .envEdit .env with your details:
D365_URL=https://yourorg.crm.dynamics.com
D365_TENANT_ID=your-tenant-id-here
D365_CLIENT_ID=your-client-id-here
D365_CLIENT_SECRET=your-client-secret-hereStep 3: Build & Test (1 minute)
# Build the project
npm run build
# Test connection
npm startExpected output:
[INFO] Starting MCP D365 Developer Toolkit server...
[INFO] Connected to D365: https://yourorg.crm.dynamics.com
[INFO] Connected as user ID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
[INFO] Registered 8 tools
[INFO] MCP server started successfullyIf you see errors, check:
✅ All environment variables are set correctly
✅ Client secret is valid (not expired)
✅ App has admin consent granted
✅ User has access to D365 environment
Step 4: Use with Claude Desktop (2 minutes)
Find Claude Config
Windows: %APPDATA%\Claude\claude_desktop_config.json
Mac: ~/Library/Application Support/Claude/claude_desktop_config.json
Add MCP Server
Edit or create claude_desktop_config.json:
{
"mcpServers": {
"d365-toolkit": {
"command": "node",
"args": ["C:\\Users\\karacan\\source\\repos\\mcp-d365-dev-toolkit\\dist\\index.js"],
"env": {
"D365_URL": "https://yourorg.crm.dynamics.com",
"D365_CLIENT_ID": "your-client-id",
"D365_CLIENT_SECRET": "your-client-secret",
"D365_TENANT_ID": "your-tenant-id"
}
}
}
}Important: Use the full absolute path to dist/index.js
Restart Claude Desktop
Close and reopen Claude Desktop completely.
Step 5: Test It Out
Try these commands in Claude:
Test 1: List Entities
List all custom entities in my D365 environmentExpected: Should see a list of your custom entities
Test 2: Describe Entity
Describe the account entityExpected: Complete schema with attributes and relationships
Test 3: Plugin Analysis
What plugins run when an account is created?Expected: List of plugins in execution order with stages
Troubleshooting
"Authentication failed"
# Check credentials are correct
# Verify admin consent was granted
# Check if secret expired"Cannot connect to D365"
# Verify D365_URL is correct (no trailing slash)
# Check network connectivity
# Verify environment is accessible"MCP server not found in Claude"
# Verify path in claude_desktop_config.json is absolute
# Check dist/index.js exists (run npm run build)
# Restart Claude Desktop completely"No tools available"
# Build the project: npm run build
# Check logs for errors: npm start
# Verify all 8 tools registered successfullyWhat's Working
Currently implemented (Phase 1 - MVP):
✅ Metadata Tools
describe_entity- Get entity schemalist_entities- List all entitiesget_attribute_details- Get attribute detailscreate_attribute- Create attributes with validation anddryRunupdate_attribute- Update mutable attribute metadata withdryRun
✅ Plugin Tools
get_plugin_execution_chain- Analyze plugin executionlist_plugin_assemblies- List plugin assembliesanalyze_plugin_trace_logs- Scan and analyze plugin exception trace logs
✅ Quality & Safety
Unit test suite for core utilities (
odata, error handling, logger)Unit tests for metadata tools and plugin tools
Unit and integration tests for D365 connection (
WhoAmI)OData input validation and escaping for query safety
Sensitive-value redaction in logs
Next Steps
Try It: Test all 8 tools with different entities
Validate Quality: Run
npm testandnpm run buildValidate Real Environment: Run
npm run test:integrationDebug Plugin Tools in Real Time:
Run focused suite:
npm run test:integration:pluginsUse VS Code launch profile:
Debug Plugin Integration TestsSet breakpoints in
src/tools/plugins/index.tsand step through handler logicOptional test targeting env vars:
D365_TEST_PLUGIN_ASSEMBLY_NAME(default:Microsoft.Crm.ObjectModel)D365_TEST_PLUGIN_TYPE_NAME(default:Microsoft.Crm.Extensibility.InternalOperationPlugin)
Write-Test Hygiene:
Keep integration tests read-only by default
If a test writes records, register IDs in
DataverseCleanupRegistryand clean inafterAllFail test runs when cleanup fails to prevent Dataverse residue
Extend It: Add new tools (see MCP Development Guidelines)
Contribute: Help build Phase 2 tools (see CONTRIBUTING.md)
Need Help?
Documentation: Check local
docs/folderGuidelines: Read mcp-development-guidelines.md
Issues: Open a GitHub issue
Security Notes
⚠️ Never commit .env file to source control
⚠️ Use a dedicated service principal, not your personal account
⚠️ Test in DEV/TEST environment first, not PROD
⚠️ Rotate client secrets regularly
Ready to go! You now have a working MCP server that brings D365 directly into your AI workflow.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Query your team's drift, vulnerability, and upgrade data from any AI assistant. OAuth 2.1, 51 tools.
Lets AI agents analyze API metrics, request logs, and traces, and manage apps and alerts.
Read-only finance and operations controls for AI agents with evidence and safe next actions.
Amazon Ads, Seller Central, Vendor Central and AMC data for AI agents. Read-only by default.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to explore metadata, query data, and perform write operations across multiple Microsoft Dynamics 365 Finance & Operations environments. It features specialized tools for OData execution and data analysis with built-in read-only safety for production environments.41 npm10MIT
- AlicenseAqualityCmaintenanceEnables AI agents to query, inspect, and manage Microsoft Dataverse records, metadata, schema, forms, views, and Power Platform environments via the Dataverse OData Web API.9762 PyPI3MIT
- AlicenseBqualityDmaintenanceEnables AI agents to perform CRUD operations, query data, fetch schemas, and execute custom operations on Microsoft Dynamics 365 CRM entities.1038 npm2MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to query and maintain Microsoft Dataverse and Dynamics 365 Customer Engagement environments via MCP, with 84 tools for records, metadata, web resources, plugin registration, data model management, diagnostics/audit, solutions, and classic Ribbon customization.MIT