# d365fo-connector

Links Microsoft Dynamics 365 F&O to AI assistants via OData. Lets you inspect schemas, run analytical queries, and modify test data safely.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 10
- Author: zhound420
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/zhound420/D365FO-claude-connector
- Updated: 2026-03-15
- HTML: https://affpapa.org/en/nevibecode/mcp/d365fo-connector

## What it 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.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `D365_TENANT_ID`, `D365_CLIENT_ID`, `D365_CLIENT_SECRET`, `D365_ENVIRONMENT_URL` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
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 <…> with your own values

### Codex

**Platform CLI**
```bash
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-server
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "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

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "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

### Gemini CLI

**Platform CLI**
```bash
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-server
```
Replace <…> with your own values

## When to use it
- 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
- 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

## Similar
- [D365FO MCP Server](https://affpapa.org/en/nevibecode/mcp/d365fo-mcp-server.md) — MCP server · ★ 40
- [netsuite-ai-connector-instructions](https://affpapa.org/en/nevibecode/skills/netsuite-ai-connector-instructions.md) — skill · 778 installs
- [business-central-development](https://affpapa.org/en/nevibecode/skills/business-central-development.md) — skill · 749 installs
- [d365-solution-blueprint](https://affpapa.org/en/nevibecode/skills/d365-solution-blueprint.md) — skill · 13 installs
- [dataverse](https://affpapa.org/en/nevibecode/plugins/dataverse.md) — plugin · ★ 246
- [ms365-tenant-manager](https://affpapa.org/en/nevibecode/skills/ms365-tenant-manager.md) — skill · 783 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
