🏢 Microsoft Dynamics 365 Business Central MCP Server
A MCP Server for Microsoft Dynamics 365 Business Central with OAuth2 authentication and API v2.0 endpoints. Built by Dmitry Katson, Microsoft AI & Business Central MVP, enabling AI agents to seamlessly interact with Business Central data.
Please note that this project is actively maintained and may receive updates to enhance functionality and compatibility.
�� Table of Contents
- 🎯 Overview
- 🛠️ Currently Supported Tools
- 🔌 Installation & Getting Started
- ⚙️ Configuration
- ❓ Troubleshooting
- 📚 Additional Resources
- 👨💻 Author
- 📄 License
🎯 Overview
✨ Example Prompts: Your Business Central Assistant
Your AI assistant can seamlessly interact with your Business Central environment using these advanced tools. Try asking questions like:
- "List all open purchase orders for the last month"
- "Which customers have not placed an order in the past 90 days?"
- "Show me the top 5 selling items by revenue this quarter"
- "What are the outstanding vendor invoices over $10,000?"
- "Find all sales orders awaiting shipment"
- "Which items are below their reorder point?"
- "Get the approval status of all posted purchase invoices"
Everything exposed by your Business Central APIs—whether standard or custom—is accessible through this MCP server.
📊 Key Capabilities
- 🔐 OAuth2 Authentication: Secure Azure AD integration with Business Central
- 🏢 Auto Company Discovery: Automatic company detection and switching
- 📊 Full CRUD Operations: Complete entity management capabilities
- 🔍 Schema Discovery: Dynamic field and relationship exploration
- ⚡ API v2.0: Latest Business Central OData endpoints
- 🧩 Clean Architecture: Professional, scalable, and maintainable design
🛠️ Currently Supported Tools
| Tool Name | Description | Input Parameters |
|---|---|---|
list_companies |
Discover all available companies in your BC environment | None |
set_active_company |
Set the active company for subsequent operations | company_id (string): UUID of the company |
get_active_company |
Get information about the currently active company | None |
list_resources |
List all available Business Central resources/entities | None |
get_odata_metadata |
Smart metadata search - find entities, properties, relationships by search term | search (string): Search termsearch_type (string): Type filterinclude_properties (bool): Include propertiesinclude_relationships (bool): Include relationships |
get_resource_schema |
Get detailed schema and field information for an entity | resource (string): Entity namecompany_id (string, optional): Company UUID |
list_records |
List entity records with advanced filtering, sorting, and pagination | resource (string): Entity namefilter (string, optional): OData filterorderby (string, optional): Sort orderselect (string, optional): Field selectionexpand (string, optional): Related entitiestop (int, optional): Record limitskip (int, optional): Records to skip |
🔌 Installation & Getting Started
The Business Central MCP Server supports installation across multiple clients. Choose your preferred client below for streamlined setup.
▶️ Getting Started
Follow these steps to get your Business Central MCP Server up and running:
-
📦 Install Python & Package
- Ensure Python 3.8+ is installed on your system
- Install the MCP server: see installation commands
- Verify installation works: verification steps
-
🔐 Set up Azure Authentication
- Create Azure AD app registration: detailed Azure setup
- Configure Business Central API permissions
- Generate client secret and note required values
-
🔧 Add to Your MCP Client
- Configure your preferred client: client configuration table
-
🚀 Test the Connection
- Restart your MCP client completely for changes to take effect
- Try example prompts:
- "Show me all customers from Business Central"
- "List available Business Central entities"
- "What companies are available in my Business Central environment?"
- Explore common Business Central entities like customers, vendors, items, and sales orders
💡 Tip: Once connected, you can ask about any Business Central entity or use natural language to query your business data!
Need help? Check our troubleshooting section for common issues and solutions.
📦 Installation
Prerequisites
Python 3.8+ Required - The MCP server requires Python to be installed on your system.
| Operating System | Installation Method |
|---|---|
| Windows | Python Installation Steps1. Download Python from python.org 2. Important: Check "Add Python to PATH" during installation 3. Verify installation: python --version4. If pip is not recognized, try:python -m pip --version |
| macOS | Python Installation StepsOption 1 - Official Python: Download from python.org Option 2 - Homebrew: brew install pythonOption 3 - Built-in (macOS 12.3+): Python 3 is pre-installed |
| Linux | Python Installation StepsUbuntu/Debian: sudo apt updateCentOS/RHEL/Fedora: sudo yum install python3 python3-pipArch Linux: sudo pacman -S python python-pip |
Install MCP Business Central
Once Python is installed, install the MCP server:
# Windows
pip install mcp-business-central
# or if pip is not in PATH:
python -m pip install mcp-business-central
# macOS/Linux
pip3 install mcp-business-central
# or
python3 -m pip install mcp-business-central
Verify Installation
# Windows
python -m mcp_business_central --help
# macOS/Linux
python3 -m mcp_business_central --help
⚙️ Configuration
🔐 Azure AD Setup
-
Create Azure AD App Registration
- Navigate to Azure Portal → Azure Active Directory → App registrations
- Click "New registration"
- Provide a meaningful name (e.g., "Business Central MCP Server")
-
Configure API Permissions
- Go to "API permissions"
- Add permission → Microsoft APIs → Dynamics 365 Business Central
- Select
Financials.ReadWrite.All(Application permission) - Grant admin consent for your organization
-
Create Client Secret
- Go to "Certificates & secrets"
- Click "New client secret"
- Copy the secret value (you won't see it again!)
-
Note Required Values
- Application (client) ID
- Directory (tenant) ID
- Client secret value
🔧 Client Configuration
| Client | Configuration | MCP Guide |
|---|---|---|
| Claude Desktop | View ConfigurationLocation: • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json• Windows: %APPDATA%\Claude\claude_desktop_config.jsonmacOS: {Windows: { |
Claude Desktop MCP Guide |
| VS Code | View ConfigurationInstall the MCP extension and add to your MCP configuration: { |
VS Code MCP Official Guide |
| Cursor IDE | View ConfigurationAdd to your Cursor MCP settings: { |
Cursor MCP Official Guide |
| Windsurf | View ConfigurationAdd to your Windsurf MCP configuration: { |
Windsurf MCP Guide |
❓ Troubleshooting
💻 System Prompt
For optimal tool usage, add this system prompt to encourage your AI assistant to use Business Central tools:
## Business Central Integration
You have access to MCP tools for Microsoft Dynamics 365 Business Central. These tools allow you to:
- Query customer, vendor, and item data
- Access financial information and sales orders
- Explore entity schemas and relationships
- Manage company contexts
When handling questions about business data, ERP operations, or financial information, use these Business Central tools to provide accurate, real-time information from the user's Business Central environment.
⚠️ Common Issues
| Issue | Possible Solution |
|---|---|
| "pip is not recognized" (Windows) | • Python not installed or not in PATH • Reinstall Python with "Add to PATH" checked • Use python -m pip instead of pip• Restart command prompt after Python installation |
| "python: command not found" | • Python not installed • On macOS/Linux, try python3 instead of python• Install Python from official website or package manager |
| Authentication Errors | • Verify Azure AD app permissions • Check tenant/client ID and secret • Ensure admin consent is granted • Confirm Financials.ReadWrite.All permission |
| API Access Issues | • Confirm Business Central environment access • Verify correct entity names (case-sensitive) • Use list_resources to see available entities• Check environment parameter ( production vs sandbox) |
| Connection Timeouts | • Verify network connectivity to Business Central • Check if Business Central service is online • Increase timeout settings if needed |
| Empty Results | • Use get_resource_schema to check available fields• Verify filter syntax (OData v4.0) • Check company selection with get_active_company |
| Tool Not Appearing | • Restart your MCP client completely • Verify Python installation and package • Check environment variables are set correctly |
🆘 Getting Support
📚 Additional Resources
- Microsoft Dynamics 365 Business Central Documentation
- Business Central Web API Reference
- Model Context Protocol Specification
- Azure AD App Registration Guide
👨💻 Author
Dmitry Katson - GitHub | Website
🏆 Microsoft AI & Business Central MVP
🏆 Contribution Hero 2024
🌐 Creator of CentralQ.ai - AI search for Business Central community
📄 License
MIT License - Copyright (c) 2025 Dmitry Katson
Release files for mcp-business-central 1.0.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mcp_business_central-1.0.10.tar.gz | 30.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mcp_business_central-1.0.10-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 61.9 kB
Release files / mcp_business_central-1.0.10.tar.gz
| Download URL | mcp_business_central-1.0.10.tar.gz |
|---|---|
| Size | 30.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4f77be22b5d596d5b74f7f24e3f21aeb5528ec795ef274a07ee4d23425b454ff
|
|
BLAKE2b-256 checksum How to use checksums |
588924a9b7d7aaab57f0347a08a8dcdd6b3913078ee3cd95db09cdeec355d7cb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.11
|
Release files / mcp_business_central-1.0.10-py3-none-any.whl
| Download URL | mcp_business_central-1.0.10-py3-none-any.whl |
|---|---|
| Size | 31.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9ef7d658aabb82838abe879a9fc346dafdd72fd46b3e6a700d7102c3e69a5f54
|
|
BLAKE2b-256 checksum How to use checksums |
bd312e4278dbec43125410426be22fe588dcc33f98b7948e47637eb1fade0262
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.11
|