Skip to main content
Glama
MehrozeKhan73

Microsoft Business Central MCP Server

Microsoft Business Central MCP Server

Model Context Protocol (MCP) server for Microsoft Dynamics 365 Business Central. Provides AI assistants with direct access to Business Central data through properly formatted API v2.0 calls.

Features

  • Correct API URLs: Uses proper /companies(id)/resource format (no ODataV4 segment)

  • Zero Installation: Run with npx - no pre-installation required

  • Azure CLI Auth: Leverages existing Azure CLI authentication

  • Client Credentials Auth: Service-to-service authentication for AI agents

  • Clean Tool Names: No prefixes, just get_schema, list_items, etc.

  • Full CRUD: Create, read, update, and delete Business Central records

Related MCP server: Microsoft Business Central MCP Server

Installation

No installation needed! Configure in Claude Desktop or Claude Code:

{
  "mcpServers": {
    "business-central": {
      "type": "stdio",
      "command": "cmd",
      "args": ["/c", "npx", "-y", "@knowall-ai/mcp-business-central"],
      "env": {
        "BC_URL_SERVER": "https://api.businesscentral.dynamics.com/v2.0/{tenant-id}/{environment}/api/v2.0",
        "BC_COMPANY": "Your Company Name",
        "BC_AUTH_TYPE": "azure_cli"
      }
    }
  }
}

Note for Windows: Use cmd with /c as shown above for proper npx execution.

Using Smithery

Install via Smithery:

npx -y @smithery/cli install @knowall-ai/mcp-business-central --client claude

Local Development

git clone https://github.com/knowall-ai/mcp-business-central.git
cd mcp-business-central
npm install
npm run build
node build/index.js

Configuration

Environment Variables

Variable

Required

Description

Example

BC_URL_SERVER

Yes

Business Central API base URL

https://api.businesscentral.dynamics.com/v2.0/{tenant}/Production/api/v2.0

BC_COMPANY

Yes

Company display name

KnowAll Ltd

BC_AUTH_TYPE

No

Authentication type (default: azure_cli)

azure_cli or client_credentials

BC_TENANT_ID

For client_credentials

Azure AD tenant ID

00000000-0000-0000-0000-000000000000

BC_CLIENT_ID

For client_credentials

App registration client ID

00000000-0000-0000-0000-000000000000

BC_CLIENT_SECRET

For client_credentials

App registration client secret

your-secret-value

Getting Your Configuration Values

  1. Tenant ID: Find in Azure Portal → Azure Active Directory → Overview

  2. Environment: Usually Production or Sandbox

  3. Company Name: The display name shown in Business Central

Example URL format:

https://api.businesscentral.dynamics.com/v2.0/00000000-0000-0000-0000-000000000000/Production/api/v2.0

Authentication

Recommendation: Use azure_cli authentication - it's simpler to set up and more reliable. The client_credentials method is also supported but has known configuration challenges with Business Central's Microsoft Entra Applications setup. See docs/TROUBLESHOOTING.adoc for details.

The simplest and most reliable authentication method. Uses your existing Azure CLI login.

Prerequisites:

Configuration:

{
  "mcpServers": {
    "business-central": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@knowall-ai/mcp-business-central"],
      "env": {
        "BC_AUTH_TYPE": "azure_cli",
        "BC_URL_SERVER": "https://api.businesscentral.dynamics.com/v2.0/{tenant-id}/Production/api/v2.0",
        "BC_COMPANY": "My Company"
      }
    }
  }
}

Option 2: Client Credentials (Service-to-Service)

For automated systems that need to run without user interaction. This method uses OAuth 2.0 client credentials flow.

Note: This method has known configuration challenges. The Business Central "Microsoft Entra Applications" setup can be complex and the application user creation may not work as expected. See docs/TROUBLESHOOTING.adoc for detailed guidance.

Setup Overview:

  1. Create Azure App Registration:

    • Go to Azure Portal → Azure Active Directory → App registrations

    • Create new registration (single tenant)

    • Add API permission: Dynamics 365 Business Central → app_access (Application permission, NOT Delegated)

    • Grant admin consent for the permission

    • Add redirect URI: https://businesscentral.dynamics.com/OAuthLanding.htm

  2. Generate Client Secret:

    • In your app registration, go to Certificates & secrets

    • Create a new client secret and save it securely

  3. Configure Business Central:

    • In Business Central, search for "Microsoft Entra Applications"

    • Click + New and enter your app's Client ID

    • Set a Description (this becomes the application user name)

    • Set State to "Enabled" - you should see "A user named '[Description]' will be created"

    • Add permission sets: D365 BUS FULL ACCESS (recommended) or D365 READ

    • Leave Company field blank for all companies access

    • Click "Grant Consent"

  4. Verify Setup:

References:

Available Tools

1. get_schema

Get OData metadata for a Business Central resource.

Parameters:

  • resource (string, required): Resource name (e.g., customers, contacts, salesOpportunities)

Example:

{
  "resource": "customers"
}

2. list_items

List items with optional filtering and pagination.

