aaPanel MCP 接口提供了丰富的功能,可用于获取面板系统信息、管理网站、数据库、Docker 容器和镜像,以及进行电子邮件管理等,能有效提升面板操作的便捷性和效率。
# 克隆仓库
git clone https://github.com/aaPanel/mcp-server.git
cd mcp_btpanel
# 安装依赖项
go mod tidy
# 构建项目
make build
# 构建 Windows 版本
.\build.bat build
您也可以从发布页面下载预编译的二进制文件。
通过环境变量配置程序:
# 设置 aaPanel 地址
export BT_BASE_URL="http://your-panel-address:8888"
# 设置 aaPanel API 令牌
export BT_API_TOKEN="your-api-token"
在 Cursor 中使用时,按照以下步骤进行配置:
{
"mcpServers": {
"mcp-aapanel": {
"command": "C:\\path\\to\\mcp-server.exe",
"env": {
"BT_BASE_URL": "http://192.168.xx.xx:8888/",
"BT_API_TOKEN": "xxxxxxxxxxxxxxxxxxxxxxxx"
}
}
}
}
使用 Makefile 进行构建:
# 构建项目
make build
# 构建 Windows 版本
make build-windows
# 清理构建 artifact
make clean
# 查看更多命令
make help
该项目 licensed under the MIT License。有关详细信息,请参阅 LICENSE 文件。
欢迎提交问题和功能请求!如果您希望贡献代码: