Skip to content

Dynamics 365 Sales MCP Server: Connect Claude Code or ChatGPT and Keep Control

Connect Claude Code or ChatGPT to the Dynamics 365 Sales MCP server: admin consent, two documented URLs, Copilot Credits, and which path writes CRM data.

Alex Pechenizkiy 12 min read Power Platform Release Gates and Agent Security hub
Dynamics 365 Sales MCP Server: Connect Claude Code or ChatGPT and Keep Control

Your sales ops team wants Claude Code or ChatGPT inside CRM, and the Dynamics 365 Sales MCP server makes the connection itself the easy part. Microsoft’s overview says the server lets AI agents “retrieve sales data, generate insights, draft emails, and perform other sales-related tasks”, and Learn’s Agent 365 Tooling Gateway page for Sales names Claude Code and ChatGPT among the clients that can connect.

The short version:

  1. A tenant admin consents to the Agent 365 Tooling Gateway app.
  2. Turn on the Sales agent or Copilot features you plan to use.
  3. Add https://agent365.svc.cloud.microsoft/mcp/environments/<environment-id>/servers/mcp_D365CX_Sales in a supported client and sign in.
  4. The Sales tools read and draft; record writes need the Dataverse server, and Claude Desktop is not supported for Sales.

The details are less tidy. Microsoft documents two different URLs for the same Sales server. One ends in msdyn_SalesMCPServer, on a connection page dated July 17, 2026. The other ends in mcp_D365CX_Sales, on the gateway page dated September 25, 2026. No page says one replaced the other. Learn’s Claude Code snippet also doesn’t match Anthropic’s documented format, and Learn’s ChatGPT menu path doesn’t match OpenAI’s current one.

Learn’s full name for the product is the Dynamics 365 Sales Model Context Protocol (MCP) server. Our view: treat the Dynamics 365 Sales MCP server as a service integration with identity, permissions, data flow and a budget, not as a chatbot add-on. Below is the documented path for each client, every place the sources disagree, and a checklist for before you switch anything on.

What the Dynamics 365 Sales MCP server exposes, and what it doesn’t

Microsoft’s overview lists three tool groups: Sales Qualification Agent capabilities, Sales Opportunity Agent capabilities, and Copilot in Dynamics 365 Sales capabilities. Its credit table lists 20 tools, such as get_lead_research, get_account_research, get_sales_lead_catchup and get_opportunity_top_risks.

Read the tool names closely. They are research, insight, summary and draft tools. The Sales Qualification Agent tools page describes the email tool as “Draft personalized sales qualification agent outreach emails”. It drafts. Learn says nothing about sending.

Each group also has a precondition. The pages for Sales Qualification Agent tools, Sales Opportunity Agent tools and Copilot in Dynamics 365 Sales tools each tell you to make sure the agent or feature is “configured and turned on”. Learn gives no detail on what the tools return when the feature is off, so turn it on before you test.

Two servers, two jobs

Record writes belong to a different server. In Microsoft’s examples, converting a responding lead into an opportunity uses create_record and update_record, and those tools sit on the Dataverse server, not the Sales server.

The overview blurs this with one line: “the Sales MCP server also supports tools for performing CRUD operations on Dataverse records”. That line links to the Dataverse tool list. The connection page and the Opportunity tools page are more direct: if you want CRUD, connect the Dataverse server as well.

Microsoft pairs the two servers. Sales tools handle insight and Dataverse tools handle CRUD. For the Dataverse side, read the az365 deep dive on Dataverse’s own MCP endpoint.

Connecting only the Sales server gives an assistant insight and drafts; adding the Dataverse server lets it create, update and delete records, so make those two decisions separately.

Which clients Microsoft documents, per server

Client support differs by server, and the differences matter before anyone installs anything. In the table, “gateway page” is the Agent 365 Tooling Gateway page for Sales. “Connect page” is the Sales connection page. “Dataverse pages” covers Learn’s main Dataverse MCP page, its non-Microsoft clients page and its VS Code and Copilot CLI page.

