All articles
Business CentralMCPClaude AIDynamics 365AI AgentsTutorial

How to Connect Claude AI to Microsoft Dynamics 365 Business Central Using MCP

A step-by-step guide to connecting Claude Code with Microsoft Dynamics 365 Business Central using MCP. Learn how to configure API tools, enable read/write operations, set up authentication, and interact with ERP data using AI.

Artificial intelligence is changing how we interact with business applications.

Instead of navigating multiple pages, applying filters, and manually exporting data, what if we could simply ask an AI assistant to retrieve information from Microsoft Dynamics 365 Business Central?

With the Model Context Protocol (MCP), this is now possible.

In this tutorial, we'll:

  • Explore what MCP is and how it works.
  • Understand how MCP integrates with Microsoft Dynamics 365 Business Central.
  • Configure Claude Code to connect to Business Central using Microsoft's official MCP server.
  • Test how Claude can retrieve Business Central data using natural language.

What You'll Learn

By the end of this tutorial, you'll understand how to connect Claude Code to Business Central securely and start exploring AI-powered ERP interactions.

1. Configure the MCP Server in Business Central

Before connecting Claude to Business Central, we need to configure the Model Context Protocol (MCP) Server.

Business Central provides an MCP server that enables compatible AI clients, such as Claude Code, to discover and interact with authorized Business Central APIs.

Step 1: Find the MCP Server Configuration

  1. Open your Dynamics 365 Business Central environment.
  2. Press Alt + Q or click the Search (Tell Me) icon.
  3. Type MCP in the search field.
  4. Select Model Context Protocol (MCP) Server Configurations.

Finding the MCP Server Configurations page using Business Central's Tell Me search

Figure 1: Finding the MCP Server Configurations page using Business Central's Tell Me search.

Step 2: Create a New MCP Configuration

On the MCP Server Configurations page:

  1. Click New.
  2. Enter MCPClaudeExample in the Name field.
  3. Review the configuration options before activating the server.

Creating our MCP configuration for Claude Code

Figure 2: Creating our MCP configuration for Claude Code.

Step 3: Understand the Configuration Parameters

Let's understand what each parameter does.

ParameterDescription
NameUnique name identifying the MCP configuration. We'll use MCPClaudeExample.
ActiveDetermines whether the configuration is available for MCP clients.
DefaultDetermines whether this configuration is used when a client doesn't explicitly specify a configuration name.
Dynamic Tool ModeExposes system tools that allow MCP clients to dynamically discover, describe, and invoke supported API operations.
Discover Additional ObjectsAllows dynamic discovery of additional eligible read-only API objects outside the explicitly configured tools.
DescriptionOptional description explaining the purpose of the configuration.
Unblock Edit ToolsAllows configured write-capable operations to become available, subject to Business Central permissions and other restrictions.

Step 4: Configure Read and Write Access

For this demonstration, we'll configure Claude Code to both retrieve and modify Business Central data.

Use the following settings:

ParameterValue
NameMCPClaudeExample
ActiveDisabled during setup
DefaultDisabled
Dynamic Tool ModeEnabled
Discover Additional ObjectsEnabled
DescriptionRead and write MCP integration with Claude Code
Unblock Edit ToolsEnabled

Step 5: Configure Available Tools and Permissions

Now that we've configured the general MCP settings, we need to define which Business Central APIs Claude can access and what operations it can perform.

Scroll down to the Available Tools section.

Configuring API tools and permissions for Claude

Figure 3: Configuring API tools and permissions for Claude.

Business Central provides three options for adding API tools:

OptionDescription
Select ToolsManually select specific Business Central API objects.
Add Tools by API GroupAdd API objects belonging to a particular API group.
Add All Standard APIs as ToolsAutomatically add the standard Business Central APIs.

For this tutorial, we'll use Select Tools because we want to control which operations Claude can perform.

Selecting the Required API Tools

Click Select Tools to open the MCP API Tools window.

This window displays the API objects available in Business Central.

Exploring the available Business Central API tools

Figure 4: Exploring the available Business Central API tools.

The window contains several columns:

ColumnDescription
IDUnique identifier of the Business Central API object.
NameName of the API page or query.
Entity NameName identifying the entity exposed through the API.
API PublisherPublisher responsible for the API.
API GroupGroup to which the API belongs.

Example: Selecting the Customers API

Let's start with the Customers API.

Use the search icon and enter customers.

You'll notice two available APIs:

Comparing the standard Customers API with the Analytics API

Figure 5: Comparing the standard Customers API with the Analytics API.

