freshcrate
Skin:/
Home > MCP Servers > d365fo-mcp-server

d365fo-mcp-server

๐Ÿš€ MCP server for Dynamics 365 Finance & Operations with standard and custom indexed X++ objects. Provides IntelliSense-like code navigation, intelligent EDT suggestions, AI-driven table/form generati

Why this rank:Strong adoptionRecent releaseHealthy release cadence

Description

๐Ÿš€ MCP server for Dynamics 365 Finance & Operations with standard and custom indexed X++ objects. Provides IntelliSense-like code navigation, intelligent EDT suggestions, AI-driven table/form generation, and pattern-based code completion for GitHub Copilot integration.

README

D365 F&O MCP Server

54 AI tools that know every X++ class, table, method, and EDT in your D365FO codebase

License: MIT Node.js TypeScript

Built for D365FO developers who write X++ in Visual Studio โ€” not for generic web dev


Why this exists

GitHub Copilot excels at C#, Python, and JavaScript โ€” languages with rich public training data. X++ is different. Your D365FO codebase is private, highly customized, and deeply interconnected: thousands of CoC extensions layered over standard Microsoft code, ISV packages adding their own tables and classes, custom EDTs that drive field validation across dozens of forms. Copilot has never seen any of it.

The result is AI that confidently generates code that doesn't compile: wrong method signatures, missing parameters, fields that don't exist on the table, CoC chains broken because Copilot didn't know an extension already wrapped the method.

This MCP server solves that by pre-indexing your entire D365FO installation โ€” 584,799+ symbols across standard and custom models โ€” and exposing it to Copilot as 54 specialized tools. Before generating any X++ code, Copilot can look up exact method signatures, check what CoC extensions already exist, trace security hierarchies, find label translations, and understand the full shape of your data model. The result is code that compiles on the first try and integrates correctly with your existing customizations.

Solution Architecture

Without this server With this server
Copilot guesses method signatures โ†’ compile errors Exact signatures pulled from your actual codebase
"Does CustTable.validateWrite() have any CoC wrappers?" requires manual AOT search find_coc_extensions answers in < 50 ms
ISV and custom model extensions invisible to Copilot All models fully indexed and searchable
Security hierarchy takes hours to trace manually get_security_coverage_for_object traces Role โ†’ Duty โ†’ Privilege โ†’ Entry Point instantly
Copilot generates hardcoded strings instead of label references search_labels finds the right @SYS/@MODULE label key immediately
"Which tables reference CustTable?" requires digging through AOT relations get_table_relations returns every FK relation and cardinality in one call
EDT base types and field lengths are a constant lookup get_edt_details returns the full EDT definition including extends chain
Copilot doesn't know which SysOperation framework class to extend search_classes with a description filter surfaces the right base class
New CoC extension may silently duplicate an existing one find_coc_extensions reveals all existing wrappers before you write a line
Menu item to form mapping requires navigating the AOT manually get_menu_item_details resolves the full path from menu item to form to data source

Key Capabilities

  • Massive Metadata Index: Instantly looks up signatures, tables, enums, EDTs across standard and ISV code out of 580,000+ objects.
  • Smart Object Generation: AI-driven tools build XML structures exactly matching D365 standard patterns (SimpleList, Forms, Tables).
  • X++ Knowledge Base: Queryable knowledge base of D365FO patterns, best practices, and AX2012โ†’D365FO migration guidance โ€” prevents deprecated API usage.
  • Code Review & Git Diff: Reviews uncommitted workspace changes locally matching D365 Best Practice metrics directly against Copilot chat.
  • D365 SDLC Native Integration: Triggers local MSBuild, sync.exe database updates, SysTestRunner tests, and xppbp.exe best practice validations smoothly behind the scenes.
  • XML Parsing without Corruption: Intelligently mutates AxTable and AxForm files locally avoiding the common string replacement corruption associated with VS agents.

Quick Start

Full step-by-step guide with all scenarios: docs/QUICK_START.md

Prerequisites โ€” install required software via d365fo.tools:

Install-D365SupportingSoftware -Name vscode,python,node.js
git clone https://github.com/dynamics365ninja/d365fo-mcp-server.git
cd d365fo-mcp-server
npm install

# Build the C# bridge (required on Windows D365FO VMs for file create/modify)
cd bridge\D365MetadataBridge
dotnet build -c Release
cd ..\..                         # Back to repo root

copy .env.example .env           # Set PACKAGES_PATH, CUSTOM_MODELS, LABEL_LANGUAGES, ...
npm run extract-metadata         # Extract XML from D365FO packages
npm run build-database           # Build SQLite index
npm run dev

UDE / Power Platform Tools? Run npm run select-config instead of setting PACKAGES_PATH manually.


Connect to GitHub Copilot

