D365 F&O MCP Server
This server provides 23 AI tools for grounded, hallucination-free D365 F&O development, indexing 580,000+ symbols across your codebase.
Search & Discovery: Fast full-text search for objects (classes, tables, forms, etc.), batch lookups, and extension filtering.
Metadata & Code Inspection: Retrieve detailed AOT object info, method signatures, and source code; supports batch and method-level reading.
Code Generation: Scaffold X++ for tables, forms, reports, CoC extensions, event handlers, security artifacts, and more, with pattern awareness and existing form cloning.
Code Analysis: Learn from existing patterns, implementations, completeness gaps, and API usage before generating new code.
File Management: Create new AOT objects (auto-registered in .rnrproj) or safely modify existing ones via IMetadataProvider; generate XML as text.
Reference Finding: Where-used analysis for classes, methods, fields, tables, enums, and labels.
Label Management: Search, create, update, rename, and bulk-manipulate labels across languages, with dry-run support.
Form Patterns: Analyze, recommend, validate, and repair form patterns (SimpleList, DetailsMaster, etc.) with structural checks.
EDT Suggestions: Fuzzy-matched EDT recommendations for new fields.
Security Analysis: Inspect privilege/duty/role hierarchies and reverse access chains (object → menu items → privileges → duties → roles).
Extensibility Analysis: Examine CoC extensions, event subscriptions, table merges, extension points, and get strategy recommendations.
Naming Validation: Check proposed names against conventions, ISV prefixes, and conflicts.
Workspace & Project Tools: Retrieve workspace configuration, verify objects on disk and in .rnrproj, and update the symbol index instantly after changes.
SDLC Integration: Compile (xppc.exe), run database sync (full/partial), execute Best Practices checks, and run SysTest unit tests.
Change Review & Undo: Review uncommitted changes for BP violations/patterns; safely rollback to last commit with index re-sync.
Knowledge & Validation: Query X++ best practices, diagnose errors with fixes; statically validate generated X++/XML syntax and semantic references before writing.
Grounded Context: One-call aggregator for provenance tokens and full context (signatures, CoC wrappers, naming, EDT suggestions, collision checks) to enable safe, validated code creation.
Provides 54 specialized tools for GitHub Copilot to interact with a D365FO codebase, enabling instant lookup of class signatures, table relations, EDT definitions, CoC extensions, menu items, security coverage, labels, and more, directly within Copilot's agent mode in Visual Studio.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@D365 F&O MCP ServerFind CoC extensions for CustTable.insert()"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
D365 F&O MCP Server
23 AI tools that know every X++ class, table, form, and EDT in your D365FO codebase
Grounded AI development for Dynamics 365 Finance & Operations — works with GitHub Copilot and Claude Code
These connect an editor to a server that is already deployed — see Quick Start if you still need to set one up.
Why
AI assistants excel at C#, Python, and JavaScript. X++ is different: your D365FO codebase is private, deeply customized, and invisible to every model — so AI confidently generates code that doesn't compile.
This server pre-indexes your entire D365FO installation (580 000+ symbols across standard, ISV, and custom models) and exposes it as 23 specialized MCP tools. Every signature, every CoC wrapper, every label, every form pattern — verified against your real metadata before the AI writes a single line.
Task | Without this server | With this server |
Method signatures | Guessed → compile errors | Exact, from your codebase |
Existing CoC wrappers | Manual AOT search |
|
New forms | Hand-written XML, broken patterns | Cloned from reference forms, validated against the pattern catalog |
Labels | Hardcoded strings | Right |
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 |
Related MCP server: MCP X++ Server
Capabilities
Feature | Description |
🔍 Full-codebase intelligence | 580K+ symbols indexed: classes, tables, forms, EDTs, enums, labels (20M+ rows), security artifacts — FTS5 search in < 10 ms |
🛡️ Grounded generation | Fail-closed gates: |
🧩 Form pattern engine | Complete catalog of Microsoft form patterns and sub-patterns: recommends the right pattern, clones reference forms with datasource re-binding, deterministically expands patterns that have no reference form, auto-repairs a form's missing required controls, validates structure and blocks invalid writes |
✍️ Safe metadata writes | C# bridge uses Microsoft's own |
🏗️ SDLC integration | MSBuild compilation with structured diagnostics, DB sync, xppbp best practices, SysTestRunner — all from chat |
📐 X++ knowledge base | Queryable rules: select grammar, CoC authoring, financial dimensions, the posting engine ( |
Pattern-grounded form development
Forms are the hardest artifact to generate correctly — each pattern dictates required containers, ordering, and allowed sub-patterns. The form pattern engine makes it a guided pipeline:
flowchart LR
A["object_patterns<br/>(domain=form, action=analyze)"] --> B["object_patterns<br/>(domain=form, action=spec)"]
B --> C["generate_object<br/>objectType=form, cloneFrom"]
C --> D["object_patterns<br/>(domain=form, action=validate) FP001–FP010"]
D -->|clean| E["d365fo_file<br/>(action=create) write + project"]
D -->|errors| CStructural violations (wrong order, missing container, disallowed control) block the write — recommendations only warn. Mined pattern statistics from your own environment ground every suggestion in reality.
Quick Start
From D365FO platform update 10.0.49 (PU74), Visual Studio 2026 is the supported IDE for X++ development — Microsoft no longer supports VS 2022. Earlier platform versions still use VS 2022 ≥ 17.14. Details
Installing on your own 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 | iexAlready have Node.js 24+? Then the one-liner has nothing to bootstrap and you can skip it:
npm install -g d365fo-mcp
d365fo-mcp setupRe-running either is safe. An installation made before the npm package existed is a git checkout, and both are left exactly where they are and updated in place.
Your team already runs a shared server? Then you install nothing — point your editor at it:
npx d365fo-mcp connect https://your-server.azurewebsites.netBoth paths in full — prerequisites, editor configuration for every scenario, the required instruction file, and how to verify grounding actually works: docs/QUICK_START.md
Azure Deployment
One shared instance for the whole team — the metadata index lives in Blob Storage and downloads automatically on startup.
Deployment guide: docs/SETUP_AZURE.md — includes CI/CD pipeline automation
Documentation
Getting started | Reference | Operations |
Quick Start — connect or install | ||
Usage examples — real tool chains | ||
Coverage — what the badge counts | ||
Backlog — deferred work | Eval loop — the self-improvement harness |
License
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceProvides AI-powered development tools including code generation, refactoring, debugging, performance optimization, and test generation, along with smart prompts for code analysis and documentation, and a built-in knowledge base of coding best practices.MIT
- Flicense-qualityDmaintenanceAn MCP server for Microsoft Dynamics 365 Finance & Operations that enables the creation, modification, and analysis of D365 objects like classes, tables, and forms. It integrates with Visual Studio 2022 to provide tools for X++ code extraction, codebase search, and safe object deletion with dependency validation.
- Alicense-qualityDmaintenanceEnables 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.259MIT
- AlicenseAqualityAmaintenanceExposes the full capabilities of Microsoft Dynamics 365 Finance & Operations to AI assistants through 49 comprehensive tools and standardized protocol interactions. It enables sophisticated workflows including OData operations, metadata discovery, and secure database analysis.4937MIT
Related MCP Connectors
Provide your AI coding tools with token-efficient access to up-to-date technical documentation for…
AI Agent with Architectural Memory. Impact analysis (free), tests and code from the graph (pro).
Debug, build, and manage Power Automate cloud flows with AI agents
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/dynamics365ninja/d365fo-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server