D365 MCP Server

.NET Core D365 MCP Server exposing Dynamics 365 tools. Uses .NET OData client.

Local serverstdio

What is the D365 MCP Server?

.NET Core D365 MCP Server exposing Dynamics 365 tools. Uses .NET OData client.

What you get

This repository contains the source code for the .NET Core implementation of the Dynamics 365 Model Context Protocol (MCP) Server. This server is a key component of the D365 AI Agent system, responsible for exposing Dynamics 365 business logic and data operations as standardized MCP tools.

The d365-agent-mcpserver-dotnet acts as a dedicated gateway to Dynamics 365. It receives MCP tool execution requests from clients (primarily the d365-agent-orchestrator via the d365-agent-mcpclient-ts library) and translates them into operations against the D365 OData API.

  • MCP Tool Implementation: — Defines and implements a suite of MCP tools that encapsulate specific Dynamics 365 operations (e.g., getCustomerDetails, createSalesOrder, simulateInvoicePostToD365, getPurchaseOrderStatus)
  • D365 OData Interaction: — Utilizes a generated, type-safe C# OData client (from the d365-agent-odataclient-dotnet repository) to perform all communications with the Dynamics 365 OData endpoints
  • D365 Authentication: — Manages secure authentication (typically Client Credentials flow) with Dynamics 365, retrieving necessary credentials from Azure Key Vault
  • Multi-Instance Support: — Designed to handle requests targeting multiple Dynamics 365 instances or legal entities, based on parameters passed in the MCP tool calls
  • Standardized Interface: — Exposes D365 capabilities via the Model Context Protocol, allowing any MCP-compliant client to discover and use its tools
  • Error Handling: — Implements robust error handling for D365 operations and communicates errors back via standard MCP error responses

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Example prompts to try

  • “Use D365 to Multi.”
  • “Use D365 to Containerization.”

Frequently asked questions

The server requires .NET Core / ASP.NET Core, the D365 Agent C# MCP SDK, a generated D365 OData client, and MSAL.NET for authentication. It is containerized with Docker for deployment on Azure Container Apps or AKS.