D365 F&O X++

Developer tools

X++ code intelligence for Dynamics 365 F&O: search, object info, codegen, build and BP check.

Your AI app calls the D365 F&O X++ MCP server, which does the developer tools work and sends the result back to the chat.

About D365 F&O X++

D365 F&O X++ is a community MCP server from dynamics365ninja, filed in our directory under developer tools. X++ code intelligence for Dynamics 365 F&O: search, object info, codegen, build and BP check.

D365 F&O X++ runs on your own machine: your AI app starts it with the command npx -y d365fo-mcp@1.26.2 serve and talks to it over standard input and output.

D365 F&O X++ is listed in the official MCP registry as io.github.dynamics365ninja/d365fo-mcp-server, version 1.26.2.

At a glance

Publisher
dynamics365ninja (community)
Runs
Locally on your machine
Install from
Node.js package on npm: d365fo-mcp
Written in
TypeScript
License
MIT
GitHub stars
178
Official MCP registry
io.github.dynamics365ninja/d365fo-mcp-server

How to set up D365 F&O X++

  1. Install Node.js on the machine that runs your AI app, because D365 F&O X++ starts with npx and downloads its package on first run.
  2. Check the D365 F&O X++ README for keys or settings; the registry lists none that D365 F&O X++ requires.
  3. Add D365 F&O X++ to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the D365 F&O X++ tools to confirm the connection.
  5. Run one read-only task with D365 F&O X++ first, and keep your app asking before each tool call until the results look right.

D365 F&O X++ compared with similar servers

  • Eplan by Canary-ECAD has fewer GitHub stars than D365 F&O X++ (178 against 178); both are community servers, and Eplan runs as a remote server and D365 F&O X++ runs on your own machine.
  • RvtMcp by bimwright has more GitHub stars than D365 F&O X++ (179 against 178); both are community servers, and both run locally.
  • PDF by jztan has fewer GitHub stars than D365 F&O X++ (178 against 178); both are community servers, and both run locally.

Before you connect D365 F&O X++

  • Give D365 F&O X++ its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each D365 F&O X++ tool call until you trust what it does with them.
  • Treat text that D365 F&O X++ fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for D365 F&O X++ on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for D365 F&O X++

How marketing and sales teams put D365 F&O X++ to work, by company size. Pick the size closest to yours and start D365 F&O X++ on one use case.

Small business

  • A small business with a developer can use D365 F&O X++ to ship site and tracking fixes faster, with the AI reading the code it changes.
  • Technical founders can ask D365 F&O X++ to explain and fix a marketing site issue without context switching between tools.
  • D365 F&O X++ runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Growth engineers can use D365 F&O X++ to build landing pages, tracking and integrations in fewer cycles, with reviews kept in the normal flow.
  • Marketing ops engineers can connect D365 F&O X++ to keep scripts and automations documented and versioned as they change.
  • Start D365 F&O X++ on one workflow with one owner, measure the time it saves, then roll it out to the wider team.

Enterprise

  • Enterprise engineering teams can roll out D365 F&O X++ with repo scopes and audit logs, so agents work only where they are allowed.
  • Platform teams can standardize on D365 F&O X++ so web and marketing engineering share one reviewed way of working with AI.
  • D365 F&O X++ is a community server, so have security review the code and pin a version before D365 F&O X++ touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

D365 F&O X++ README

From dynamics365ninja/d365fo-mcp-server on GitHub, shared under its MIT license. Images are left out; the original has them.

README.md

D365 F&O MCP Server

Grounded AI development for Dynamics 365 Finance & Operations

23 MCP tools that know every X++ class, table, form, EDT and label in your D365FO codebase,
so GitHub Copilot and Claude Code write X++ that compiles.

The install buttons connect an editor to a server that is already deployed, no server yet? Start with the Quick start.

Quick start · How it works · What to ask · Tools · Docs · Changelog

💡 Why

AI assistants are excellent at C#, Python and JavaScript. X++ is different: your D365FO codebase is private, deeply customized and invisible to every model, so the AI confidently writes code against methods, fields and labels that do not exist, and it does not compile.

