How to set up the new Dynamics 365 ERP MCP server

Earlier this week, Microsoft released a preview of the new Dynamics 365 ERP MCP server. This is a big step in enabling Dynamics 365 as a headless ERP system to be used by AI agents. In this post, you can read more about the Model Context Protocol (MCP), how to enable the preview, and set up the new MCP server.

MCP server

MCP stands for Model Context Protocol. This is a standardized interface for facilitating communication between AI agents and tools or systems. It is often referred to as the USB-C for AI. It is an open standard introduced by Anthropic and makes integrations easier for Large Language Models (LLMs) to connect and interact with resources such as Dynamics 365 F&O. This organization also publishes language models. More about this will be discussed further in this post.

Dynamics 365 ERP MCP server

Earlier, an MCP server was already released for Dynamics 365 F&O with a limited tool set. It only supported 13 features, mostly Supply Chain Management-related. You could, for example, find on-hand inventory of product, convert a requisition into a purchase order, or match vendor invoices.

This was all static, and in case you want to support all features of Dynamics 365 F&O, this would be an insane number of supported tools. The next question is then how to deal with customizations?

The answer was revealed to the world on November 11 by a blog post from Microsoft. In this blog post, it was announced that the MCP server for Dynamics 365 F&O will be dynamic, enabling all ERP features, including ISV solutions and customizations. This is just a small summary; the blog post contained more important information. You can read it here: Dynamics 365 ERP MCP Server: Adaptive & Analytics-Ready

The result is that thousands of features are now enabled via server forms for an agent to navigate through the application and perform tasks, such are retrieving information and maintaining data.

Set up Dynamics 365 ERP MCP (preview)

In this blog post, you will read how to enable the MCP for Copilot Studio. The first prerequisite for using this MCP server is to get a Tier 2 or PPAC-deployed environment ready on Dynamics 365 F&O version 10.0.46, which is currently in preview.

When you have an environment available, you should enable the option (Preview) Dynamics 365 ERP Model Context Protocol server in Feature management. In case the feature is not available while the environment is on the minimum supported version, you can click on the button Check for updates at the top-right side of the list page.

Once this is enabled, you can set up the MCP in Copilot Studio or VsCode (GitHub Copilot). In case you want to use the MCP in another tool, you first need to create a new App registration in Entra ID and grant access.

On a new Allowed MCP clients form, you can enable the clients or add new clients by specifying the Client ID of the App registration. You can find this form in System administration > Setup.

In Copilot Studio, you can create a new agent and provide information, such as a name, description, and instructions.

Microsoft is recommending using the Claude Sonnet 4.5 language model. Initially, I tried using the MCP with the default model, but the agent came alive by using the model from Antropic. The external models are not enabled by default. A global administrator needs to allow using these models.

