Get the FREE Ultimate OpenClaw Setup Guide →

mcp

An MCP Server for aaPanel.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio aapanel-mcp-server path/to/mcp-server \
  --env BT_BASE_URL="http://your-panel-address:8888" \
  --env BT_API_TOKEN="your-api-token"

How to use

This MCP server provides an interface to aaPanel via the MCP protocol. It exposes capabilities to retrieve panel system information and network status, query and manage PHP websites, view and manage MySQL databases, and handle Docker containers and images. It also supports email account management and retrieving public configuration details from the panel. To use it, start the mcp-server binary and configure it in your MCP client (for example Cursor) with the appropriate environment variables that authorize access to aaPanel. Once running, you can invoke the available tools through the MCP client, which will call into the server to perform the corresponding aaPanel API actions. The server’s capabilities are organized into modules such as PHP website management, Docker management, MySQL, and email management, enabling you to automate common panel tasks from a single interface.

How to install

Prerequisites:

  • Go 1.18+ for building from source
  • Access to aaPanel API and a valid API token

From source code

  1. Clone the repository: git clone https://github.com/aaPanel/mcp-server.git cd mcp-server

  2. Install dependencies: go mod tidy

  3. Build the project: make build

  4. Optionally build a Windows version: .\build.bat build

Direct download

  • You can also download pre-compiled binaries from the Releases page on GitHub and run the executable directly.

Environment configuration (required for aaPanel access)

  • Set the aaPanel address and API token before running the server: export BT_BASE_URL="http://your-panel-address:8888" export BT_API_TOKEN="your-api-token"

Running the server

  • Start the binary (examples vary by platform): ./mcp-server or path/to/mcp-server

Configure in Cursor (MCP client)

  • In Cursor, Settings > Extensions > MCP Tools > Add new MCP tool, and provide the following JSON configuration (example): { "mcpServers": { "mcp-aapanel": { "command": "C:\path\to\mcp-server.exe", "env": { "BT_BASE_URL": "http://192.168.xx.xx:8888/", "BT_API_TOKEN": "xxxxxxxxxxxxxxxxxxxx" } } } }

If you’re building from source, ensure the environment variables are set in the shell that launches the server so the aaPanel API calls can be authenticated.

Additional notes

Tips and notes:

  • Ensure your aaPanel API address is reachable from where the MCP server runs, and that the API token has sufficient permissions.
  • The server reads BT_BASE_URL and BT_API_TOKEN from the environment; do not hardcode credentials.
  • When using Cursor, provide the full path to the mcp-server binary and the necessary environment variables in the tool configuration.
  • If you encounter build issues, run go mod tidy to ensure dependencies are resolved.
  • The repository supports adding new features by implementing module handlers and registering tools in main.go; follow the existing module structure for consistency.
  • For Windows, use the provided build.bat script or build-windows target in Makefile if available.

Related MCP Servers

Sponsor this space

Reach thousands of developers