This server pre-indexes your whole D365FO installation, 580 000+ symbols across standard, ISV and custom models, plus 20M+ label rows, and puts it behind MCP tools. Every signature, every existing CoC wrapper, every label and every form pattern is checked against your metadata before the AI writes a line, and a write that cannot be proven is refused.

Without this server With this server
Method signatures Guessed → compile errors Exact, read from your codebase
Existing CoC wrappers Manual AOT search extension_info(mode="coc") in < 50 ms
New forms Hand-written XML, broken patterns Cloned from a reference form, validated against the platform's pattern rules
Labels Hardcoded strings The right existing @SYS / @Module label, found instantly
Security chains Hours of manual tracing Role → Duty → Privilege → Entry point in one call
Generated code Hallucinated fields and types Every reference proven against the index, gated before write

🧭 How it works

  1. Index, the server extracts your AOT metadata once into two SQLite databases (symbols and labels, FTS5 search in < 10 ms). On a D365FO VM the C# metadata bridge adds live reads through Microsoft's own IMetadataProvider and compiler-resolved cross-references from DYNAMICSXREFDB.
  2. Ground, before the agent writes anything, prepare hands it the real signatures, existing extensions, naming rules and a short-lived grounding token for the target object.
  3. Gate, validate_code proves every type, field, method and label in the generated code and checks the best-practice rules; forms are also checked against the platform's pattern rules. Writes are fail-closed: anything unproven is blocked and the agent gets structured fixes.
  4. Build, the write lands through the bridge (or a validated XML writer where the provider cannot express the object), is added to your .rnrproj, and can be compiled, BP-checked, synced and unit-tested from the same chat.

A typical change, end to end:

flowchart LR
    ask(["💬 Your prompt"]) --> prep["<b>prepare</b><br/>signatures · existing CoC<br/>grounding token"]
    prep --> gen["Agent writes X++"]
    gen --> val{"<b>validate_code</b><br/>references + BP"}
    val -- "unproven identifier<br/>or BP error" --> gen
    val -- "all proven" --> write["<b>d365fo_file</b><br/>write + .rnrproj"]
    write --> build["<b>build_d365fo_project</b><br/>xppc · BP · DB sync"]
    build -- "compile error" --> gen
    build -- "green" --> done(["✅ Ready for review"])

    classDef gate fill:#bc4c00,stroke:#bc4c00,color:#ffffff
    classDef ok fill:#1a7f37,stroke:#1a7f37,color:#ffffff
    class val gate
    class done ok
Form development pipeline, patterns are rules, not suggestions

Forms are the hardest artifact to generate correctly: each pattern dictates required containers, their order and the allowed sub-patterns. The form pattern engine turns that into a guided pipeline, grounded in pattern statistics mined from your own environment:

flowchart LR
    A["<b>object_patterns</b><br/>analyze · recommend"] --> B["<b>object_patterns</b><br/>spec"]
    B --> C["<b>generate_object</b><br/>scaffold · cloneFrom"]
    C --> D{"<b>object_patterns</b><br/>validate"}
    D -- "violations" --> C
    D -- "clean" --> E["<b>d365fo_file</b><br/>create + .rnrproj"]

    classDef gate fill:#bc4c00,stroke:#bc4c00,color:#ffffff
    class D gate

Violations the compiler would reject (wrong order, missing container, disallowed control) block the write; recommendations only warn. Patterns without a reference form are expanded deterministically, and a form's missing required controls can be repaired automatically.

🚀 Quick start

[!IMPORTANT] From D365FO platform update 10.0.49 (PU74), Visual Studio 2026 is the supported IDE for X++ development, Microsoft no longer supports VS 2022 there. Earlier platform versions still use VS 2022 ≥ 17.14. learn.microsoft.com/en-us/dynamics365/fin-ops-core/fin-ops

🖥️ Install on your D365FO VM, the usual case

One line in PowerShell installs Node.js if it is missing, installs the server from npm and runs the setup wizard, which asks where the index should live and builds the C# bridge for you:

irm https://raw.githubusercontent.com/dynamics365ninja/d365fo-mcp-server/main/install.ps1 | iex

Already have Node.js 24+? Skip the bootstrap:

npm install -g d365fo-mcp
d365fo-mcp setup

