home / mcp / aa panel mcp server

AA Panel MCP Server

Provides MCP access to aaPanel data sources and actions including panel info, PHP websites, MySQL, Docker, and email management.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "aapanel-mcp-server": {
      "url": "https://example-mcp.example.com/mcp",
      "headers": {
        "BT_BASE_URL": "http://127.0.0.1:8888",
        "BT_API_TOKEN": "xxxxxxxxxxxxxxxxxxxxxxxx"
      }
    }
  }
}

You can run and integrate the aaPanel MCP Interface as a local MCP server that talks to an aaPanel instance. It lets you access panel information, manage PHP websites and MySQL databases, handle Docker containers and images, manage email accounts, and retrieve panel configuration data from a unified MCP experience.

How to use

Connect with an MCP client to run the aaPanel MCP Interface as a local server. You will typically start a local MCP process and configure it with the required endpoints and credentials. The interface provides options to query panel information, manage PHP websites and MySQL databases, oversee Docker containers and images, handle email accounts, and fetch public panel configuration.

How to install

Prerequisites you need before installing the MCP interface: 1) Go 1.18 or later 2) aaPanel API access 3) aaPanel API token.

Step by step setup from source or direct download:

# 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

Configuration

Configure the MCP interface using environment variables to point at your aaPanel instance and authorize requests.

# 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

If you use Cursor to run the MCP, add a new MCP tool with the following configuration.

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

Build & deployment

Use the Makefile to build and manage deployments. You can build the project, create Windows builds, clean artifacts, and view available make commands.

# Build project
make build

# Build Windows version
make build-windows

# Clean build artifacts
make clean

# View more commands
make help

Available tools

panel_info

Query and retrieve general panel system information and network status.

php_site_query

Query the list of PHP websites configured on the panel.

php_site_create

Create a new PHP website on the panel.

mysql_query

Query the MySQL database list configured in aaPanel.

docker_container

View and manage Docker containers from the panel.

docker_image

View local Docker images managed by the panel.

email_manage

Add or view email accounts configured in the panel.

panel_config

Get public configuration information of the aaPanel interface.