bcdocker
MCP服务器和CLI 商务中心Docker 集装箱管理。运行通过 npx --无需安装。
npx bcdocker list # list containers
npx bcdocker create # create a BC sandbox
npx bcdocker test bcsandbox # run AL tests快速启动
作为MCP服务器(AI助手)
零安装——添加到IDE配置中,AI可以直接管理BC容器:
光标 (.cursor/mcp.json):
{
"mcpServers": {
"bcd": {
"command": "npx",
"args": ["-y", "bcdocker", "mcp"]
}
}
}克劳德桌面版 (claude_desktop_config.json):
{
"mcpServers": {
"bcd": {
"command": "npx",
"args": ["-y", "bcdocker", "mcp"]
}
}
}VS代码/副本 (.vscode/mcp.json):
{
"servers": {
"bcd": {
"type": "stdio",
"command": "npx",
"args": ["-y", "bcdocker", "mcp"]
}
}
}配置后,询问您的AI助手以下问题:
- “列出我的BC集装箱”
- “使用版本26.0创建新的BC沙盒”
- “显示bcsandbox中的应用程序”
- “在我的容器中运行测试”
- “编译并发布我的AL项目”
作为CLI
通过npx(无需安装):
npx bcdocker list
npx bcdocker info bcsandbox
npx bcdocker create --name bcsandbox --type sandbox --bc-version 26.0 --country w1 --bypass-cdn
npx bcdocker start bcsandbox
npx bcdocker stop bcsandbox
npx bcdocker apps bcsandbox --publisher Microsoft
npx bcdocker test bcsandbox --codeunit 50100全局安装 (把 bcd 在您的路径上):
npm i -g bcdocker
bcd list
bcd create --name mybc --bc-version 26.0
bcd test mybc先决条件
- Node.js 18+
- Windows PowerShell 5.1 (BC管理cmdlet需要它)
- Docker 桌面版 在Windows容器模式下
npm包将PowerShell模块捆绑在 ps/.用覆盖 BCD_MODULE_PATH 如果需要的话。
CLI命令
| 命令 | 描述 |
|---|---|
list / ls | 列出所有BC集装箱及其状态 |
info | 显示版本、状态和端点 |
create | 创建一个新的BC容器(5-30分钟) |
remove | 移除容器 |
start | 启动已停止的容器 |
stop | 停止正在运行的容器 |
restart | 重新启动容器 |
open | 在浏览器中打开BC Web客户端 |
apps | 列出应用程序(可选 --publisher) |
install | 安装.app文件 |
| `uninstall | |
| ` | 卸载应用程序 |
publish | 编译并发布一个AL项目 |
test [container] | 运行AL测试(可选 --codeunit, --function, --app) |
toolkit | 导入测试工具包(--full 为所有人) |
license | 导入许可证文件 |
MCP工具
与人工智能助手的MCP工具相同的15个操作:
list-containers container-info create-container remove-container start-container stop-container restart-container open-webclient list-apps install-app uninstall-app publish-project run-tests import-test-toolkit import-license
命名
| 术语 | 它是什么 |
|---|---|
bcdocker | 这个npm包和GitHub仓库。 |
bcd | 全局安装后的CLI命令(npm i -g bcdocker). |
bcdocker-toolkit | PowerShell+Windows UI仓库(模块 BCDocker).不同的回购。 |
相关
- **** --用于Business Central Docker容器的PowerShell模块和Windows UI
从1.x迁移到2.0
2.0中的重大变化:
- MCP服务器调用:添加
"mcp"arg到您的MCP客户端配置。之前的配置"args": ["-y", "bcdocker"]运行CLI(显示帮助而不是启动MCP服务器)。新"args": ["-y", "bcdocker", "mcp"]. bcd create旗帜:the--version标志(实际上意味着“工件类型”)被替换为--type sandbox|onprem和-v, --bc-version.以前bcd create --version sandbox→ nowbcd create --type sandbox一个特定的BC版本,如28.0现在工作:bcd create --bc-version 28.0.- 主控程序
create-container模式:theversion字段分为type(枚举:沙盒、本地)和bcVersion(字符串,例如。"28.0"或最新为空)。 - MCP工具响应:处理程序现在将stderr和非零退出代码表示为
Failed:\n...文本,而不是返回自信的回退消息。AI客户端将获得可操作的故障详细信息,而不是虚假的“完整”消息。
许可证
麻省理工学院