Re-running either is safe. An installation made before the npm package existed is a git checkout; both commands leave it where it is and update it in place.

🔌 Connect to a server your team already runs

Nothing to install, point your editor at it (or use the install buttons at the top):

npx d365fo-mcp connect https://your-server.azurewebsites.net
☁️ Deploy one shared server for the whole team

The metadata index lives in Blob Storage and downloads automatically on startup.

Full guide, including the Azure DevOps pipelines that keep the index fresh: docs/SETUP_AZURE.md.

[!TIP] Every path ends with the instruction file (CLAUDE.md / copilot-instructions.md) that teaches the agent the grounding workflow, and a one-minute check that grounding really works. Both are in docs/QUICK_START.md, don't skip them.

Which deployment fits?, local, shared or hybrid
flowchart LR
    agent(["🤖 Copilot · Claude Code"])

    subgraph cloud["☁️ Azure · shared, read-only"]
        app["App Service<br/>search · knowledge · patterns"]
        blob[("Blob Storage<br/>prebuilt index")]
    end

    subgraph vm["🖥️ Your D365FO VM"]
        local["Local server<br/>full or write-only"]
        bridge["C# bridge"]
        pld[("PackagesLocalDirectory")]
    end

    pipe["Azure DevOps<br/>extract → build → upload"] --> blob
    blob -- "download on startup" --> app
    agent -- "search & read" --> app
    agent -- "write · build · test" --> local
    local --> bridge --> pld
Mode Where What it does
Full your D365FO VM Everything, search, generation, writes, build, tests. The simplest setup.
Read-only Azure App Service Shared index for the whole team; no writes, nothing installed on developer machines.
Hybrid Azure + a local write-only companion The team shares one index in Azure; each developer's VM only writes, builds and tests.

Scenarios A–F in detail: docs/SETUP.md · server modes and tool profiles: docs/MCP_CONFIG.md.

💬 What to ask

You never name tools, the agent picks them. Ask the way you would ask a colleague who knows the codebase:

You ask The server
"Add a CoC wrapper to SalesLine.validateWrite that blocks negative quantities" Reads the exact signature, lists existing wrappers, proves every reference, writes the extension class
"Create a table ContosoRentEquipmentTable with a SimpleList form and labels in en-US and de" Checks names for collisions, reuses EDTs, picks the form pattern, creates labels, adds everything to the project
"Who has access to the VendPaymTerms form?" Walks Role → Duty → Privilege → Entry point, including OLS policies
"Is there a label for 'payment terms'?" Full-text search over every label file and language, custom models first
"Where is CustTable::find called from?" Compiler-resolved cross-references from DYNAMICSXREFDB, every caller and reference type
"Build the project, run BP and the SysTests" MSBuild with structured xppc diagnostics, xppbp, SysTestRunner, all from chat

More real tool chains: docs/USAGE_EXAMPLES.md.

✨ Capabilities

🔍 Full-codebase intelligence Classes, tables, forms, EDTs, enums, security artifacts and 20M+ labels, indexed with FTS5, search in < 10 ms. On a D365FO VM, live metadata and compiler cross-references through the C# bridge.
🛡️ Grounded generation Fail-closed gates: prepare issues grounding tokens, validate_code proves every identifier and enforces best-practice rules, hallucinated code never reaches disk.
🧩 Form pattern engine The full catalog of Microsoft form patterns and sub-patterns: recommends a pattern, clones reference forms with datasource re-binding, expands patterns that have no reference form, repairs missing required controls and blocks invalid writes.
✍️ Safe metadata writes Through Microsoft's own IMetadataProvider wherever it can express the object; structured XML writers with ambiguity guards for the rest, never blind string replacement. Automatic .rnrproj registration and one-call undo.
🏷️ Tags on writes <Tags> on created objects and added elements (tags argument or D365FO_DEFAULT_TAG), set or cleared on existing objects with modify-property propertyPath="Tags".
🏗️ SDLC from chat MSBuild with structured diagnostics, DB sync, xppbp, SysTestRunner. Optional restartAos: true refreshes the local AOS after a build, runtime restart.
📐 X++ knowledge base Queryable rules for select grammar, CoC authoring, financial dimensions, LedgerVoucher posting, number sequences, SysExtension, Electronic Reporting and AX 2012 → D365FO migration, keeps deprecated APIs out.

