Business Central MCP Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Business Central MCP Server
Model Context Protocol server for Microsoft Dynamics 365 Business Central.
Connect AI agents to Business Central data — from a single
npxcommand for developers to a full Azure deployment for enterprise.
Two Ways to Use
| npm (Developer) | Azure (Enterprise) |
Use case | Local AI assistants, development, prototyping | Production cloud services, multi-tenant |
Transport | stdio (stdin/stdout) | HTTP/SSE |
Clients | Claude Desktop, Claude Code, Cline, Cursor | Claude.ai, Copilot Studio, Azure AI Foundry |
Setup time | 2 minutes | 15 minutes |
Infrastructure | None (runs locally) | Azure Container Apps |
Related MCP server: Business Central MCP Server
Quick Start: npm (Developer Mode)
Option A: npx (no install)
npx business-central-mcp-server --stdioOption B: Global install
npm install -g business-central-mcp-server
business-central-mcp-server --stdioConfigure in Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"business-central": {
"command": "npx",
"args": ["-y", "business-central-mcp-server", "--stdio"],
"env": {
"BC_TENANT_ID": "<your-tenant-id>",
"BC_CLIENT_ID": "<your-client-id>",
"BC_CLIENT_SECRET": "<your-client-secret>",
"BC_ENVIRONMENT_NAME": "Sandbox",
"BC_COMPANY_ID": "<your-company-id>"
}
}
}
}Configure in Claude Code
Create .mcp.json in your project root:
{
"mcpServers": {
"business-central": {
"command": "npx",
"args": ["-y", "business-central-mcp-server", "--stdio"],
"env": {
"BC_TENANT_ID": "<your-tenant-id>",
"BC_CLIENT_ID": "<your-client-id>",
"BC_CLIENT_SECRET": "<your-client-secret>",
"BC_ENVIRONMENT_NAME": "Sandbox",
"BC_COMPANY_ID": "<your-company-id>"
}
}
}
}CLI Arguments
You can pass configuration as CLI arguments instead of environment variables:
business-central-mcp-server --stdio \
--tenantId <tenant-id> \
--clientId <client-id> \
--clientSecret <client-secret> \
--environment Sandbox \
--companyId <company-id>Getting Your Credentials
Azure AD App Registration — Register an app in Azure Portal > App registrations
API Permissions — Add
Dynamics 365 Business Central > API.ReadWrite.All(Application permission)Client Secret — Create under Certificates & secrets
Tenant ID — Found on the app registration Overview page
Company ID — Use the
list_companiestool after connecting, or find it in BC Admin Center
Quick Start: Azure (Enterprise Mode)
For production deployments serving cloud AI clients (Claude.ai, Copilot Studio, Azure AI Foundry).
Prerequisites
Azure subscription
Business Central tenant with API access
Azure AD app registration (see Deployment Guide)
Deploy
Use the GitHub Actions workflow or deploy manually:
git clone https://github.com/olederkach/business-central-mcp-server.git
cd business-central-mcp-server
# Deploy to Azure Container Apps (see docs/DEPLOYMENT.md for full walkthrough)What gets deployed:
Azure Container App (auto-scaling, 1-10 replicas)
Azure Container Registry
Application Insights (telemetry, optional)
Authentication Modes
Mode | Server | Use Case |
OAuth |
| Claude.ai, Copilot Studio (user-level auth) |
API Key |
| Azure AI Foundry, simple integrations |
Connect Claude.ai (OAuth)
Claude.ai > Settings > MCP Servers > Add Custom
Name: Business Central
URL: https://<your-server>.azurecontainerapps.io/mcp
Client ID: <your-azure-client-id>
Client Secret: <your-azure-client-secret>Connect Copilot Studio (OAuth Dynamic Discovery)
Copilot Studio > Knowledge > Add knowledge > MCP
Name: BC-MCP-Server
URL: https://<your-server>.azurecontainerapps.io/mcp
Auth: OAuth 2.0 > Dynamic discovery
Client ID: <your-azure-client-id>
Client Secret: <your-azure-client-secret>
Scope: api://<your-azure-client-id>/.default openidConnect Azure AI Foundry (API Key)
Settings > Connections > + New connection > MCP
Endpoint: https://<your-server>.azurecontainerapps.io/mcp
Authentication: API Key (X-API-Key header)See docs/DEPLOYMENT.md for the complete deployment guide and docs/MCP_CLIENT_SETUP.md for all client configurations.
Tools (14)
API Context Management
Tool | Description | Type |
| Discover available API routes | read-only |
| Switch publisher/group/version | state change |
| Get current API context | read-only |
Company Management
Tool | Description | Type |
| List all BC companies | read-only |
| Switch active company | state change |
| Get current company | read-only |
Resource Discovery
Tool | Description | Type |
| List all entity names | read-only |
| Search OData schema | read-only |
| Get entity fields & types | read-only |
CRUD Operations
Tool | Description | Type |
| Query with OData filter/sort/page | read-only |
| Create new record | destructive |
| Patch existing record (ETag support) | destructive |
| Permanently remove record | destructive |
| Search by field value | read-only |
Example
User: "Show me customers in Atlanta"
Tool call: list_records
Arguments: { "resource": "customers", "filter": "city eq 'Atlanta'", "top": 10 }Multi-API Support
Business Central exposes multiple API surfaces. This server supports all of them:
Standard BC API v2.0 — customers, vendors, items, salesOrders, etc.
Microsoft Extended APIs — automation, analytics
Custom ISV APIs — third-party extension APIs
Switch at runtime:
set_active_api({ publisher: "microsoft", group: "automation", version: "v1.0" })Configuration
Environment Variables
Required (both modes)
Variable | Description |
| Azure AD tenant GUID |
| App registration client ID |
| App registration client secret |
|
|
Recommended
Variable | Default | Description |
| (auto-discovered) | Default company UUID |
Enterprise (HTTP mode only)
Variable | Default | Description |
| — | Comma-separated API keys for client auth |
|
|
|
|
| Allowed origins |
|
| HTTP port |
| — | Azure Key Vault for secrets |
| — | Monitoring |
|
| Enable rate limiting |
See .env.example for the complete reference.
Architecture
┌──────────────────────────────┐
│ AI Clients │
│ Claude Desktop/Code (stdio) │
│ Copilot Studio (HTTP) │
│ Azure AI Foundry (HTTP) │
└──────────┬───────────────────┘
│
┌────────────────┼────────────────┐
│ stdio │ │ HTTP/SSE
▼ │ ▼
┌─────────────────┐ │ ┌─────────────────────────┐
│ stdio-server │ │ │ Express + MCP Protocol │
│ (npm/npx) │ │ │ (Azure Container Apps) │
│ │ │ │ │
│ 14 Generic │ │ │ API Key / OAuth Auth │
│ Tools │ │ │ Rate Limiting │
└────────┬────────┘ │ │ App Insights │
│ │ └───────────┬──────────────┘
│ │ │
└────────────────┼────────────────┘
│
▼
┌──────────────────────────────┐
│ Business Central API │
│ OAuth 2.0 (client_credentials)│
│ OData V4.0 │
└──────────────────────────────┘Key Components
Component | npm Mode | Enterprise Mode |
Transport | stdio (stdin/stdout) | HTTP + SSE |
Tools | 14 generic tools | 14 generic + entity-specific |
Auth (BC) | OAuth client_credentials | OAuth client_credentials |
Auth (clients) | N/A (local process) | API Key or OAuth |
State | In-process (session map) | Per-request |
Monitoring | stderr logs | Application Insights |
Secrets | env vars / CLI args | Azure Key Vault |
Development
Local Setup
git clone https://github.com/olederkach/business-central-mcp-server.git
cd business-central-mcp-server
npm install
# Configure
cp .env.example .env
# Edit .env with your BC credentials
# Development (stdio)
npm run dev:stdio
# Development (HTTP)
npm run dev:http
# Production build
npm run build
npm startBuild & Pack
npm run build # Compile TypeScript
npm pack # Create .tgz for local install
npm link # Symlink for local developmentProject Structure
src/
├── index.ts # Entry point (stdio/HTTP dispatcher)
├── version.ts # Centralized version constant
├── config.ts # CLI args + env var parsing
├── server.ts # Express HTTP server
├── api/ # API context & company management
├── auth/ # Authentication (OAuth, API Key, DCR)
├── bc/ # Business Central client & metadata
├── config/ # Environment validation
├── errors/ # Error codes & builders
├── mcp/ # MCP protocol handler & prompts
├── middleware/ # Express middleware
├── monitoring/ # App Insights & analytics
├── openapi/ # OpenAPI spec generation
├── tools/ # Tool definitions & executors
│ ├── generic-tools.ts # 14 generic tool definitions
│ ├── generic-executor.ts # Generic tool executor
│ ├── executor.ts # Entity-specific executor (HTTP mode)
│ └── generator.ts # Tool generator from metadata
├── transports/ # stdio, SSE, Copilot SSE servers
└── utils/ # Logger, validators, sanitizerTroubleshooting
"No tools available" in Copilot Studio UI
Expected with MCP protocol 2024-11-05. Tools work at runtime — test from the chat interface.
"Authentication failed"
npm mode: Verify
BC_CLIENT_ID,BC_CLIENT_SECRET, andBC_TENANT_IDEnterprise: Also check
MCP_API_KEYSandX-API-Keyheader
"Cannot connect to Business Central"
Verify Azure AD app registration has
Dynamics 365 Business Central > API.ReadWrite.AllConfirm the app has admin consent granted
Test the credentials directly:
curl -X POST "https://login.microsoftonline.com/<tenant-id>/oauth2/v2.0/token" \ -d "client_id=<client-id>&client_secret=<secret>&scope=https://api.businesscentral.dynamics.com/.default&grant_type=client_credentials"
"Company not found"
Run list_companies first to get available company IDs, then use set_active_company or set BC_COMPANY_ID.
Documentation
Document | Description |
Azure deployment guide | |
5-minute quick start | |
Copilot Studio integration | |
Azure AI Foundry setup | |
OData parameters, errors, limits | |
ADRs and design decisions | |
Security policies | |
Version history |
License
MIT — see LICENSE
Links
Built for the Business Central and AI community.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Connect any AI agent to 1,000+ apps and 27,000+ actions through one remote MCP server (OAuth).
Odoo ERP for AI agents: hosted OAuth endpoint, gated writes, one endpoint for every instance.
CompanyLens is a remote MCP server giving AI agents instant access to official company registry data across 19 jurisdictions in Europe, the Americas, and Asia-Pacific. Eighteen read-only tools let you search companies and people, look up officers and beneficial owners, map corporate networks through shared directors, screen names against the UK disqualified directors register, find every company at a registered address, and pull filing history — all from a single connector. Visit our website: https://companylens.io
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceConnects AI clients like VS Code Copilot and Claude Desktop to Microsoft Dynamics 365 Business Central via the Cloud Events API.1-
- AlicenseAqualityDmaintenanceEnables AI assistants to directly access and interact with Microsoft Dynamics 365 Business Central using native WebSocket protocol.14MIT
- AlicenseAqualityDmaintenanceGives AI assistants direct access to Microsoft Dynamics 365 Business Central via the native WebSocket protocol, replacing OData, APIs, and browser automation. Enables page navigation, data reading/writing, actions, searches, and report execution.14MIT
- AlicenseBqualityDmaintenanceMCP 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.6MIT