MCPSERV.CLUB
ntrtd

Dynamics 365 AI Agent MCP Server (.NET)

MCP Server

Gateway exposing D365 logic via the Model Context Protocol

Stale(55)
2stars
1views
Updated Jul 15, 2025

About

A .NET Core server that translates MCP tool calls into authenticated operations against Dynamics 365 OData APIs, enabling AI agents to perform business logic seamlessly across multiple D365 instances.

Capabilities

Resources
Access data sources
Tools
Execute functions
Prompts
Pre-built templates
Sampling
AI model interactions

Dynamics 365 AI Agent – MCP Server (.NET)
The is the bridge that lets an AI assistant speak directly to a Dynamics 365 instance. By exposing D365’s business logic as MCP tools, the server allows any MCP‑compliant client—such as a LangGraph orchestrator or CopilotKit action—to perform complex data operations without embedding proprietary API calls in the assistant’s code. This solves a common pain point for developers: keeping business‑logic maintenance separate from AI logic while still enabling the assistant to create, read, update, or delete D365 records on demand.

At its core, the server receives an MCP request and translates it into a typed call against the Dynamics 365 OData API. It ships with a curated set of tools (e.g., , , ) that encapsulate common D365 workflows. Each tool validates its parameters, invokes the generated C# OData client, and packages the result into an . Errors from D365 are caught and returned in a standard MCP error format, ensuring the assistant can handle failures gracefully.

Key capabilities include:

  • Secure authentication – The server uses Azure AD Client Credentials flow, pulling secrets from Azure Key Vault, to obtain tokens for each D365 instance it serves.
  • Multi‑instance support – Parameters can target different tenant or legal entity URLs, allowing a single server to serve multiple customers or environments.
  • Container‑ready – Built as an ASP.NET Core app and packaged in Docker, it can be deployed to Azure Container Apps, AKS, or any Kubernetes‑compatible platform.
  • Standardized interface – By adhering to the MCP specification, any client that understands MCP can discover and invoke these tools without custom adapters.

Typical use cases involve building conversational agents that need to pull customer data, create sales orders, or trigger billing processes in real time. For example, a support chatbot could ask a user for an order number, call the tool via MCP, and return the current state—all without exposing internal D365 APIs to the client. The server’s robust error handling and type‑safe OData client reduce runtime failures, making it reliable for production workloads.

In practice, developers integrate the MCP server by deploying it to their preferred Azure environment, configuring the D365 connection strings and Key Vault references, and then wiring an MCP client (e.g., ) into their AI orchestrator. The result is a clean separation of concerns: the assistant focuses on dialogue and intent, while the MCP server guarantees secure, consistent access to Dynamics 365 data and operations.