Parameters:

  • resource (string, required): Resource name

  • filter (string, optional): OData filter expression

  • top (number, optional): Maximum number of items to return

  • skip (number, optional): Number of items to skip for pagination

Example:

{
  "resource": "customers",
  "filter": "displayName eq 'Contoso'",
  "top": 10
}

3. get_items_by_field

Get items matching a specific field value.

Parameters:

  • resource (string, required): Resource name

  • field (string, required): Field name to filter by

  • value (string, required): Value to match

Example:

{
  "resource": "contacts",
  "field": "companyName",
  "value": "Contoso Ltd"
}

4. create_item

Create a new item in Business Central.

Parameters:

  • resource (string, required): Resource name

  • item_data (object, required): Item data to create

Example:

{
  "resource": "contacts",
  "item_data": {
    "displayName": "John Doe",
    "companyName": "Contoso Ltd",
    "email": "john.doe@contoso.com"
  }
}

5. update_item

Update an existing item.

Parameters:

  • resource (string, required): Resource name

  • item_id (string, required): Item ID (GUID)

  • item_data (object, required): Fields to update

Example:

{
  "resource": "customers",
  "item_id": "1366066e-7688-f011-b9d1-6045bde9b95f",
  "item_data": {
    "displayName": "Updated Name"
  }
}

6. delete_item

Delete an item from Business Central.

Parameters:

  • resource (string, required): Resource name

  • item_id (string, required): Item ID (GUID)

Example:

{
  "resource": "contacts",
  "item_id": "a1b2c3d4-e5f6-g7h8-i9j0-k1l2m3n4o5p6"
}

Common Resources

  • companies - Company information

  • customers - Customer records

  • contacts - Contact records

  • salesOpportunities - Sales opportunities

  • salesQuotes - Sales quotes

  • salesOrders - Sales orders

  • salesInvoices - Sales invoices

  • items - Product/service items

  • vendors - Vendor records

Troubleshooting

See docs/TROUBLESHOOTING.adoc for detailed troubleshooting guides covering:

  • Authentication issues (401 errors, token problems)

  • client_credentials setup challenges and known issues

  • Company not found errors

  • Environment-specific configuration (Production vs Sandbox)

Development

# Install dependencies
npm install

# Build TypeScript
npm run build

# Watch mode for development
npm run dev

License

MIT

Contributing

Issues and pull requests welcome at https://github.com/knowall-ai/mcp-business-central

Available Tools

6 tools
create_itemC

Create a new item in Business Central

ParametersJSON Schema
NameRequiredDescriptionDefault
resourceYesThe resource name (e.g., customers, contacts)
item_dataYesThe item data to create

TDQS

C2.6/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, and the description is insufficient to disclose behavioral traits. It only states 'create', which implies a write operation, but does not describe side effects, authentication needs, required permissions, or error states. The description fails to add context beyond the obvious.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is very short (one sentence), which is concise but lacks structure and completeness. It is not verbose, but it does not fully earn its place because it omits important details that could fit in a few more words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has no output schema and two parameters (one with nested objects), the description is insufficient. It does not mention return values, success indicators, or potential errors. The complexity is low but the description should at least indicate what happens upon successful creation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description does not add any meaning beyond what the schema already provides for the two parameters (resource and item_data). It merely restates the tool's purpose.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'create' and the resource 'item', and the tool name is a direct action. It is distinct from sibling tools which perform other operations like get_schema, list_items, etc., but lacks specificity about what types of items can be created (e.g., customers, contacts).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. There is no mention of prerequisites, context, or situations where other tools (like update_item or list_items) would be more appropriate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

delete_itemB

Delete an item from Business Central

ParametersJSON Schema
NameRequiredDescriptionDefault
item_idYesThe ID of the item to delete
resourceYesThe resource name (e.g., customers, contacts)

TDQS

B3.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden. It only says 'delete', implying destruction, but provides no details on permissions, reversibility, or side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence, zero waste, front-loaded with the core action. Highly concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple delete tool with 2 params and no output schema, it is minimally complete. However, lacks any context about the resource parameter or that deletion is irreversible.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so parameters are already described. The description adds no extra meaning beyond what the schema provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'delete' and the resource 'item', distinguishing it from siblings like create_item and update_item.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives like update_item or list_items; lacks any context about prerequisites or scenarios.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_items_by_fieldC

Get items matching a field value

ParametersJSON Schema
NameRequiredDescriptionDefault
fieldYesThe field name to filter by
valueYesThe value to match
resourceYesThe resource name (e.g., customers, contacts)

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full responsibility for behavioral disclosure. It only states 'Get items matching a field value,' implying a read operation, but does not mention pagination, limits, response format, or any side effects. This is insufficient for a clear understanding of the tool's behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, short sentence that is concise and to the point. It avoids verbosity but could be slightly expanded without losing conciseness. The brevity is appropriate for the tool's simplicity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (3 parameters, no output schema, no annotations), the description is minimal but lacks completeness. It does not explain the nature of the filter (exact match? case-sensitive?), potential return size, or where the data comes from. This leaves gaps in understanding for an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so all three parameters (field, value, resource) have descriptions in the input schema. The tool description adds no new information beyond the schema, matching the baseline of 3 for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Get items matching a field value' clearly states the action (get) and the resource (items) with a filtering condition. It distinguishes from siblings like create_item, update_item, delete_item, get_schema, and list_items by indicating a filtered retrieval, though it could be more specific about the filtering mechanism.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like list_items (which likely retrieves all items) or get_schema. The description lacks context about when filtering by field is appropriate, leaving the agent without decision support.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_schemaC