1. Enable MCP servers in Copilot at github.com/settings/copilot/features

2. In Visual Studio: Tools โ†’ Options โ†’ GitHub โ†’ Copilot โ†’ check Enable MCP server integration in agent mode

3. Create %USERPROFILE%\.mcp.json (covers all solutions on the machine, recommended) or place .mcp.json next to a specific .sln file:

{
  "servers": {
    "d365fo-azure": {
      "url": "https://your-server.azurewebsites.net/mcp/"
    },
    "d365fo-local": {
      "command": "node",
      "args": ["K:\\d365fo-mcp-server\\dist\\index.js"],
      "env": {
        "MCP_SERVER_MODE": "write-only",
        "D365FO_SOLUTIONS_PATH": "K:\\VSProjects\\MySolution",
        "D365FO_WORKSPACE_PATH": "K:\\AosService\\PackagesLocalDirectory\\YourPackageName\\YourModelName"
      }
    }
  }
}

4. Copy the Copilot instruction files so Copilot knows the D365FO workflow rules:

# Place .github in a parent folder shared by all your D365FO solutions, e.g.:
Copy-Item -Path ".github" -Destination "C:\source\repos\" -Recurse

Tip: Visual Studio 2022 searches for .github\copilot-instructions.md upward from the solution folder, so one copy in a common parent directory covers all solutions underneath โ€” no need to copy it into every solution separately.

Full config options (UDE paths, explicit projectPath, solutionPath): docs/MCP_CONFIG.md


Azure Deployment

Host on Azure App Service so the whole team shares one instance โ€” nobody needs the server running locally.

Deployment Modes

Resource Configuration Monthly cost
App Service Basic B3 4 vCPU, 7 GB RAM ~$52
Blob Storage ~2.5โ€“3.5 GB (symbols + labels, without/with UnitTest models) ~$3
Total ~$55 / month

The database downloads from Azure Blob Storage automatically on startup.

Setup guide: docs/SETUP.md ยท CI/CD pipeline: docs/PIPELINES.md

Deploy to Azure


Documentation

File Contents
docs/QUICK_START.md Start here โ€” 5 steps to get running, all .mcp.json parameters, logging
docs/SETUP.md Detailed installation, configuration, all deployment scenarios
docs/MCP_CONFIG.md .mcp.json reference โ€” workspace paths, UDE, project settings
docs/MCP_TOOLS.md All 54 tools with parameters and example prompts
docs/USAGE_EXAMPLES.md Practical examples: search, CoC, SysOperation, security
docs/ARCHITECTURE.md Technical architecture, dual-database design, cache invalidation
docs/BRIDGE.md C# Metadata Bridge reference โ€” mandatory on Windows VMs for all write operations
docs/CUSTOM_EXTENSIONS.md ISV / custom model configuration
docs/PIPELINES.md Automated metadata extraction via Azure DevOps

Release History