Opt-in tools, off by default and not even published until you configure them:

🗄️ axdb_sql Read-only, parameterized queries against AxDB on the development VM, so the agent can check what the code actually persisted. Windows authentication, one SELECT validated on the parsed T-SQL tree, always rolled back. Setup
🗂️ tfvc Pending changes, add/undo/diff and check-in for metadata under TFVC, with work items linked and resolved as Visual Studio does, confined to the active model and project, never the whole PackagesLocalDirectory. Setup
⏱️ trace_d365fo Captures the AOS's ETW events while a slow scenario is reproduced and shows where the time goes, per X++ method, and which SQL statements run thousands of times from one caller. No timer code added. Setup and accuracy

🧰 The 23 tools

Several tools are unified behind a discriminator (mode, action, domain, objectType), so the agent chooses from fewer, broader tools.

Area Tools
🔍 Discover search · get_object_info · find_references · labels
🧠 Understand get_knowledge · analyze_code · extension_info · security_info · object_patterns
🛡️ Ground & validate prepare · validate_code · validate_object_naming
✍️ Generate & write generate_object · d365fo_file · update_symbol_index
🏗️ Build & verify build_d365fo_project · run_bp_check · run_systest_class · verify_d365fo_project · get_workspace_info
🧪 Opt-in diagnostics axdb_sql · trace_d365fo · tfvc

Workspaces that already run other MCP servers can set MCP_TOOL_PROFILE=core to publish only the 18-tool create-and-build loop. Every tool, parameter and example prompt: docs/MCP_TOOLS.md.

No MCP client, or a script? d365fo-mcp call <tool> key=value … runs any of them from a shell against a running server: Tools from a shell.

🧪 How we keep it honest

Gates prove a single write is grounded. The eval loop checks the server as a whole: a dozen task types are implemented through the grounded tools on a real D365FO VM, then judged by a full build, the best-practice check, structural assertions on the written metadata and, where behaviour matters, SysTests.

flowchart LR
    run["<b>Run</b><br/>each task type on the VM<br/>through the grounded tools"] -- "report" --> fix["<b>Improve</b><br/>reproduce → fix → PR"]
    fix -- "human review & merge" --> srv["<b>d365fo-mcp</b><br/>tools · knowledge · validators"]
    srv -. "rerun what failed" .-> run

How to run it and add a task: eval/README.md. The loop opens pull requests; humans review and merge them.

📚 Documentation

The full map, grouped by audience: docs/README.md.

🤝 Contributing & security

Issues and pull requests are welcome, read CLAUDE.md for the repository conventions (every user-visible change gets a CHANGELOG entry) and docs/NEW_TOOL_CHECKLIST.md before adding a tool. Please report vulnerabilities privately as described in SECURITY.md.

📄 License

Released under the MIT License. By submitting a pull request you agree that your contribution is licensed under the same MIT License.

Questions about D365 F&O X++

What is the D365 F&O X++ MCP server?

X++ code intelligence for Dynamics 365 F&O: search, object info, codegen, build and BP check. D365 F&O X++ is maintained by dynamics365ninja on GitHub at dynamics365ninja/d365fo-mcp-server, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the D365 F&O X++ MCP server?

Add D365 F&O X++ to your AI app's MCP config with the command npx -y d365fo-mcp@1.26.2 serve. In Claude Code, run claude mcp add --transport stdio d365fo -- npx -y d365fo-mcp@1.26.2 serve. To run D365 F&O X++ this way you need Node.js installed.

Does D365 F&O X++ need an API key?

The registry lists no required keys for D365 F&O X++. Check the D365 F&O X++ README for optional settings, and expect a remote server to ask you to sign in the first time you connect.

Is D365 F&O X++ an official MCP server?

No. D365 F&O X++ is a community server maintained by dynamics365ninja. Community servers can be excellent; read the code and the open issues before you give D365 F&O X++ access to company data.

What license is D365 F&O X++ under?

D365 F&O X++ is released under the MIT license, according to its GitHub repository. The license covers the code of D365 F&O X++; the service it connects to has its own terms.