# 克隆仓库
git clone https://github.com/aaPanel/mcp-server.git
cd mcp_btpanel
# 安装依赖
go mod tidy
# 构建项目
make build
# 构建Windows版本
.\build.bat build
您也可以从Releases页面下载预编译的二进制文件。
通过环境变量配置程序:
# 设置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
# 清理构建产物
make clean
# 查看更多命令
make help
本项目采用MIT许可证。详情见LICENSE文件。
欢迎提交问题和功能请求!如果您想贡献,请遵循以下步骤:
git checkout -b feature/amazing-feature)git commit -m '添加一些精彩的功能')git push origin feature/amazing-feature)