Model Context Protocol server for Microsoft Dynamics 365 Business Central
npm install @knowall-ai/mcp-business-central
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.
- ✅ 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
- ✅ Clean Tool Names: No prefixes, just get_schema, list_items, etc.
- ✅ Full CRUD: Create, read, update, and delete Business Central records
No installation needed! Configure in Claude Desktop or Claude Code:
``json`
{
"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.
Install via Smithery:
`bash`
npx -y @smithery/cli install @knowall-ai/mcp-business-central --client claude
`bash`
git clone https://github.com/knowall-ai/mcp-business-central.git
cd mcp-business-central
npm install
npm run build
node build/index.js
| 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 |
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
- Azure CLI: Must be installed and authenticated
- Install: https://docs.microsoft.com/cli/azure/install-azure-cli
- Login: az loginaz account get-access-token --resource https://api.businesscentral.dynamics.com
- Get token:
Parameters:
- resource (string, required): Resource name (e.g., customers, contacts, salesOpportunities)
Example:
`json`
{
"resource": "customers"
}
Parameters:
- resource (string, required): Resource namefilter
- (string, optional): OData filter expressiontop
- (number, optional): Maximum number of items to returnskip
- (number, optional): Number of items to skip for pagination
Example:
`json`
{
"resource": "customers",
"filter": "displayName eq 'Contoso'",
"top": 10
}
Parameters:
- resource (string, required): Resource namefield
- (string, required): Field name to filter byvalue
- (string, required): Value to match
Example:
`json`
{
"resource": "contacts",
"field": "companyName",
"value": "Contoso Ltd"
}
Parameters:
- resource (string, required): Resource nameitem_data
- (object, required): Item data to create
Example:
`json`
{
"resource": "contacts",
"item_data": {
"displayName": "John Doe",
"companyName": "Contoso Ltd",
"email": "john.doe@contoso.com"
}
}
Parameters:
- resource (string, required): Resource nameitem_id
- (string, required): Item ID (GUID)item_data
- (object, required): Fields to update
Example:
`json`
{
"resource": "customers",
"item_id": "1366066e-7688-f011-b9d1-6045bde9b95f",
"item_data": {
"displayName": "Updated Name"
}
}
Parameters:
- resource (string, required): Resource nameitem_id
- (string, required): Item ID (GUID)
Example:
`json`
{
"resource": "contacts",
"item_id": "a1b2c3d4-e5f6-g7h8-i9j0-k1l2m3n4o5p6"
}
- companies - Company informationcustomers
- - Customer recordscontacts
- - Contact recordssalesOpportunities
- - Sales opportunitiessalesQuotes
- - Sales quotessalesOrders
- - Sales orderssalesInvoices
- - Sales invoicesitems
- - Product/service itemsvendors
- - Vendor records
- Verify you have access to Business Central in your tenant
- Test token retrieval: az account get-access-token --resource https://api.businesscentral.dynamics.com$3
- Check company name matches exactly (case-sensitive)
- Verify company exists: Access Business Central web UI
- Ensure URL includes correct tenant ID and environment$3
- Check resource name spelling (e.g., customers not customer)
- Some resources may not be available in your Business Central version
- Use get_schema to explore available resourcesDevelopment
`bash
Install dependencies
npm installBuild TypeScript
npm run buildWatch mode for development
npm run dev
``MIT
Issues and pull requests welcome at https://github.com/knowall-ai/mcp-business-central
- MCP Specification: modelcontextprotocol.io