PropertyAPIV2 - CustomersCustomers
Object ID3000936954
Entity Namecustomercustomer
API GroupStandard API v2.0analytics
PurposeBusiness operationsReporting and analytics
Read✅✅
Write✅❌

What's the difference?

  • APIV2 - Customers (30009): The standard Business Central API v2.0, supporting operations such as retrieving, creating, updating, and deleting customer records, subject to permissions.
  • Customers (36954): An Analytics API designed for retrieving customer data for reporting and analysis. It does not support write operations.

Note: V2 refers to Business Central's API version v2.0, not the Business Central application version.

Since we want Claude to perform read and write operations, we'll select APIV2 - Customers (30009).

Click OK to add it to our MCP configuration.

Configure Customer Permissions

Once the Customer API has been added, configure its permissions:

PermissionEnabled
Allow Read✅
Allow Create✅
Allow Modify✅
Allow Delete❌
Allow Bound Actions❌

For our demonstration, we'll allow Claude to retrieve, create, and update customer records.

We'll leave deletion disabled to avoid accidentally removing customer data.

Important: The MCP permissions do not override Business Central's user permissions. Both the MCP configuration and the authenticated user must authorize an operation.

We'll follow the same process to configure the Sales and Payment APIs.

Configuring Sales and Payment APIs

Now that we've configured the Customers API, we'll follow the same process to add the Sales and Payment APIs.

For our demonstration, we'll select the following:

Object IDAPI ObjectVersion
30028APIV2 - Sales Ordersv2.0
30012APIV2 - Sales Invoicesv2.0
9970Posted Sales Invoice APIv1.0
30013APIV2 - Cust. Paym. Journalsv2.0

We'll enable Read, Create, and Modify where supported, while keeping Delete disabled.

For Posted Sales Invoices, we'll enable Read only, since these are already posted documents.

Note: Creating sales invoices or payment journals does not automatically post them. Posting requires separate business operations and appropriate permissions.

Review the API Permissions

After selecting our APIs, the Available Tools section should look similar to this:

Configuring read and write permissions for the selected Business Central APIs

Figure 6: Configuring read and write permissions for the selected Business Central APIs.

Important: Enabling write operations allows Claude to modify business data. We'll use a sandbox environment for testing, and all operations remain subject to Business Central permissions.

Once we've configured the required APIs, we can proceed with validating and activating our MCP configuration.

Validate and Activate the MCP Configuration

Once we've selected our APIs and configured their permissions, the final step is to validate and activate our MCP configuration.

  1. Return to the General section.
  2. Click Validate to check the configuration for errors.
  3. Resolve any validation issues before proceeding.
  4. Enable the Active option.
  5. Wait until Business Central confirms that the configuration is saved.

Validating and activating the MCPClaudeExample configuration

Figure 7: Validating and activating the MCPClaudeExample configuration.

Note: Activating the configuration makes it available to MCP clients. However, Claude still needs to authenticate before accessing Business Central, and all operations remain subject to the configured API permissions and the authenticated user's permissions.

Our MCPClaudeExample configuration is now ready.

We've completed the Business Central MCP server configuration. Next, we'll configure Microsoft Entra ID authentication to connect Claude Code securely to our Business Central environment.

2. Configure Microsoft Entra ID Authentication

Now that our Business Central MCP configuration is ready, we need to register an application in Microsoft Entra ID.

This application will allow Claude Code to authenticate securely when connecting to the Business Central MCP server.

Step 6: Register an Application in Microsoft Entra ID

  1. Open the Microsoft Entra Admin Center.
  2. Navigate to Microsoft Entra ID → App registrations.
  3. Click New registration.
  4. Enter MCPClaudeExample as the application name.
  5. Under Supported account types, select Multiple Entra ID tenants and Allow all tenants.
  6. Click Register.

Registering the MCPClaudeExample application in Microsoft Entra ID

Figure 8: Registering the MCPClaudeExample application in Microsoft Entra ID.

Configure the OAuth Redirect URI

Before connecting Claude to Business Central, we need to configure the OAuth Redirect URI in Microsoft Entra ID.

The redirect URI tells Microsoft Entra ID where to return the authentication response after a successful sign-in.

To configure it:

  1. Open the Microsoft Entra Admin Center.
  2. Navigate to App registrations.
  3. Select our application, MCPClaudeExample.
  4. Open Authentication.
  5. Click Add Redirect URI if the required callback is not already configured.
  6. Select the appropriate platform and enter the callback URL.

For our demonstration using Claude Desktop's custom connector, we'll configure the following Web redirect URI:

https://claude.ai/api/mcp/auth_callback

Our application also includes the following callback used for certain Business Central authentication scenarios:

https://businesscentral.dynamics.com/OAuthLanding.htm
Redirect URIPurpose
https://claude.ai/api/mcp/auth_callbackHandles the OAuth callback for Claude's custom MCP connector.
https://businesscentral.dynamics.com/OAuthLanding.htmUsed for certain Business Central OAuth authorization flows.

Important: Different MCP clients may require different redirect URIs. Always use the callback URL expected by the client you're configuring.

Configure API Permissions

Next, we'll grant the application the permissions required to access Business Central.

  1. Open the registered application.
  2. Select API permissions.
  3. Click Add a permission.
  4. Select Dynamics 365 Business Central.

Selecting API permissions for the registered application

Figure 9: Selecting API permissions for the registered application.

In our initial configuration, we selected the following Application permissions:

PermissionPurpose
API.ReadWrite.AllAllows application-level access to Business Central web services APIs.
Automation.ReadWrite.AllAllows application-level access to Business Central automation APIs.
app_accessAllows access according to the application's permissions in Business Central.

However, these permissions are intended for application-based authentication scenarios.

For our Claude Code MCP integration, we'll also configure the required delegated permission:

  1. Select Dynamics 365 Business Central.
  2. Choose Delegated permissions.
  3. Search for Financials.ReadWrite.All.
  4. Select the permission.
  5. Click Add permissions.

Important: Claude Code uses delegated user authentication. The Financials.ReadWrite.All delegated permission is required for this connection.

We should avoid granting unnecessary application permissions to a dedicated Claude Code MCP registration.

Grant Administrator Consent

After adding the required permission:

  1. Return to API permissions.
  2. Click Grant admin consent for [Your Tenant].
  3. Review the requested permissions.
  4. Click Yes to confirm.

Confirming administrator consent for the application

Figure 10: Confirming administrator consent for the application.

Once consent is granted, the permissions should display a green checkmark and Granted for [Your Tenant].

Verifying the granted permissions in Microsoft Entra ID

Figure 11: Verifying the granted permissions in Microsoft Entra ID.

Security note: Administrator consent allows the application to request the approved permissions. It does not automatically bypass Business Central user permissions or the restrictions configured in our MCP server.

Retrieve the Application ID and Authentication Credentials

Before connecting Claude Code to Business Central, we need to retrieve our Microsoft Entra application details.

1. Retrieve the Application (Client) ID
  1. Open the Microsoft Entra Admin Center.
  2. Navigate to Microsoft Entra ID → App registrations.
  3. Select our application, MCPClaudeExample.
  4. Open the Overview page.
  5. Copy the following values:
    • Application (client) ID — Identifies our application.
    • Directory (tenant) ID — Identifies the Microsoft Entra tenant.

Retrieving the Application (Client) ID and Directory (Tenant) ID

Figure 12: Retrieving the Application (Client) ID and Directory (Tenant) ID.

We'll use the Application (client) ID in our Claude Code MCP configuration.

2. Generate a Client Secret

To create one:

  1. Navigate to Certificates & secrets.
  2. Select Client secrets.
  3. Click New client secret.
  4. Enter a description, such as MCPClaudeExample.
  5. Choose an expiration period.
  6. Click Add.

Creating a client secret in Microsoft Entra ID

Figure 13: Creating a client secret in Microsoft Entra ID.

Once created, the secret appears in the list.

Viewing the generated client secret

Figure 14: Viewing the generated client secret.

Important: Copy the Value, not the Secret ID.

3. How Is the Access Token Retrieved?

Microsoft Entra ID issues OAuth access tokens after successful authentication.

For our Claude Code integration, the process is:

  1. Claude Code initiates OAuth authentication.
  2. Microsoft Entra ID prompts the user to sign in.
  3. The user authenticates with their Microsoft account.
  4. Claude Code completes the OAuth flow and receives an access token.
  5. Claude Code uses the token to authenticate requests to the Business Central MCP server.

The application must have the delegated Financials.ReadWrite.All permission with administrator consent.

Note: An Access Token is different from an Application ID or Client Secret.

  • Application ID: Identifies the registered application.
  • Client Secret: Authenticates a confidential application.
  • Access Token: Authorizes requests to a specific API.

Access tokens expire and are normally managed automatically by the OAuth client.

We'll use the Application ID and Tenant ID in the next section to establish our Claude Code MCP connection.

Step 7: Authorize the Microsoft Entra Application in Business Central

Now that we've registered our application in Microsoft Entra ID, let's authorize it in Business Central.