Get schema information for a Business Central resource

ParametersJSON Schema
NameRequiredDescriptionDefault
resourceYesThe resource name (e.g., customers, contacts, salesOpportunities)

TDQS

C2.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It implies a read operation but does not explicitly state that it is read-only, nor does it disclose any behavioral traits like idempotency or side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the purpose. It could be slightly expanded without becoming verbose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with one parameter and no output schema, the description is minimally adequate but incomplete: it does not describe the format or content of the returned schema information, leaving the agent uncertain about the output.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds no meaning beyond what the input schema already provides (the 'resource' parameter has a description). Schema coverage is 100%, but the description does not elaborate on the parameter's usage or constraints.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states a specific verb ('Get') and resource ('schema information for a Business Central resource'), and it distinguishes itself from sibling tools that operate on list/items.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus its siblings, nor are there any exclusions or context for usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_itemsB

Get items from Business Central with filtering and pagination

ParametersJSON Schema
NameRequiredDescriptionDefault
topNoMaximum number of items to return (optional)
skipNoNumber of items to skip for pagination (optional)
filterNoOData filter expression (optional)
resourceYesThe resource name (e.g., customers, contacts, salesOpportunities)

TDQS

B3.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It indicates a read operation ('get'), but does not explicitly state non-destructive behavior or any other behavioral traits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence with no wasted words. However, it is too short and could benefit from additional context without sacrificing conciseness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the presence of sibling tools and the lack of output schema, the description is insufficient. It does not explain the return format, valid resource values, or error handling, making it incomplete for an agent to use effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

All parameters have schema descriptions (100% coverage), so baseline is 3. The description adds no additional meaning beyond what is in the schema; it merely mentions filtering and pagination, which are already reflected in the parameter names and descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool retrieves items with filtering and pagination. However, it does not distinguish from the sibling tool 'get_items_by_field', which also retrieves items.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives like 'get_items_by_field'. The description implies listing with filters but does not specify conditions or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

update_itemC

Update an existing item in Business Central

ParametersJSON Schema
NameRequiredDescriptionDefault
item_idYesThe ID of the item to update
resourceYesThe resource name (e.g., customers, contacts)
item_dataYesThe item data to update

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description must disclose behavior. It only says 'update' without mentioning side effects, authorization, idempotency, or response. Minimal disclosure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence, concise and front-loaded. However, it could be slightly expanded without losing conciseness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema, no annotations, and nested item_data parameter. Description lacks details on success/error behavior, constraints, or return values, making it incomplete for a mutation tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with descriptions for all parameters. Description adds no extra meaning beyond schema; baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states it updates an existing item in Business Central, with verb and resource. However, 'item' is vague and doesn't specify the entity type, which slightly reduces clarity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus siblings like create_item or delete_item. Agent is left without context for tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 6 tool updatesv0.1.4
    • First observedcreate_item
    • First observeddelete_item
    • First observedget_items_by_field
    • First observedget_schema
    • First observedlist_items
    • First observedupdate_item

TDQS

A3.5/5.0
Disambiguation5/5

Each tool has a clear distinct purpose: schema retrieval, listing with filtering, field-based search, and standard CRUD operations. No overlap exists.

Naming Consistency5/5

All tools follow a consistent verb_noun pattern in snake_case (e.g., get_schema, create_item), making naming predictable and clear.

Tool Count5/5

With 6 tools covering schema retrieval and full CRUD for items, the set is well-scoped and each tool serves a necessary function.

Completeness5/5

Covers all essential operations for items: create, read (list and field-based), update, delete, plus schema metadata. No obvious gaps for the item-focused domain.

Maintenance

ActivitySlowing
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    MCP server that integrates with Microsoft Dynamics 365 Business Central, enabling querying of customers, items, and sales orders through natural language commands in Claude Desktop.
    10
    -
  • A
    license
    A
    quality
    D
    maintenance
    Model Context Protocol (MCP) server for Microsoft Dynamics 365 Business Central. Provides AI assistants with direct access to Business Central data through properly formatted API v2.0 calls.
    6
    30
    8
    MIT
  • A
    license
    B
    quality
    C
    maintenance
    MCP server for Microsoft Dynamics 365 Business Central, enabling AI assistants to perform CRUD operations, query data, and retrieve schemas via Business Central API v2.0.
    6
    30
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    MCP server that provides AI assistants direct access to Microsoft Dynamics 365 Business Central using its native WebSocket protocol, enabling page navigation, data operations, actions, and report execution without OData or browser automation.
    14
    57
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/MehrozeKhan73/Business-Central-MCP-Server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server