VersionChangesUrgencyDate
v1.21.0## What's Changed Changes since v1.20.0: - chore(release): 1.21.0 (b8fac55d) - fix: release 1.21 audit โ€” trace SQL grouping, BP summary order, config booleans, add-control moves (95c550ce) - chore(bridge): attest the build with the source stamp (#1115) (83eb6fae) - fix(cli): require a bridge rebuild when its sources changed (#1115) (2dd710b2) - fix(form): placement matches the bridge's design-root names, refuses a bad position before writing, and credits the XML writer (a6edd4da) - refactor(meHigh10/15/2026
v1.20.0## What's Changed Changes since v1.19.1: - chore(release): 1.20.0 (8bac60c5) - fix: three defects the 1.20.0 release review found in the unreleased field/entity writers (920bbd18) - fix: close the four open code scanning alerts (40ea194e) - fix(tables): refuse an invalid subscriberAccessLevel before the create (2e604d78) - fix(build): an AxLabelFile folder without label sources is not stale (61d6cc6f) - fix(find_references): dedupe a declaring-type call by its call line (5effb48e) - fix(labelsHigh10/2/2026
v1.19.1## What's Changed Changes since v1.19.0: - chore(release): 1.19.1 (df084439) - fix(update): run npm install -g outside the package it replaces (3752c6aa) High9/30/2026
v1.18.0## What's Changed Changes since v1.17.4: - fix(model-descriptor): a first module reference no longer duplicates the descriptor's properties (0ebbd13c) - fix(naming): generate_object names extension classes what create writes (62d723eb) - fix(modify): a skipped single operation no longer signs off on a write (b47a5f35) - feat(naming): let extension classes follow their own naming style (2970d820) - docs(bridge): say that editing bridge sources needs `npm run bridge:build` (0ab6e778) - chore(briHigh9/24/2026
v1.17.4## What's Changed Changes since v1.17.3: - chore(release): bump version to 1.17.4, update dependency lockfile (3be8d623) - fix(xref): escape LIKE metacharacters, and count the list that is printed (31757732) - fix(find_references): a bridge "empty" for an EDT is a zero, not an unknown (795e568c) - fix(startup, index): the two unbounded costs left on a first call, and retire the misplanned index (c6655feb) - fix(xref): decode Kind, return EDT where-used, detect CoC from [ExtensionOf] (c5d10d22)High9/10/2026
v1.17.3## What's Changed Changes since v1.17.2: - chore: finish the fixture anonymisation the July pass started (5f22a766) - docs(comments): placeholder model names in getModelObjectNames (32c7ec78) - chore(release): 1.17.3 (3678f5be) - fix(startup, readers): the three defects behind a 337 s first call (2d476e37) High9/7/2026
v1.14.0## What's Changed Changes since v1.13.0: - fix: the two loose ends from the audit (6b839f4a) - chore: bump version to 1.14.0 (5b5601dd) - fix(bridge): a read that cannot print must not take the loop down (a3cf20b8) - docs: stop prescribing the round trips that were just removed (41f77c57) - fix: bound a batch report, and answer a bad topics[] in words (5bbc6ba4) - refactor(naming): one set of naming rules, used by prepare as well (6f0c6b0b) - fix(d365fo_file): a wrong parameter SHAPE now answeHigh8/24/2026
v1.11.0## What's Changed Changes since v1.10.1: - chore: bump version to 1.11.0 (48a3987) - test: an extension reindexed from its file lands in extension_metadata (7e73379) - fix(index): write extension_metadata on a reindex, not only on a full build (ee841fb) - test: the re-read, and the two readers that called an inherited method missing (628269b) - docs(knowledge): put the pre-image rule where a validateWrite query lands (9f972b3) - feat(validate): COC006, a table CoC re-reading the record it alreHigh8/13/2026
v1.8.0## What's Changed Changes since v1.7.0: - fix(bridge): close single-op RPC dispatch gaps left by PR #804 (0f15f5b) - docs(diagram): fix the clients arrow z-order, drop VS 2022, add VS Code (821e9e5) - docs: give the eval loop its own block in the architecture diagram (3f9437a) - docs: correct architecture drift โ€” the bridge is not the sole write path (d5dcd46) - chore(release): v1.8.0 (1b4973d) - eval: close the final four closure-queue goldens - total coverage 78/78 (100%) (56751b6) - eval: cHigh8/4/2026
v1.1.0## What's Changed Changes since v1.0.0: - chore(release): 1.1.0 (e87dcd4) - docs: lead with the local install, restore the editor badges (3ddf662) - docs: move Quick Start out of the README and restructure it by path (cb41180) - feat(cli): add `connect` โ€” configure an editor for a deployed server (e1f56bb) - docs: move the one-click install badges into Quick Start (9cd890a) - docs: describe the npm package and what it does not replace (0f9e425) - chore(release): publish via trusted publishing,High7/21/2026
main@2026-07-08Latest activity on main branchHigh7/8/2026
0.0.0No release found โ€” using repo HEADHigh4/10/2026

Dependencies & License Audit

Loading dependencies...

Similar Packages

opengrok-mcp-serverOpenGrok MCP Server is a native Model Context Protocol server that bridges your organization's OpenGrok search engine with AI assistants โ€” enabling instant, natural language search and deep repositoryv9.6.0
az104-cert-buddyPrepare for the AZ-104 exam with guided labs, practice questions, and resources tailored for Azure Administrator Associate certification success.main@2026-06-11
hyperframesWrite HTML. Render video. Built for agents.v0.8.197
nx-plugin-for-awsThe @aws/nx-plugin is a collection of code generators that automate the creation and configuration of cloud-native applications using AWS, TypeScript, Python and React within the Nx development ecosysv1.3.0
studioOpen-source control plane for your AI agents. Connect tools, hire agents, track every token and dollarv4.519.0

More in MCP Servers

litellmPython SDK, Proxy Server (AI Gateway) to call 100+ LLM APIs in OpenAI (or native) format, with cost tracking, guardrails, loadbalancing and logging. [Bedrock, Azure, OpenAI, VertexAI, Cohere, Anthropi
claude-plugins-officialOfficial, Anthropic-managed directory of high quality Claude Code Plugins.
mcp-for-beginnersThis open-source curriculum introduces the fundamentals of Model Context Protocol (MCP) through real-world, cross-language examples in .NET, Java, TypeScript, JavaScript, Rust and Python. Designed for
casdoorAn open-source Agent-first Identity and Access Management (IAM) /LLM MCP & agent gateway and auth server with web UI supporting OpenClaw, MCP, OAuth, OIDC, SAML, CAS, LDAP, SCIM, WebAuthn, TOTP, MFA,