d365fo-connector — Claude Code MCP server: setup and tools
Links Microsoft Dynamics 365 F&O to AI assistants via OData. Lets you inspect schemas, run analytical queries, and modify test data safely.
claude mcp add d365fo-connector -e D365_TENANT_ID=<D365_TENANT_ID> -e D365_CLIENT_ID=<D365_CLIENT_ID> -e D365_CLIENT_SECRET=<D365_CLIENT_SECRET> -e D365_ENVIRONMENT_URL=<D365_ENVIRONMENT_URL> -- npx -y @zhound/d365fo-mcp-serverWhat d365fo-connector does
This server bridges Dynamics 365 Finance & Operations with tools like Claude. It provides 22 functions to fetch records via OData, calculate statistical aggregates, export tables, and track schema drift across tiers. Discovered entity structures stay cached locally for 24 hours.
Configuration relies on environment variables or a d365-environments.json file for multi-tier setups. Production environments stay strictly read-only by design, so write calls will fail fast on production targets. Insert, update, and delete actions work only on non-production sandboxes.
Access requires Azure AD client credentials. Without valid tenant, client ID, secret, and environment URL values, the server terminates the connection attempt immediately.
What it helps with
- inspect D365 entity schemas and relations directly in chat
- export OData query outputs to CSV or JSON files
- detect schema discrepancies between UAT and production
- run batch data updates inside development sandboxes
Example prompts for the agent
- Describe the CustCustomerV3Entity schema on the dev environment
- Run a MoM comparison for sales orders using compare_periods
- Check connection health for all environments via the dashboard tool
How to install d365fo-connector
Platform CLI
claude mcp add d365fo-connector -e D365_TENANT_ID=<D365_TENANT_ID> -e D365_CLIENT_ID=<D365_CLIENT_ID> -e D365_CLIENT_SECRET=<D365_CLIENT_SECRET> -e D365_ENVIRONMENT_URL=<D365_ENVIRONMENT_URL> -- npx -y @zhound/d365fo-mcp-serverReplace <…> with your own values
Platform CLI
codex mcp add d365fo-connector --env D365_TENANT_ID=<D365_TENANT_ID> --env D365_CLIENT_ID=<D365_CLIENT_ID> --env D365_CLIENT_SECRET=<D365_CLIENT_SECRET> --env D365_ENVIRONMENT_URL=<D365_ENVIRONMENT_URL> -- npx -y @zhound/d365fo-mcp-serverReplace <…> with your own values
Config file
{
"mcpServers": {
"d365fo-connector": {
"command": "npx",
"args": [
"-y",
"@zhound/d365fo-mcp-server"
],
"env": {
"D365_TENANT_ID": "<D365_TENANT_ID>",
"D365_CLIENT_ID": "<D365_CLIENT_ID>",
"D365_CLIENT_SECRET": "<D365_CLIENT_SECRET>",
"D365_ENVIRONMENT_URL": "<D365_ENVIRONMENT_URL>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"d365fo-connector": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@zhound/d365fo-mcp-server"
],
"env": {
"D365_TENANT_ID": "<D365_TENANT_ID>",
"D365_CLIENT_ID": "<D365_CLIENT_ID>",
"D365_CLIENT_SECRET": "<D365_CLIENT_SECRET>",
"D365_ENVIRONMENT_URL": "<D365_ENVIRONMENT_URL>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e D365_TENANT_ID=<D365_TENANT_ID> -e D365_CLIENT_ID=<D365_CLIENT_ID> -e D365_CLIENT_SECRET=<D365_CLIENT_SECRET> -e D365_ENVIRONMENT_URL=<D365_ENVIRONMENT_URL> d365fo-connector npx -y @zhound/d365fo-mcp-serverReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about d365fo-connector
How do I install d365fo-connector in Claude Code?
Run this terminal command: `claude mcp add d365fo-connector -e D365_TENANT_ID=<D365_TENANT_ID> -e D365_CLIENT_ID=<D365_CLIENT_ID> -e D365_CLIENT_SECRET=<D365_CLIENT_SECRET> -e D365_ENVIRONMENT_URL=<D365_ENVIRONMENT_URL> -- npx -y @zhound/d365fo-mcp-server`. Replace placeholder credentials with your Azure AD details.
Can this server modify live production records?
No. Environments defined as production enforce read-only safety. Tools that create, modify, or delete records refuse to execute against production targets.
What credentials are required before setup?
You need an Azure AD app registration. You will pass its tenant ID, client ID, client secret, and the Dynamics 365 base URL.