Dynamics 365 Business Central Admin MCP Server
Enables AI assistants to manage Dynamics 365 Business Central environments through natural language commands, including environment, app, session, and extension management.
README
Dynamics 365 Business Central Admin MCP Server (YAMPI)
A Model Context Protocol (MCP) server that enables AI assistants like Claude Desktop, GitHub Copilot, and Cursor to manage Dynamics 365 Business Central environments through natural language commands.
🌟 Features
- 🔐 Interactive Authentication - Secure Microsoft Entra ID authentication with browser-based login
- 📦 34 Administrative Tools - Complete environment, app, session, PTE upload, and extension management
- ⚡ Smart Token Caching - Automatic token refresh to minimize authentication prompts
- 🌍 Multi-Tenant Support - Manage multiple Business Central tenants seamlessly
- 💬 Natural Language Interface - Control BC through conversational AI commands
- 🔒 Secure by Design - No credentials stored, uses Azure authentication standards
📦 Installation
Via npm (Recommended)
npm install -g @demiliani/d365bc-admin-mcp
Prerequisites
- Node.js 16+ - Download
- Dynamics 365 Business Central - Admin access to your tenant
- Microsoft Entra ID - Azure account with BC admin privileges
⚙️ Configuration
After installation, configure your AI assistant to use the MCP server.
Claude Desktop
Location:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
Configuration:
{
"mcpServers": {
"d365bc-admin": {
"command": "d365bc-admin-mcp"
}
}
}
Steps:
- Open the configuration file (create it if it doesn't exist)
- Add the above configuration
- Save the file
- Restart Claude Desktop
- You should see the MCP server connected in the chat window
GitHub Copilot (VS Code)
Location: .vscode/settings.json in your workspace or global settings
Configuration:
{
"github.copilot.chat.mcp.servers": {
"d365bc-admin": {
"command": "d365bc-admin-mcp"
}
}
}
Steps:
- Open VS Code Settings (JSON)
- Add the above configuration
- Save the file
- Restart VS Code
- Open GitHub Copilot Chat to start using the MCP server
Cursor
Location: .cursor/config.json in your workspace
Configuration:
{
"mcp": {
"servers": {
"d365bc-admin": {
"command": "d365bc-admin-mcp"
}
}
}
}
Steps:
- Create
.cursor/config.jsonin your workspace root - Add the above configuration
- Save the file
- Restart Cursor
- The MCP server will be available in Cursor's AI chat
🔐 Authentication
On first use, a browser window will open for Microsoft Entra ID authentication. Sign in with your Business Central administrator account. The token is cached for 50 minutes and automatically refreshed.
No additional setup required - the MCP server handles authentication automatically!
💡 Usage Examples
Once configured, use natural language commands in your AI assistant:
Environment Management
"Show me all my Business Central environments"
"What's the status of my Production environment?"
"Create a new sandbox environment called 'Dev-Test' in the US"
"Copy Production environment to a new sandbox called 'Testing'"
"Delete the 'Old-Test' sandbox environment"
Application Management
"List all installed apps in Production"
"Show available updates for my apps"
"Install app with ID <app-id> in my Production environment"
"Update the Sales Module app to version 2.0"
"Uninstall the old Marketing app from Sandbox"
Session Management
"Show active user sessions in Production"
"Terminate session abc123 in my Sandbox environment"
Update Windows
"Get the update window settings for Production"
"Set update window for Production to 10 PM - 6 AM UTC"
Storage & Monitoring
"Show storage usage for all environments"
"What's the storage usage for Production?"
Extension Deployment & PTE Uploads
"Upload the app c:\\Packages\\MyPTE.app to Production (Fabrikam)"
"Bulk upload all .app files from c:\\Packages into Sandbox and wait for deployments"
"Check the extension deployment status for Fabrikam in Production"
🛠️ Available Tools (34 Total)
The MCP server exposes 33 administrative tools organized by category:
🔑 Authentication & Tenant Management (2 tools)
| Tool | Description |
|---|---|
get_microsoft_entra_id_token |
Get authentication token with intelligent caching |
get_tenant_id_from_tenant_name |
Retrieve tenant ID from tenant name |
🌍 Environment Management (10 tools)
| Tool | Description |
|---|---|
get_environment_informations |
List all BC environments in a tenant |
create_new_environment |
Create a new BC environment |
copy_environment |
Copy an existing environment to create a new one |
delete_environment |
Delete a Business Central environment |
get_environment_update_window |
Get update window settings for an environment |
set_environment_update_window |
Configure update window for an environment |
set_app_insights_key |
Set Application Insights connection string |
get_environment_storage_usage |
Get storage usage for a specific environment |
get_all_environments_storage_usage |
Get storage usage for all environments |
get_companies |
List companies in an environment |
📦 Application Management (6 tools)
| Tool | Description |
|---|---|
get_installed_apps |
List apps installed in an environment |
get_available_app_updates |
Check for available app updates |
install_app |
Install a Marketplace (AppSource) app in a Business Central environment |
update_app |
Update an app to a specific version |
uninstall_app |
Remove an app from an environment |
get_app_operations |
Get status of app install/update/uninstall operations |
🔄 Environment Updates (2 tools)
| Tool | Description |
|---|---|
get_available_environment_updates |
Check for available BC version updates |
schedule_environment_update |
Schedule or run an environment update |
👥 Session Management (2 tools)
| Tool | Description |
|---|---|
get_active_sessions |
List active user sessions in an environment |
kill_active_sessions |
Terminate a specific active session |
🔔 Notification Management (3 tools)
| Tool | Description |
|---|---|
get_notification_recipients |
List notification recipients |
create_notification_recipient |
Add a new notification recipient |
delete_notification_recipient |
Remove a notification recipient |
🔧 Feature Management (3 tools)
| Tool | Description |
|---|---|
get_available_features |
List available features in an environment |
activate_feature |
Activate a feature in a Business Central environment |
deactivate_feature |
Deactivate a feature in a Business Central environment |
🧩 Extension Deployment & PTE Uploads (4 tools)
| Tool | Description |
|---|---|
get_extension_deployment_status |
Get extension deployment status for an environment/company |
create_pte_upload |
Create and upload a single PTE (.app) file |
create_pte_uploads_from_folder |
Bulk upload PTEs from a folder, waiting for each deployment |
get_extension_upload |
Retrieve the status of a specific extension upload task |
🧹 Token Management (2 tools)
| Tool | Description |
|---|---|
clear_cached_token |
Clear cached authentication token for a tenant |
get_token_cache_status |
View cached token status for all tenants |
🎯 Quick Start
-
Install the package:
npm install -g @demiliani/d365bc-admin-mcp📖 Need detailed installation instructions? See the Installation Guide for platform-specific steps (Windows, macOS, Linux) and troubleshooting.
-
Configure your AI assistant (see Configuration section above)
-
Start using it:
- Open your AI assistant (Claude, Copilot, or Cursor)
- Type: "Show me all my Business Central environments"
- Authenticate when prompted (first time only)
- Start managing your BC environments with natural language!
📚 Documentation
For detailed installation documentation, see:
- Installation Guide - Detailed installation steps
🔍 Troubleshooting
"Command not found: d365bc-admin-mcp"
npm install -g @demiliani/d365bc-admin-mcp
which d365bc-admin-mcp
Authentication Issues
- Ensure you have Business Central admin privileges
- Check that you're signing in with the correct Microsoft account
- Try clearing the token cache: "Clear cached token for tenant [tenant-id]"
MCP Server Not Appearing
- Verify the config file location for your OS
- Check for JSON syntax errors in the config
- Restart your AI assistant completely
- Check the assistant's logs for error messages
🤝 Contributing
Contributions are welcome! Please feel free to submit issues, feature requests, or pull requests.
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
📮 Support
- npm Package: https://www.npmjs.com/package/@demiliani/d365bc-admin-mcp
- Issues: Report bugs or request features via GitHub Issues
- Version: 1.2.0
🙏 Acknowledgments
Built with:
- Model Context Protocol - Standard for AI assistant integrations
- Azure Identity - Microsoft authentication
- Business Central Admin API - BC administration
Made with ❤️ for the Dynamics 365 Business Central community
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。