Enables comprehensive management of 1Panel instances, including system monitoring, website management, SSL certificate tracking, and application lifecycle control.
Provides tools to list, start, stop, and restart containers, pull images, and manage Docker Compose projects through the 1Panel interface.
Allows for the management and listing of MySQL databases hosted on the 1Panel server.
Allows for the management and listing of PostgreSQL databases hosted on the 1Panel server.
Allows for the management and listing of Redis databases hosted on the 1Panel server.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@1Panel MCP Servershow me the current CPU usage and list all running containers"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
1Panel MCP Server
A Model Context Protocol (MCP) server for managing 1Panel through AI agents.
Features
This MCP server provides tools for:
Container Management: List, start, stop, restart Docker containers
Image Management: List and pull Docker images
Application Management: List installed apps and browse app store
File Management: List files in directories
System Monitoring: Get system info and monitoring data (CPU, memory, disk)
Website Management: List websites and SSL certificates
Database Management: List MySQL, PostgreSQL, and Redis databases
Compose Management: List Docker Compose projects
Installation
npm install
npm run buildConfiguration
Set the following environment variables:
export ONEPANEL_HOST="your-1panel-host" # default: localhost
export ONEPANEL_PORT="8080" # default: 8080
export ONEPANEL_API_KEY="your-api-key" # required
export ONEPANEL_PROTOCOL="http" # default: httpGetting your 1Panel API Key
Log in to your 1Panel dashboard
Go to 面板设置 (Panel Settings)
Enable API access and generate an API key
Add your IP to the whitelist (use
0.0.0.0/0for all IPs)
Usage with Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"1panel": {
"command": "node",
"args": ["/path/to/1panel-mcp/dist/index.js"],
"env": {
"ONEPANEL_HOST": "your-1panel-host",
"ONEPANEL_PORT": "8080",
"ONEPANEL_API_KEY": "your-api-key"
}
}
}
}Usage with OpenClaw
Add to your OpenClaw configuration:
{
"mcpServers": {
"1panel": {
"command": "node",
"args": ["/path/to/1panel-mcp/dist/index.js"],
"env": {
"ONEPANEL_HOST": "your-1panel-host",
"ONEPANEL_PORT": "8080",
"ONEPANEL_API_KEY": "your-api-key"
}
}
}
}Available Tools
Tool | Description |
| List all Docker containers |
| Start a container by ID |
| Stop a container by ID |
| Restart a container by ID |
| List all Docker images |
| Pull a Docker image |
| List installed applications |
| List available apps in store |
| List files in a directory |
| Get system information |
| Get CPU/memory/disk usage |
| List all websites |
| List databases (mysql/postgresql/redis) |
| List Docker Compose projects |
| List SSL certificates |
API Reference
This MCP server uses the 1Panel API v2. For complete API documentation, visit:
http://your-1panel-host:port/1panel/swagger/index.html
Authentication
1Panel uses a custom token authentication:
Token = md5('1panel' + API-Key + UnixTimestamp)The server automatically generates tokens for each request.
Development
# Install dependencies
npm install
# Build
npm run build
# Development mode with watch
npm run devLicense
MIT
Resources
Looking for Admin?
Admins can modify the Dockerfile, update the server description, and track usage metrics. If you are the server author, to access the admin panel.