AM

aapanel/mcp-server

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

18 stars 6 forks 质量 55 趋势 22MIT

一个用于aPanel的MCP服务器.

概览

-获取面板系统信息和网络状态 - 查询 PHP网站列表 - 创建新的 PHP网站 - 查询 MySQL 数据库列表 - 查询 Docker 容器管理 - 查看容器列表 - 查看容器细节 - Docker 图像管理 - 查看本地图像列表 - 邮件管理 - 添加电子邮件账户 - 查看电子邮件列表 - 获取面板公共配置信息 - 更多正在开发的功能. -去 1.18+ - API小组访问 - API小组令牌 也可以从"发行"页面下载预编译的二进制. 通过环境变量配置程序 : 在光标中使用时,通过下列步骤配置: 1. 打开光标设置 > 扩展名 > MCP工具 2. 添加新的MCP工具 3. 以下列格式填写配置 : 1. 在相应的模块目录 2. 创建或修改文件. 定义新工具常数和工具对象 3. 执行处理器功能 4. 注册工具在注册工具中的主要功能.

概述(AI 翻译)

□ 特性

  • 获得面板系统信息和网络状况
  • 查询 PHP 网站列表
  • 创建新的PHP网站
  • 查询 MySQL 数据库列表
  • Docker集装箱管理
  • 查看容器列表
  • 查看容器细节
  • Docker图像管理
  • 查看本地图像列表
  • 电子邮件管理
  • 添加电子邮件账户
  • 查看电子邮件列表
  • 获取面板公共配置信息
  • 开发中的更多特征…

□ 要求

  • 1.18+ 开始
  • API小组访问
  • API主题

□ 安装 QQ 来自源代码

直接下载 也可以从"发行"页面下载预编译的二进制.

□ 配置 环境变量 通过环境变量配置程序 :

QQ 光标配置 在光标中使用时,通过下列步骤配置:

  1. 打开光标设置 > 扩展名 > MCP 工具
  2. 添加新的MCP工具
  3. 以下列格式填写配置:

增加新功能

  1. 在相应的模块目录中创建或修改文件
  2. 定义新的工具常数和工具对象
  3. 履行操作员职能
  4. 登记册中的注册工具主要功能.go □ 构建和部署 使用 Make 文件构建 :

□ 许可证

本页由 AI 翻译,技术细节请以原文为准。

README

aaPanel MCP Interface

Features

  • Get panel system information and network status
  • Query PHP website list
  • Create new PHP website
  • Query MySQL database list
  • Docker container management
    • View container list
    • View container details
  • Docker image management
    • View local image list
  • Email management
    • Add email account
    • View email list
  • Get panel public configuration information
  • More features under development…

Requirements

  • Go 1.18+
  • aaPanel API access
  • aaPanel API token

Installation

From source code

# Clone repository
git clone https://github.com/aaPanel/mcp-server.git
cd mcp_btpanel

# Install dependencies
go mod tidy

# Build project
make build

# Build for Windows
.\build.bat build

Direct download

You can also download pre-compiled binaries from the Releases page .

Configuration

Environment variables

Configure the program through environment variables:

# Set aaPanel address
export BT_BASE_URL="http://your-panel-address:8888"

# Set aaPanel API token
export BT_API_TOKEN="your-api-token"

Cursor configuration

When using in Cursor, configure through the following steps:

  1. Open Cursor Settings > Extensions > MCP Tools
  2. Add new MCP tool
  3. Fill in the configuration in the following format:
{
    "mcpServers": {
        "mcp-aapanel": {
            "command": "C:\\path\\to\\mcp-server.exe",
            "env": {
                "BT_BASE_URL": "http://192.168.xx.xx:8888/",
                "BT_API_TOKEN": "xxxxxxxxxxxxxxxxxxxxxxxx"
            }
        }
    }
}

Adding new features

  1. Create or modify files in the corresponding module directory
  2. Define new tool constants and tool objects
  3. Implement handler functions
  4. Register tools in the registerTools function in main.go

Build & Deployment

Build using Makefile:

# Build project
make build

# Build Windows version
make build-windows

# Clean build artifacts
make clean

# View more commands
make help

License

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

Contributing

Welcome to submit issues and feature requests! If you want to contribute, please:

  1. Fork this repository
  2. Create your feature branch ( git checkout -b feature/amazing-feature )
  3. Commit your changes ( git commit -m ‘Add some amazing feature’ )
  4. Push to the branch ( git push origin feature/amazing-feature )
  5. Open a Pull Request
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "mcp-aapanel": { "command": "C:\\path\\to\\mcp-server.exe", "env": { "BT_BASE_URL": "http://192.168.xx.xx:8888/", "BT_API_TOKEN": "xxxxxxxxxxxxxxxxxxxxxxxx" } } } }