Client
Claude Code
Sales server (via the gateway)
Named, gateway page
Dataverse endpoint
Named, Dataverse pages
Client
ChatGPT
Sales server (via the gateway)
Named, gateway page
Dataverse endpoint
Not named on Learn
Client
VS Code with GitHub Copilot
Sales server (via the gateway)
Named, gateway and connect pages
Dataverse endpoint
Named, Dataverse pages
Client
GitHub Copilot CLI
Sales server (via the gateway)
Named, gateway page
Dataverse endpoint
Named, Dataverse pages
Client
Cursor
Sales server (via the gateway)
Named, gateway page
Dataverse endpoint
Not named on Learn
Client
Claude Desktop
Sales server (via the gateway)
Not supported, connect page
Dataverse endpoint
Named, Dataverse pages
Which AI clients Learn names for the Sales server and the Dataverse endpoint.

For Sales, Claude Code and ChatGPT are named only on the gateway page. The connect page is blunt about one client: “Claude Desktop isn’t supported at this time.”

Be precise about status. The Sales pages carry no status label, so they are neither “generally available” nor “preview”. On the Dataverse side, Learn calls /api/mcp “the generally available set of Dataverse MCP tools”. The @microsoft/dataverse local proxy that some Dataverse paths use is the Dataverse CLI, and its page is labeled preview.

If someone on the team runs Claude Desktop, there is no supported Sales route for them, so tell them before they spend an afternoon looking for one.

Admin setup through the Agent 365 Tooling Gateway

Learn describes the gateway as “the Microsoft-hosted gateway that fronts the Sales MCP server and handles authentication to Dataverse.” The prerequisites on the gateway page are short:

  • “System Administrator role to configure the MCP server.”
  • “Tenant admin or delegated admin-consent permissions.”
  • The Dataverse environment ID.
  • Gateway app ID ea9ffc3e-8a23-4a7d-836d-234d7c7565c1.
  • Admin consent through https://login.microsoftonline.com/<customer-tenant-id>/adminconsent?client_id=<ATG-app-id>, or the manual option az ad sp create --id <ATG-app-id>.

Two lines on that page shape the rollout: “Admin consent must be granted in advance in the customer tenant.” and “Each environment requires its own connector configuration.”

  1. 1

    Grant tenant admin consent

    A tenant admin consents to the Agent 365 Tooling Gateway app through the admin consent URL, or creates its service principal with the Azure CLI. Clients cannot get a token until this is done.

  2. 2

    Turn on the Sales features

    Confirm that Sales Qualification Agent, Sales Opportunity Agent or Copilot in Dynamics 365 Sales is configured and turned on for each tool group you plan to use.

  3. 3

    Build the server URL per environment

    Combine the gateway host, the environments path segment, your environment ID and the Sales server name. Repeat this for every environment you connect. Learn says a URL without the environments path segment returns a 404 RouteNotFound error.

  4. 4

    Add the URL in one client and sign in

    Add the server in Claude Code, ChatGPT, VS Code or GitHub Copilot CLI and complete Microsoft sign-in as a pilot user.

The gateway page gives the URL format as https://agent365.svc.cloud.microsoft/mcp/environments/<environment-id>/servers/mcp_D365CX_Sales.

Now the second conflict. The Sales connection page (July 17, 2026) gives https://agent365.svc.cloud.microsoft/mcp/environments/<EnvironmentID>/servers/msdyn_SalesMCPServer. The gateway page (September 25, 2026) gives the mcp_D365CX_Sales form above. Our view: this walkthrough uses the gateway URL because it is on the newer page. Learn doesn’t state whether the older URL still works.

There is a second gap. The connection page lists the Dataverse “Allow MCP clients” setting as a prerequisite for clients other than Copilot Studio. The gateway page doesn’t mention it. Our view: the admin should check that setting for the target environment rather than assume either way.

The data boundary needs to be read verbatim. The gateway page says: “US NOTICE: Enabling this feature will allow data to egress outside of the FedRAMP High boundary.” It adds that “This data might include queries and other data submitted to agents by users in your organization.”

Separately, Learn’s AI agents page for Sales says data that the Sales AI agents use “might be processed and stored in regions outside of the user’s primary region”. That line is about the Sales AI agents in general, not about MCP calls specifically, but your data residency owner should read both.

Consent is per tenant and configuration is per environment. Our view: start with one non-production environment.