Open the Microsoft 365 Admin Center (https://admin.microsoft.com) and browse to Copilot > Settings and then open the tab page Data access.

To change the settings, click on AI providers for other large language models. Note that all requests will be handled by external services, which should be understood before your organization agrees to enable the Anthropic models.

Enabling the provider can take several hours. After that, you can change the model in the agent from the default GPT-4.1 to Claude Sonnet 4.5.

The MCP server should be added as a tool in the agent.

Ensure you choose the correct Dynamics 365 MCP server. Currently, both the previous and the new preview servers are available.

A connection should be created or selected. Then you can click on Add and configure. You can now test the agent by asking questions. Note that the responses are slow at this moment in time. This is because data is sent externally, and the MCP agent is accessing the application by finding menu items, opening forms, and filtering data. Via several actions, it can achieve the request. The more specific you ask your question, the better the agent will understand your question.

In case you have consistent wrong results, you can not only change your question, but you can also change the instructions and help the agent know what to do in case of specific scenarios. E.g., when I asked the agent to create a transfer journal, the agent thought that a movement journal was also appropriate.

If you are confident, you can publish the agent.

Add channels

Note that the newly created agent is not recognized in the Dynamics 365 F&O Copilot sidecar. If you want to extend the features of the sidecar, you can read my other blog. Enable Model Context Protocol (MCP) in the Dynamics 365 F&O sidecar

You can enable the agent to be used in e.g. Microsoft Teams by adding a channel.

Select and click the option Teams and Microsoft 365 Copilot. After adding the channel, you can make some changes, like the icon and the description. Also, other Teams settings are available, like the option for users to allow them to add the agent to a team. You can share the Agent to all users, which will require an admin approval via Microsoft Teams Admin Center.

After adding the agent in Teams, you can start asking questions. Be aware that the preview is slow. I must confess that at this moment, the Teams chat seems not to be responding in my environment. I’m looking into settings to find the culprit. By adding the MCP server to the Copilot for finance and operations apps agent, the sidecar is working well with the MCP tool.

There is more…

The Dynamics 365 ERP MCP (preview) server is mind-blowing. You can interact with business data by just providing natural language. In case you want to have the system creating a customer for you, you can just use as example the next prompt:

Please create a customer with ID NL-002, Name is Next365 Netherlands, Group 20, Currency Euro and having the next address: Johan Huizingalaan 163A Amsterdam

In this prompt, the country is not provided. The MCP server, in connection with the Claude Sonnet 4.5 model, recognizes the country based on the city.

The MCP server is accessing the application like a user opens the menu items to perform the tasks. For that reason, it can do almost all you request. This includes forms like user settings, but also your customizations and installed ISV solutions.

Give it a try yourself and provide feedback to Microsoft to be able to improve the MCP server for the future.

You can read more about the Dynamics 365 ERP MCP server on Microsoft Learn:

Use Model Context Protocol for finance and operations apps – Finance & Operations | Dynamics 365 | Microsoft Learn

Build an agent with Dynamics 365 ERP MCP (preview) – Finance & Operations | Dynamics 365 | Microsoft Learn



I do hope you liked this post and will add value for you in your daily work as a professional. If you have related questions or feedback, don’t hesitate to use the Comment feature below.


That’s all for now. Till next time!

25 replies
  1. Zain
    Zain says:

    Hey Andre, I tried this but after adding the MCP Preview to the agent, it does not return the set of tools it is supposed to return. The feature is enabled in the environment and allowed MCP clients are also set up. I’m not sure what else to look into. There are no errors either. Any suggestions?

    Reply
  2. Pratik K
    Pratik K says:

    Hi Adre, Even I am facing the same error. I can not see the tools in agent. Enabled feature and configured all required setup.
    Error in Tools section –
    “[{\”jsonrpc\”:\”2.0\”,\”error\”:{\”Code\”:401,\”Message\”:\”The response is not in a JSON format.\”}}]”

    Error when try to run agent –
    “reasonCode”:”RequestFailure”,”errorMessage”:”Connector request failed”,”HttpStatusCode”:”unauthorized”,”errorResponse”:”[{\”jsonrpc\”:\”2.0\”,\”error\”:{\”Code\”:401,\”Message\”:\”The response is not in a JSON format.\”}}]”,”dialogSchemaName”:”cr482_foMcpAgent.action.FinOpsAppsDynamics365-Dynamics365ERPMCPPreview”}

    Reply
  3. Danny A
    Danny A says:

    Hey, do you have an example on how to connect to VsCode? What is the remote url of this MCP server? I could not find any documentation for that?

    Reply
  4. Hasna
    Hasna says:

    Hi Andre, Awesome work, I managed to create the agent and publish it. I’m also facing the same issue on Microsoft Teams not populating the data.

    Did you manage to find the fix for that ?

    Reply
  5. Sridhar Narayanan
    Sridhar Narayanan says:

    Hi Andre, I could add “Dynamics 365 ERP MCP (Preview)” and configure the connection. But I couldn’t see any of the executable functionalities which the MCP tools offer such as click_control, close_form etc. I can see error “Connector request failed. Couldn’t retrieve the requested items”. Am I missing any other setup?

    Reply
  6. Sridhar Narayanan
    Sridhar Narayanan says:

    I can see the error as “Connector request failed. Couldn’t retrieve the requested items”
    In the view details I could see below message
    “[{\”jsonrpc\”:\”2.0\”,\”error\”:{\”Code\”:500,\”Message\”:\”\\u0027value\\u0027 property missing or empty in response body. Raw Body: {\\u0022@odata.context\\u0022:\\u0022https://globaldisco.crm.dynamics.com/api/discovery/v2.0/$metadata#Instances(FinOpsUrl)\\u0022,\\u0022value\\u0022:[]}\”}}]”

    Reply
    • André Arnaud de Calavon
      André Arnaud de Calavon says:

      Hi,

      I think I missed to reply on this question. Apologies. You might check permissions, or licenses. Also check if there are policies that disables some connectors. E.g. check Data Loss Prevention or Advanced Connector Policies for the Power Platform environment.

      Reply

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.