Register the Application

  1. Open Dynamics 365 Business Central.
  2. Press Alt + Q and search for Microsoft Entra Applications.
  3. Open the page and click New.
  4. Enter the Application (Client) ID copied from Microsoft Entra ID.
  5. Enter a description, such as MCP Claude Example.
  6. Set State to Enabled.

Finding Microsoft Entra Applications in Business Central

Figure 15: Finding Microsoft Entra Applications in Business Central.

Creating a new Microsoft Entra application

Figure 16: Creating a new Microsoft Entra application.

Assign Permission Sets

Open the application card and scroll down to User Permission Sets.

In our sandbox environment, we've assigned:

Permission SetDescription
D365 BUS PREMIUMBroad Business Central Premium functionality permissions.
D365 FULL ACCESSBroad access to Business Central business data and operations.

Configuring our application's details

Figure 17: Configuring our application's details.

Assigning permission sets to the Microsoft Entra application

Figure 18: Assigning permission sets to the Microsoft Entra application.

Caution: We're using broad permissions for demonstration purposes in a sandbox environment.

In production, follow the principle of least privilege and assign only the permissions required for the integration.

These application permission sets are relevant to application-based access. They don't replace the permissions of the signed-in user when Claude connects through delegated OAuth.

Grant Application Consent

Next, click Grant Consent on the application card.

Microsoft Entra ID opens an authorization window displaying the requested permissions.

Reviewing the requested application permissions

Figure 19: Reviewing the requested application permissions.

Review the requested permissions carefully.

If they're appropriate for your integration, click Accept.

Once completed, Business Central displays:

Consent was given successfully.

Successfully granting application consent

Figure 20: Successfully granting application consent.

Note: Granting application consent doesn't mean our Claude Code MCP connection has been authenticated.

Claude Code still needs to complete its own OAuth sign-in using the delegated permissions configured in Microsoft Entra ID.

Step 8: Connect Claude to Business Central Using a Custom MCP Connector

Now that our Microsoft Entra application and Business Central MCP server are configured, let's connect them to Claude.

For this demonstration, we'll use the Claude desktop application and create a custom MCP connector.

Open Claude Connector Settings

  1. Open the Claude desktop application.
  2. Click Settings.
  3. Navigate to Connectors.
  4. Click Add to create a custom connector.

Opening the Connectors settings in Claude

Figure 22: Opening the Connectors settings in Claude.

Retrieve the Business Central MCP Connection String

Before creating our connector, let's retrieve the connection details from Business Central.

  1. Open Model Context Protocol (MCP) Server Configurations.
  2. Select MCPClaudeExample.
  3. Navigate to Advanced → Connection String.
  4. Copy or download the generated configuration.

Screenshot Retrieving the MCP connection string from Business Central

Figure 23: Retrieving the MCP connection string from Business Central.

The generated configuration contains:

{
  "businesscentral": {
    "url": "https://mcp.businesscentral.dynamics.com",
    "type": "http",
    "headers": {
      "TenantId": "YOUR_TENANT_ID",
      "EnvironmentName": "YOUR_ENVIRONMENT_NAME",
      "Company": "YOUR_COMPANY_NAME",
      "ConfigurationName": "YOUR_MCP_NAME"
    }
  }
}

We'll use these details to configure our connector.

Create a Custom Connector

In Claude, enter the following information:

FieldValue
NameMCPExample
MCP Server URLhttps://mcp.businesscentral.dynamics.com

Claude will check the MCP server and attempt to discover its authentication requirements.

Adding our Business Central MCP server to Claude

Figure 24: Adding our Business Central MCP server to Claude.

The server discovery process should identify the endpoint and its OAuth authentication provider.

An initial HTTP 401 Unauthorized response can be expected before authentication. It doesn't necessarily indicate a connection failure.

Click Continue.

Configure OAuth Authentication

For authentication, select:

  • Authentication: Sign in now
  • OAuth client: Use your own OAuth client

Enter the Application (Client) ID from our Microsoft Entra application.

If your OAuth configuration requires a client secret, enter the secret created earlier. Otherwise, leave it blank.

Configuring Microsoft Entra OAuth authentication in Claude

Figure 25: Configuring Microsoft Entra OAuth authentication in Claude.

Important: Use the Application (Client) ID, not the Tenant ID or Object ID.

The client secret is different from an OAuth access token. Claude manages access tokens through the OAuth authentication process.

Configure Request Headers

Next, expand Request headers.

Business Central uses HTTP headers to identify the target tenant, environment, company, and MCP configuration.

Click Add header and configure the following:

HeaderValue
TenantIdYour Microsoft Entra tenant ID
EnvironmentNamePortfolioDemo
CompanyCRONUS USA, Inc.
ConfigurationNameMCPClaudeExample