Claude Code and Dynamics 365 Sales: add the server over HTTP

Connecting Claude Code to Dynamics 365 Sales starts with sign-in: Learn lists Claude Code as a discovery-capable client, so no manual client ID or secret is needed. The gateway page describes sign-in this way: “When Claude Code makes its first MCP request, it discovers the Agent 365 Tooling Gateway OAuth metadata, opens Microsoft sign-in, and stores tokens locally after the user authenticates.”

The configuration is where the sources split. Learn’s gateway page (September 25, 2026) shows a JSON entry for d365-sales under mcpServers, with type and url nested inside a transport object. Anthropic’s Claude Code docs (undated, as fetched November 15, 2026) say: “A JSON entry that has a url but no type is a configuration error, because Claude Code reads an entry with no type as a stdio server.” Neither page mentions the other.

Anthropic documents claude mcp add --transport http <name> <url> as the way to add an HTTP server. The line below combines that documented syntax with Microsoft’s documented gateway URL format, using placeholder values. Our view: it is illustrative, not a Learn sample.

claude mcp add --transport http d365-sales https://agent365.svc.cloud.microsoft/mcp/environments/<environment-id>/servers/mcp_D365CX_Sales

To sign in, Anthropic’s docs say: “Use /mcp to authenticate with remote servers that require OAuth 2.0 authentication”.

Our view: the two vendors disagree on the entry shape and neither acknowledges the other, so check both pages before rollout. Use Microsoft’s URL and consent for the server, and Anthropic’s docs for how Claude Code adds it.

Connect ChatGPT to Dynamics 365 Sales

To connect ChatGPT to Dynamics 365 Sales, you again have two sets of instructions that don’t match. Learn’s gateway page (September 25, 2026) says: “Open Settings > Connectors > MCP Servers.” Then you add the URL, select Connect, and “Sign in when the Microsoft authentication flow opens.”

OpenAI’s docs (undated, as fetched November 15, 2026) describe a different path: “Go to ChatGPT Plugins.”, then “Select the plus button, then Add custom MCP server.” and then “Select Create as a plugin.” OpenAI also says “Access: Use ChatGPT on the web.” and “Workspace permissions and security restrictions, including Lockdown, apply to adding and using custom MCP servers.”

Neither source says which ChatGPT plans allow this.

Two OpenAI lines belong in your rollout notes: “Write actions by default require confirmation.” and “Only connect to MCP servers you trust.”

Our view: confirm that your ChatGPT workspace settings allow custom MCP servers before you promise this to the sales team.

VS Code and GitHub Copilot CLI

For VS Code, the gateway page says “Enter MCP: Add Server.” and pick the HTTP type. The configuration is a servers block with a d365-sales entry whose type is http and whose url is the gateway URL.

For GitHub Copilot CLI, the instruction is “Add the server to .mcp.json.” The file uses mcpServers, again with a d365-sales entry holding type and url.

Our view: no vendor page here contradicts Learn’s VS Code or Copilot CLI steps, so either suits a first pilot. The two-URL question still applies.

Run a read-only first test

Our view: make the first call a catch-up or summary tool, not a Dataverse write. get_sales_lead_catchup is a good choice. Learn describes that tool group as “Retrieve recent changes to leads, accounts, and opportunities owned by the user”.

Check one thing: run the call signed in as a pilot rep with a normal Sales role, not as the System Administrator who configured the gateway. Learn says the gateway “performs the on-behalf-of exchange that allows the request to reach Dataverse”, so the call runs as that user. Learn describes the catch-up tools as covering records “owned by the user”, so compare the results with what that rep sees in Dynamics 365 Sales.

Learn documents no report or admin view for Sales MCP credit use, so don’t plan the test around one. Only after this call looks right should you decide whether to add the Dataverse server and its write tools.

One read call checks identity and scope before anything can change a record.

What it costs, in Copilot Credits

The Sales overview says: “Each AI tool in the Sales MCP server consumes Copilot Studio credits based on the agent feature it uses, such as Text and generative AI tools (basic) or Generative answer.” In its table, get_sales_record_summary and get_answer_from_sharepoint_documents map to “Generative answer”. Every other tool maps to “Text and generative AI tools (basic)”.

