mcp
An MCP Server for aaPanel.
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
-
Clone the repository: git clone https://github.com/aaPanel/mcp-server.git cd mcp-server
-
Install dependencies: go mod tidy
-
Build the project: make build
-
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
trpc-agent-go
trpc-agent-go is a powerful Go framework for building intelligent agent systems using large language models (LLMs) and tools.
station
Station is our open-source runtime that lets teams deploy agents on their own infrastructure with full control.
tiger-cli
Tiger CLI is the command-line interface for Tiger Cloud. It includes an MCP server for helping coding agents write production-level Postgres code.
gopls
MCP server for golang projects development: Expand AI Code Agent ability boundary to have a semantic understanding and determinisic information for golang projects.
kubernetes
A Model Context Protocol (MCP) server for the Kubernetes API.
gcp-cost
💰 An MCP server that enables AI assistants to estimate Google Cloud costs, powered by Cloud Billing Catalog API and built with Genkit for Go