Configuring Business Central MCP request headers

Figure 26: Configuring Business Central MCP request headers.

Mark the headers as required so Claude includes them in MCP requests.

Note: Use the header names provided by Business Central's generated connection string.

Claude may require approval for custom request headers. If a header is rejected or unsupported, the connector may fail even when OAuth authentication succeeds.

Authenticate with Microsoft Entra ID

After completing the connector configuration, proceed with authentication.

  1. Click Connect or Reconnect.
  2. Sign in using your authorized Microsoft account.
  3. Review the requested permissions.
  4. Click Accept if the permissions are appropriate.
  5. Allow the browser to return to the Claude desktop application.

Authorizing Claude to access Business Central

Figure 27: Authorizing Claude to access Business Central.

Returning to Claude after Microsoft Entra authentication

Figure 28: Returning to Claude after Microsoft Entra authentication.

The browser may display a confirmation that the authentication flow has completed.

Verify the MCP Connection

Return to Settings → Connectors and check the Business Central connector status.

During our initial attempt, Claude displayed:

Connection issue — Your session has expired.

If this happens:

  1. Click Reconnect.
  2. Complete Microsoft Entra authentication again.
  3. Confirm that the redirect URI matches the Claude client.
  4. Verify the configured request headers.
  5. Check that the MCPClaudeExample configuration is active in Business Central.

Important: A successful OAuth redirect doesn't necessarily mean the MCP connection is fully operational.

Before proceeding, verify that Claude reports a healthy connector and can discover the configured Business Central tools.

Once the connector is working, we'll test real read and write operations against our PortfolioDemo environment.

Step 9: Test the Business Central MCP Integration with Claude

Now that Claude is connected to Business Central, let's verify that our integration works by performing two simple operations: retrieving customers and creating a new customer.

Test 1: Retrieve Customers

We'll start by asking Claude to retrieve customer information from Business Central.

Enter the following prompt:

Connect to Business Central and list the first 5 customers.

Claude retrieving customer records from Business Central through MCP

Figure 30: Claude retrieving customer records from Business Central through MCP.

Claude uses our MCP connector to retrieve the requested information, including customer numbers, names, locations, and balances.

This confirms that Claude can access and read Business Central data through the MCP server.

Test 2: Create a Customer

Next, let's test whether Claude can create a record in Business Central.

Enter the following prompt:

Create a new customer with the following details:

  • Name: Mohamed
  • Address: 123 Demo Street
  • City: Seattle
  • Country: US
  • Phone: 206-555-0142

Creating a new customer using Claude

Figure 31: Creating a new customer using Claude.

Claude successfully created the customer and returned the following information:

FieldValue
Customer No.C00020
NameMohamed
Address123 Demo Street
CitySeattle
CountryUS
Phone206-555-0142

The customer number C00020 was automatically assigned by Business Central's number series.

Verify the Customer in Business Central

To confirm that the record was actually created:

  1. Open Business Central.
  2. Navigate to Customers.
  3. Search for customer C00020.
  4. Open the Customer Card and verify the information.

Verifying the customer created by Claude in Business Central

Figure 32: Verifying the customer created by Claude in Business Central.

As we can see, the customer exists in Business Central with the information provided through Claude.

This demonstrates that our MCP integration supports both reading and creating Business Central records.

Troubleshooting: Permission Errors

If Claude fails to retrieve or create records, one possible cause is insufficient permissions.

Check the following:

  • The MCP configuration is Active.
  • The required API is included in Available Tools.
  • Allow Read and Allow Create are enabled for the Customers API.
  • Unblock Edit Tools is enabled for write operations.
  • The authenticated user has the required Business Central permissions.

Note: Permission errors are not always caused by the MCP configuration. They can also result from Microsoft Entra authentication, Business Central user permissions, or application-level restrictions.

Other errors may result from missing required fields, API limitations, or Business Central validation rules. Review the actual error message before making configuration changes.

Conclusion

We've successfully connected Claude AI to Microsoft Dynamics 365 Business Central using MCP.

With this integration, we can retrieve and create business records using natural-language instructions instead of manually calling REST APIs.

In our demonstration, Claude successfully:

  • Connected to Business Central through MCP.
  • Retrieved existing customer records.
  • Created a new customer.
  • Returned the automatically generated customer number.
  • Allowed us to verify the created record directly in Business Central.

This is just the beginning. The same approach can be extended to sales orders, invoices, and other supported Business Central operations.

MCP doesn't replace Business Central APIs; it provides a new way for AI assistants to interact with them.