MCP Server for Microsoft Dynamics 365 Business Central
Project description
🏢 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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_business_central-1.0.9.tar.gz.
File metadata
- Download URL: mcp_business_central-1.0.9.tar.gz
- Upload date:
- Size: 29.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
05048f49b8ba23155c1e6c9c472e1fc6c4ac5d40c19260e6de5b8b68730ea9ba
|
|
| MD5 |
a136b425d97be78219d13db2667f19a7
|
|
| BLAKE2b-256 |
d967be7dab6f7c9f42f6fcdde0e32fa0af17d1940d2ab7706d837fa097e43383
|
File details
Details for the file mcp_business_central-1.0.9-py3-none-any.whl.
File metadata
- Download URL: mcp_business_central-1.0.9-py3-none-any.whl
- Upload date:
- Size: 31.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bdf55bfa03dc9cdca2d4d2fe161d3cb3da7e6ab563ff94801d5971f614aee5c3
|
|
| MD5 |
6338444f6d3f9640aafc06dd296dd9d4
|
|
| BLAKE2b-256 |
7b403be8316c12f2e1d47d2d5e9776039965af3d5bed83f253c497a625927fbf
|