The overview points to Copilot Studio’s billing rates page for those features. That page “describes features used in agents or agent flows powered by the standard harness” and says nothing about Claude Code or ChatGPT. Don’t treat its numbers as the price of an external client’s call.

Then there is the question of who pays, where three Microsoft sources say different things:

  • The Dataverse MCP FAQ (June 2026): “If you have qualifying Dynamics 365 Premium licenses or a Microsoft 365 Copilot User Subscription License (USL), you aren’t charged for accessing Dynamics 365 data.”
  • The Dynamics 365 Licensing Guide (November 2026), page 64: “Usage of Business Application tools consumes Copilot Credits through usage-based billing.” On page 63 it says Sales Premium and other Premium licenses “include 1,000 Copilot Credits per user/month for use with Dynamics 365 agents and tools, or custom agents that connect to Dynamics 365 MCP servers”, and that those credits accrue at the tenant level and should be allocated to environments.
  • The Sales overview (July 2026): “Copilot credits are not charged for specific Dynamics 365 Sales licenses.” It doesn’t name the licenses.

The Sales connection page also lists this prerequisite: “You have enough Copilot Studio credits to use the tools in the Sales MCP server.”

Our view: name a credit budget owner and allocate credits to the pilot environment before switching anything on.

Who can do what: the controls you actually have

The first control is identity. Learn’s Dataverse FAQ says the Dataverse server “respects Dataverse security roles and row-level security”, and “No additional MCP-specific access controls are needed beyond standard Dataverse security configuration.” For the Sales server, calls run as the signed-in user through the on-behalf-of exchange. MCP adds on and off switches, covered next, not a separate role model.

The second control is the environment switches. Learn’s Dataverse admin settings page covers the per-environment “Allow MCP clients” switch and the allowed-client records, where you set “Is Enabled” to Yes for each client. It also says: “MCP allow listing applies only to the /api/mcp agent entrypoint.”

Advanced connector policies can block a whole MCP server, but not individual tools: “As of now, granular control over individual MCP tools (endpoints and actions) within an MCP server isn’t available.” Managing the Dataverse server through those policies requires a Managed Environment. Using the server does not. Learn doesn’t say whether that block applies to calls from external clients.

The third control lives in the client. If your client keeps tool allow or deny lists, review them by tool name, and ChatGPT asks for confirmation on write actions by default. Don’t copy any sample agent instruction that lets an agent delete without asking first. Learn’s own tool table says delete_record runs “only after explicit user approval”.

The last control is the off switch. Disabling Dataverse’s MCP server stops every tool and agent that relies on it. Under data policies, resources that try to use a blocked MCP server “fail at runtime”.

Least privilege lives in Dataverse roles; MCP adds on and off switches, not finer permissions.

Pre-switch checklist

Our view: work through it in this order.

  1. Decide which servers to connect, Sales only or Sales plus Dataverse, and write down why.
  2. Record which Sales URL you are using and the date of the Learn page it came from.
  3. Grant admin consent for the gateway and complete the configuration for each environment.
  4. Confirm the Sales agent and Copilot features behind each tool group are turned on.
  5. Review the security roles of every pilot user, because the assistant inherits them.
  6. Set the allowed clients and the “Allow MCP clients” switch for the pilot environment.
  7. Name a credit owner and allocate credits to the pilot environment.
  8. Have whoever owns data residency read the FedRAMP and region notices.
  9. Test the off switch before the pilot starts, not after.
  10. Re-check the three moving parts in the box above.

If you are deciding how much oversight each assistant use case needs, our risk-tiered agent governance annotation gives you the tiering to hang these checks on.

Our view: run one read-only call as a pilot rep in one non-production environment, then check who it ran as and what it returned.

Book a free AI app review

If you are the IT or CoE lead about to approve Claude Code or ChatGPT against live sales data, get a second set of eyes on it first. Citizen Development Academy looks at what your team has built or plans to build with AI, names the top three risks, and recommends one next step.

Book a free 30-minute AI app review with Citizen Development Academy

Stay in the loop

Get new posts delivered to your inbox. No spam, unsubscribe anytime.

Related articles