Business Central MCP Server

Business Central MCP Server

Enables MCP clients to access and manage Microsoft Dynamics 365 Business Central entities, such as creating sales orders, via a modern async MCP server.

Category
访问服务器

README

Business Central MCP Server

License: MIT

A modern MCP server designed for effortless integration with Microsoft Dynamics 365 Business Central, allowing MCP clients to easily access and manage any entity within your Business Central environment. Developed by Tan Tran.

Features

  • Async interface to Business Central resources via Model Context Protocol (MCP)
  • Optimized HTTP request handling
  • Tools for managing sales orders and more

Project Structure

main.py                  # Entrypoint for the MCP server
requirements.txt         # Python dependencies
src/
    business_central_client.py
    modes.py
    sale_order_tools.py
    # ...other tool modules
LICENSE
README.md

Setup

  1. Cài đặt Poetry (nếu chưa có):
curl -sSL https://install.python-poetry.org | python3 -
  1. Đăng ký ứng dụng trong Azure Portal (Microsoft Entra ID) để lấy Client ID, Tenant ID, và Client Secret (xem docs/enabling-api.md).
  2. Cấp quyền API cho app (Business Central, Application permissions, ...).
  3. Copy .env.example thành .env và điền thông tin cấu hình:
BC_API_URL=https://api.businesscentral.dynamics.com/v2.0/<environment>
BC_TENANT_ID=<your-tenant-id>
BC_CLIENT_ID=<your-client-id>
BC_CLIENT_SECRET=<your-client-secret>
BC_COMPANY=<company-name>
BC_SCOPE=https://api.businesscentral.dynamics.com/.default
ENABLE_RESOURCE_TOOLS=true  # Enable or disable resource tools registration (true/false)
  1. Cài dependencies bằng Poetry:
poetry install
  1. (Tùy chọn) Nếu muốn vào môi trường ảo Poetry:
poetry shell
  1. Chạy server:
poetry run python main.py

Environment Variables

  • BC_API_URL: Business Central API base URL
  • BC_TENANT_ID: Azure AD tenant ID
  • BC_CLIENT_ID: Application (client) ID
  • BC_CLIENT_SECRET: Client secret
  • BC_COMPANY: Your Business Central company name
  • BC_SCOPE: OAuth2 scope (default: https://api.businesscentral.dynamics.com/.default)
  • ENABLE_RESOURCE_TOOLS: Enable or disable resource tools registration (true/false). If set to false, resource endpoints will not be registered.

Tool Registration

Tools are registered in main.py:

from src.tools.sales_order_tools import register_sales_order_tools
register_sales_order_tools(mcp)

Add new tools by creating modules in src/ and registering them in main.py.

Development

  • All business logic is in src/.
  • Add new tools by creating new modules in src/ and registering them in main.py.

Sales Order Support

Create Sales Order (Tool: create_sales_order)

This server supports creating new sales orders in Business Central via the MCP tool create_sales_order.

Input parameters:

  • customer_number (str): Customer number in Business Central
  • items (list of str): List of item IDs to add to the order
  • quantities (list of float): List of quantities for each item (must match length of items)
  • order_date (str, optional): Order date in format YYYY-MM-DD

Example tool call:

{
  "tool": "create_sales_order",
  "arguments": {
    "customer_number": "10000",
    "items": ["ITEM001", "ITEM002"],
    "quantities": [2, 5],
    "order_date": "2025-07-28"
  }
}
  • The tool will create a sales order header and add lines for each item/quantity pair.
  • Returns the created sales order object if successful.

See docs/sale-order.md for API details and field mapping.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Copyright (c) 2025 Tan Tran (me@tantran.dev, www.tantran.dev)

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选