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
- Open your Dynamics 365 Business Central environment.
- Press
Alt + Qor click the Search (Tell Me) icon. - Type
MCPin the search field. - Select Model Context Protocol (MCP) Server Configurations.
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:
- Click New.
- Enter
MCPClaudeExamplein the Name field. - Review the configuration options before activating the server.
Figure 2: Creating our MCP configuration for Claude Code.
Step 3: Understand the Configuration Parameters
Let's understand what each parameter does.
| Parameter | Description |
|---|---|
| Name | Unique name identifying the MCP configuration. We'll use MCPClaudeExample. |
| Active | Determines whether the configuration is available for MCP clients. |
| Default | Determines whether this configuration is used when a client doesn't explicitly specify a configuration name. |
| Dynamic Tool Mode | Exposes system tools that allow MCP clients to dynamically discover, describe, and invoke supported API operations. |
| Discover Additional Objects | Allows dynamic discovery of additional eligible read-only API objects outside the explicitly configured tools. |
| Description | Optional description explaining the purpose of the configuration. |
| Unblock Edit Tools | Allows 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:
| Parameter | Value |
|---|---|
| Name | MCPClaudeExample |
| Active | Disabled during setup |
| Default | Disabled |
| Dynamic Tool Mode | Enabled |
| Discover Additional Objects | Enabled |
| Description | Read and write MCP integration with Claude Code |
| Unblock Edit Tools | Enabled |
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.
Figure 3: Configuring API tools and permissions for Claude.
Business Central provides three options for adding API tools:
| Option | Description |
|---|---|
| Select Tools | Manually select specific Business Central API objects. |
| Add Tools by API Group | Add API objects belonging to a particular API group. |
| Add All Standard APIs as Tools | Automatically 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.
Figure 4: Exploring the available Business Central API tools.
The window contains several columns:
| Column | Description |
|---|---|
| ID | Unique identifier of the Business Central API object. |
| Name | Name of the API page or query. |
| Entity Name | Name identifying the entity exposed through the API. |
| API Publisher | Publisher responsible for the API. |
| API Group | Group 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:
Figure 5: Comparing the standard Customers API with the Analytics API.
| Property | APIV2 - Customers | Customers |
|---|---|---|
| Object ID | 30009 | 36954 |
| Entity Name | customer | customer |
| API Group | Standard API v2.0 | analytics |
| Purpose | Business operations | Reporting 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:
V2refers to Business Central's API versionv2.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:
| Permission | Enabled |
|---|---|
| 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 ID | API Object | Version |
|---|---|---|
30028 | APIV2 - Sales Orders | v2.0 |
30012 | APIV2 - Sales Invoices | v2.0 |
9970 | Posted Sales Invoice API | v1.0 |
30013 | APIV2 - Cust. Paym. Journals | v2.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:
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.
- Return to the General section.
- Click Validate to check the configuration for errors.
- Resolve any validation issues before proceeding.
- Enable the Active option.
- Wait until Business Central confirms that the configuration is saved.
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
- Open the Microsoft Entra Admin Center.
- Navigate to Microsoft Entra ID → App registrations.
- Click New registration.
- Enter
MCPClaudeExampleas the application name. - Under Supported account types, select Multiple Entra ID tenants and Allow all tenants.
- Click Register.
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:
- Open the Microsoft Entra Admin Center.
- Navigate to App registrations.
- Select our application,
MCPClaudeExample. - Open Authentication.
- Click Add Redirect URI if the required callback is not already configured.
- 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 URI | Purpose |
|---|---|
https://claude.ai/api/mcp/auth_callback | Handles the OAuth callback for Claude's custom MCP connector. |
https://businesscentral.dynamics.com/OAuthLanding.htm | Used 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.
- Open the registered application.
- Select API permissions.
- Click Add a permission.
- Select Dynamics 365 Business Central.
Figure 9: Selecting API permissions for the registered application.
In our initial configuration, we selected the following Application permissions:
| Permission | Purpose |
|---|---|
API.ReadWrite.All | Allows application-level access to Business Central web services APIs. |
Automation.ReadWrite.All | Allows application-level access to Business Central automation APIs. |
app_access | Allows 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:
- Select Dynamics 365 Business Central.
- Choose Delegated permissions.
- Search for
Financials.ReadWrite.All. - Select the permission.
- Click Add permissions.
Important: Claude Code uses delegated user authentication. The
Financials.ReadWrite.Alldelegated 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:
- Return to API permissions.
- Click Grant admin consent for [Your Tenant].
- Review the requested permissions.
- Click Yes to confirm.
Figure 10: Confirming administrator consent for the application.
Once consent is granted, the permissions should display a green checkmark and Granted for [Your Tenant].
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
- Open the Microsoft Entra Admin Center.
- Navigate to Microsoft Entra ID → App registrations.
- Select our application,
MCPClaudeExample. - Open the Overview page.
- Copy the following values:
- Application (client) ID — Identifies our application.
- Directory (tenant) ID — Identifies the Microsoft Entra tenant.
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:
- Navigate to Certificates & secrets.
- Select Client secrets.
- Click New client secret.
- Enter a description, such as
MCPClaudeExample. - Choose an expiration period.
- Click Add.
Figure 13: Creating a client secret in Microsoft Entra ID.
Once created, the secret appears in the list.
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:
- Claude Code initiates OAuth authentication.
- Microsoft Entra ID prompts the user to sign in.
- The user authenticates with their Microsoft account.
- Claude Code completes the OAuth flow and receives an access token.
- 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
- Open Dynamics 365 Business Central.
- Press
Alt + Qand search forMicrosoft Entra Applications. - Open the page and click New.
- Enter the Application (Client) ID copied from Microsoft Entra ID.
- Enter a description, such as
MCP Claude Example. - Set State to
Enabled.
Figure 15: Finding Microsoft Entra Applications in Business Central.
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 Set | Description |
|---|---|
D365 BUS PREMIUM | Broad Business Central Premium functionality permissions. |
D365 FULL ACCESS | Broad access to Business Central business data and operations. |
Figure 17: Configuring our application's details.
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.
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.
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
- Open the Claude desktop application.
- Click Settings.
- Navigate to Connectors.
- Click Add to create a custom connector.
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.
- Open Model Context Protocol (MCP) Server Configurations.
- Select
MCPClaudeExample. - Navigate to Advanced → Connection String.
- Copy or download the generated configuration.
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:
| Field | Value |
|---|---|
| Name | MCPExample |
| MCP Server URL | https://mcp.businesscentral.dynamics.com |
Claude will check the MCP server and attempt to discover its authentication requirements.
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.
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:
| Header | Value |
|---|---|
TenantId | Your Microsoft Entra tenant ID |
EnvironmentName | PortfolioDemo |
Company | CRONUS USA, Inc. |
ConfigurationName | MCPClaudeExample |
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.
- Click Connect or Reconnect.
- Sign in using your authorized Microsoft account.
- Review the requested permissions.
- Click Accept if the permissions are appropriate.
- Allow the browser to return to the Claude desktop application.
Figure 27: Authorizing Claude to access Business Central.
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:
- Click Reconnect.
- Complete Microsoft Entra authentication again.
- Confirm that the redirect URI matches the Claude client.
- Verify the configured request headers.
- Check that the
MCPClaudeExampleconfiguration 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.
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
Figure 31: Creating a new customer using Claude.
Claude successfully created the customer and returned the following information:
| Field | Value |
|---|---|
| Customer No. | C00020 |
| Name | Mohamed |
| Address | 123 Demo Street |
| City | Seattle |
| Country | US |
| Phone | 206-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:
- Open Business Central.
- Navigate to Customers.
- Search for customer
C00020. - Open the Customer Card and verify the information.
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.






























