mcp-1panel-plus
Provides tools for managing 1Panel v2 clusters, including multi-node discovery, website and reverse-proxy/HTTPS configuration, SSL certificate management, App Store app lifecycle and upgrades, Docker container operations, database inspection/creation, and main/child node upgrades and rollback.
Click on "Deploy 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., "@mcp-1panel-plus list my 1Panel nodes and their status"
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.
mcp-1panel-plus
Unified Multi-Node Model Context Protocol (MCP) Server for 1Panel v2 — control both your 1Panel Main Node ("local") and all connected X-Pack Child Nodes (nodeId) from a single MCP connection.
While upstream 1Panel-dev/mcp-1panel stops at 20 read/basic-create tools, mcp-1panel-plus covers the complete day-2 self-hosting lifecycle across every node in a 1Panel v2 cluster (39 tools):
End-to-End Reverse-Proxy Websites & HTTPS: Create proxy/static websites, list/create/edit/delete upstream reverse-proxy rules (
Host, TLS SNI, headers, caching, sub-filters), bind existing or ACME SSL certificates to enable HTTPS / HSTS / HTTP/3, and start/stop/delete sites on any node.App Store Updates & Lifecycle: Sync remote App Store catalogs across main & child nodes, inspect available app upgrade versions, upgrade installed apps (with automatic pre-upgrade backup), and
start/stop/restart/rebuildapps.Multi-Node 1Panel Self-Upgrade & Rollback: Check available 1Panel releases against Main & Child versions, upgrade the Main Node (
1panel-core+1panel-agentwith automatic restart-reconnect polling), upgrade X-Pack Child Nodes (enforcing Main-before-Child ordering), inspect upgrade logs, and trigger child-node rollback.Docker Container Operations: List all containers (including custom Compose & standalone containers outside the App Store),
start/stop/restartcontainers, and fetch bounded, ANSI-cleaned, secret-scrubbed container logs.Built-in Auto-Reconnecting SSH Loopback Tunnel (
PANEL_SSH_HOST): Connect locally to127.0.0.1:20005over SSH without exposing 1Panel's API port publicly, fighting CDN/WAF timeouts, or losing the MCP process when1panel-corerestarts during an upgrade.
Architecture
flowchart LR
Client["AI Client\n(Claude Code / Cursor / Codex / T3 Code)"]
MCP["mcp-1panel-plus\n(Local Process • stdio or HTTP)"]
Tunnel["Auto-Reconnecting SSH Tunnel\n127.0.0.1:ephemeral -> 127.0.0.1:20005\n(or Direct HTTPS)"]
Main["1Panel Main Node\nCurrentNode: local\n(1panel-core + 1panel-agent)"]
Child1["1Panel Child Node #1\nCurrentNode: <resolved-name>\n(1panel-agent mTLS)"]
ChildN["1Panel Child Node #N\nCurrentNode: <resolved-name>\n(1panel-agent mTLS)"]
Client <-->|"MCP (stdio)"| MCP
MCP -->|"1Panel-Token (MD5)\n+ CurrentNode Header"| Tunnel
Tunnel --> Main
Main <-->|"X-Pack mTLS"| Child1
Main <-->|"X-Pack mTLS"| ChildNSecurity & Reliability Design
Safe Multi-Node Routing (
CurrentNode): Every node-scoped tool acceptsnodeId("local"default, or a numeric string ID like"3"fromlist_nodes). Child node names are resolved dynamically from/api/v2/core/nodes/list— caller strings are never interpolated intoCurrentNode, and missing/offline child nodes never silently fall back to"local".Nginx Directive Injection Guard: Upstream URLs (
proxy_address/proxy_pass), location paths, and headers are validated against whitespace, control/format characters, and Nginx directive syntax (;{}'"\$#).Defense-in-Depth Secret Redaction: Private keys, PEM certificate bodies, database passwords, SSH credentials, X-Pack licenses,
docker-compose.ymlcontents, and app.envmaps are stripped from every tool output.Zero Auto-Retry on Mutations: Write operations are never retried on network drop or HTTP 5xx; uncertain outcomes are surfaced explicitly so the agent inspects state before acting again.
Related MCP server: mcp-1panel
Quick Start
Prerequisites
Node.js
>= 20(v22orv24recommended) andpnpm/npm.1Panel v2 API Key: Enable Panel Settings -> Security -> API Interface on your 1Panel Main Node and copy the 32-character API Key.
Tip: When using
PANEL_SSH_HOST, you can lock 1Panel's IP Whitelist (AllowIPs) to127.0.0.1so the API Key cannot be used from the public internet.Domain Binding Note: If your 1Panel has Domain Binding (
BindDomain) enabled, also setPANEL_BIND_DOMAIN=panel.example.comso loopback requests send the expected HTTPHostheader.
Build from Source
git clone https://github.com/EC061/mcp-1panel-plus.git
cd mcp-1panel-plus
pnpm install
pnpm testMCP Client Configuration
1. Recommended: SSH Loopback Mode (stdio)
Works identically in Claude Code (~/.claude.json), Cursor (~/.cursor/mcp.json), Claude Desktop, and T3 Code:
{
"mcpServers": {
"1panel-plus": {
"command": "npx",
"args": ["-y", "github:EC061/mcp-1panel-plus"],
"env": {
"PANEL_SSH_HOST": "my-1panel-main",
"PANEL_REMOTE_PORT": "20005",
"PANEL_ACCESS_TOKEN": "your_32_char_1panel_api_key",
"PANEL_BIND_DOMAIN": "panel.example.com",
"PANEL_ACCESS_LEVEL": "readwrite"
}
}
}
}Or pointing directly to a local clone (dist/index.js) for instant zero-network startup:
{
"mcpServers": {
"1panel-plus": {
"command": "node",
"args": ["/absolute/path/to/mcp-1panel-plus/dist/index.js"],
"env": {
"PANEL_SSH_HOST": "my-1panel-main",
"PANEL_REMOTE_PORT": "20005",
"PANEL_ACCESS_TOKEN": "your_32_char_1panel_api_key",
"PANEL_BIND_DOMAIN": "panel.example.com",
"PANEL_ACCESS_LEVEL": "readwrite"
}
}
}
}2. Codex (~/.codex/config.toml)
[mcp_servers.1panel_plus]
command = "node"
args = ["/absolute/path/to/mcp-1panel-plus/dist/index.js"]
[mcp_servers.1panel_plus.env]
PANEL_SSH_HOST = "my-1panel-main"
PANEL_REMOTE_PORT = "20005"
PANEL_ACCESS_TOKEN = "your_32_char_1panel_api_key"
PANEL_BIND_DOMAIN = "panel.example.com"
PANEL_ACCESS_LEVEL = "readwrite"3. Direct HTTPS Mode (Without SSH)
{
"mcpServers": {
"1panel-plus": {
"command": "node",
"args": ["/absolute/path/to/mcp-1panel-plus/dist/index.js"],
"env": {
"PANEL_HOST": "https://panel.example.com",
"PANEL_ACCESS_TOKEN": "your_32_char_1panel_api_key",
"PANEL_ACCESS_LEVEL": "readwrite"
}
}
}
}4. Docker & Streamable HTTP Mode
docker build -t mcp-1panel-plus .
# Run as Streamable HTTP on 127.0.0.1:8000/mcp with Bearer authentication
docker run --rm -p 127.0.0.1:8000:8000 \
-e PANEL_HOST="https://panel.example.com" \
-e PANEL_ACCESS_TOKEN="your_32_char_1panel_api_key" \
-e PANEL_ACCESS_LEVEL="readonly" \
-e MCP_TRANSPORT="http" \
-e MCP_HTTP_ADDR="0.0.0.0:8000" \
-e MCP_ALLOW_REMOTE="true" \
-e MCP_AUTH_TOKEN="replace_with_random_bearer_token" \
mcp-1panel-plusAccess Levels (PANEL_ACCESS_LEVEL / --access-level)
Tools are filtered from tools/list and enforced again on tools/call:
Level | Tools Exposed | Permitted Operations |
| 23 | Node discovery, OS/dashboard telemetry, website/proxy/HTTPS/SSL metadata, installed app & upgrade checks, panel release checks, container list & logs, MySQL/PostgreSQL inspection |
| 33 | Everything in |
| 39 | Everything in |
Complete Tool Catalog (39 Tools)
System & Multi-Node Discovery (3)
Tool | Access | Scope | Description |
|
| Main | List |
|
|
| OS, platform, kernel version/architecture, total disk bytes |
|
|
| Resource counts + live CPU, load, RAM, swap, network, and disk usage |
Websites, Reverse Proxy & HTTPS (11)
Tool | Access | Scope | Description |
|
|
| Search/list websites on the selected node |
|
|
| Read safe website metadata by |
|
|
| List domains & ports bound to |
|
|
| Inspect HTTPS, TLS versions, HSTS, HTTP/3, and bound cert metadata |
|
|
| Create a |
|
|
| Bind an existing SSL certificate ( |
|
|
| List reverse-proxy location rules on |
|
|
| Create or edit a reverse-proxy rule ( |
|
|
| Delete a named reverse-proxy rule on |
|
|
|
|
|
|
| Delete a website ( |
SSL Certificates (3)
Tool | Access | Scope | Description |
|
|
| List SSL certificate metadata (private keys & PEM stripped) |
|
|
| Get certificate details by |
|
|
| Submit ACME DNS-01 or HTTP-01 certificate issuance |
App Store Updates & Lifecycle (8)
Tool | Access | Scope | Description |
|
|
| List installed apps ( |
|
|
| Inspect a single installed app by |
|
|
| List catalog versions for an |
|
|
| Sync remote App Store catalog across Main & Child nodes |
|
|
| List available target |
|
|
|
|
|
|
| Install MySQL from the App Store |
|
|
| Install OpenResty from the App Store |
1Panel Self-Upgrade & Rollback (5)
Tool | Access | Scope | Description |
|
| Cluster | Compare Main & Child 1Panel versions against upstream releases |
|
| Main | Upgrade Main Node ( |
|
| Child | Upgrade X-Pack Child Node |
|
| Child | List upgrade history & backup availability for a Child Node |
|
| Child | Roll back a Child Node using a verified |
Docker Containers (3)
Tool | Access | Scope | Description |
|
|
| List App Store + custom Docker containers ( |
|
|
|
|
|
|
| Fetch bounded tail logs ( |
Databases — MySQL & PostgreSQL (6)
Tool | Access | Scope | Description |
|
|
| List local MySQL/MariaDB instances |
|
|
| List schemas inside a local MySQL instance |
|
|
| Read MySQL uptime, connection, thread, and traffic counters |
|
|
| Create a UTF8MB4 database in a local MySQL instance |
|
|
| List local PostgreSQL instances |
|
|
| List databases inside a local PostgreSQL instance |
Safe Multi-Node Panel Upgrade Workflow
When upgrading 1Panel across a Main + Child cluster (PANEL_ACCESS_LEVEL=full):
Run
check_panel_upgradesto inspect current versions on"local"and all Child Nodes against upstream releases.Run
upgrade_main_panel(target_version: "v2.x.y") first. When connected viaPANEL_SSH_HOST, the local MCP server survives1panel-corerestarting and polls until the Main Node reports healthy onv2.x.y.Run
upgrade_child_node(nodeId: "3") for each Child Node so X-Pack pushes the matchingv2.x.y1panel-agentbinary.Use
get_child_node_upgrade_logs(androllback_child_nodeif ever needed) to verify completion.
Environment Variables Reference
Variable | CLI Flag | Default | Description |
|
| — | SSH config alias or |
|
|
| Remote 1Panel port forwarded over SSH |
|
| — | Optional custom SSH port |
|
| — | Optional SSH identity key file |
|
| — | Direct |
|
| (required) | 1Panel API Key (alias: |
|
| — | Optional |
|
| — | Optional HTTP |
|
|
| Skip TLS certificate verification on self-signed |
|
|
|
|
|
|
|
|
|
|
| Listen address for Streamable HTTP transport ( |
|
| — | Required Bearer token for Streamable HTTP transport |
License
Licensed under the Apache License, Version 2.0. Clean-room TypeScript implementation inspired by and compatible with 1Panel v2 and 1Panel-dev/mcp-1panel.
Available Tools
33 toolscheck_panel_upgradesCheck 1Panel Main & Child UpgradesARead-only
Inspect current 1Panel versions on the Main Node and all X-Pack Child Nodes, check available upstream 1Panel releases, and report which nodes have pending upgrades.
Inputs: max_releases, include_release_notes.
create_databaseCreate MySQL DatabaseA
Create a UTF8MB4 database in a local MySQL instance on the selected node. Access defaults to localhost; passwords are never echoed back.
Inputs: name (required), database (required), nodeId, password, +2 more.
create_sslIssue ACME SSL CertificateA
Submit asynchronous ACME certificate issuance for a domain (or bare IP with HTTP validation) using configured ACME and DNS accounts on the selected node. Credentials and private keys are never returned.
Inputs: domain (required), provider (required), nodeId, dnsAccount, +2 more.
create_websiteCreate Static or Reverse-Proxy WebsiteA
Create a static or reverse-proxy website in the default website group on the selected node. Optionally bind an existing SSL certificate ID (ssl_id) immediately after creation.
Inputs: domain (required), website_type (required), IPV6, port, +5 more.
delete_website_proxyDelete Website Reverse-Proxy RuleBDestructive
Delete a named reverse-proxy rule from a website on the selected node.
Inputs: name (required), website_id (required), nodeId.
enable_website_httpsEnable or Disable Website HTTPSA
Bind an existing 1Panel SSL certificate (ssl_id) to enable HTTPS/HSTS/HTTP3 on a website, or disable HTTPS (enable: false).
Inputs: website_id (required), hsts, http3, enable, +6 more.
get_app_update_versionsGet Available App Upgrade VersionsARead-only
List target upgrade versions (detailId and version) available for a specific installed app ID on the selected node.
Inputs: app_install_id (required), nodeId.
get_child_node_upgrade_logsGet Child Node Upgrade LogsARead-only
List historical upgrade records (id, oldVersion, newVersion, isOk, createdAt) for a specific X-Pack Child Node.
Inputs: nodeId (required), page, page_size.
get_container_logsGet Bounded Docker Container LogsARead-only
Fetch recent tail logs from a Docker container on the selected node (bounded to at most 500 lines / 64 KiB, ANSI-stripped, with inline secret redaction).
Inputs: container (required), tail, since, nodeId, +1 more.
get_dashboard_infoGet Node Dashboard TelemetryARead-only
Read dashboard resource counts (websites, apps, databases, cronjobs) and real-time CPU, load, memory, swap, network, and disk utilization on the selected node.
Inputs: nodeId.
get_installed_appGet Installed App InfoARead-only
Read status, version, and ports for a specific installed application ID on the selected node. Environment variables and compose files are excluded.
Inputs: app_install_id (required), nodeId.
get_mysql_statusGet MySQL Runtime StatusARead-only
Read connection, thread, traffic, and uptime counters from a local MySQL instance on the selected node.
Inputs: database (required), nodeId.
get_ssl_metadataGet SSL Certificate MetadataBRead-only
Read safe metadata for a single SSL certificate ID on the selected node. Private keys, PEM contents, and DNS provider secrets are excluded.
Inputs: ssl_id (required), nodeId.
get_system_infoGet Node OS & System InfoARead-only
Read operating system, platform, kernel architecture/version, and total disk size (in bytes) on the selected node.
Inputs: nodeId.
get_websiteGet Website MetadataARead-only
Get website metadata by explicit website ID on the selected node. Filesystem paths and raw Nginx configuration are excluded.
Inputs: website_id (required), nodeId.
get_website_httpsGet Website HTTPS SettingsARead-only
Read HTTPS status, TLS protocols, HSTS, HTTP/3, and certificate metadata for a website ID. Private keys and PEM certificate contents are stripped.
Inputs: website_id (required), nodeId.
list_app_versionsList Catalog App VersionsARead-only
List available catalog versions for an exact App Store application key (e.g. openresty, mysql, halo) on the selected node.
Inputs: app_key (required), page, nodeId, page_size.
list_containersList Docker ContainersBRead-only
List Docker containers (including both App Store and custom Compose/standalone containers) on the selected node.
Inputs: name, page, state, nodeId, +3 more.
list_databasesList MySQL DatabasesARead-only
List databases inside an explicitly named local MySQL instance on the selected node. Passwords are never returned.
Inputs: database (required), page, nodeId, page_size.
list_installed_appsList Installed AppsARead-only
List installed App Store applications on the selected node, including canUpdate flags and ports. Environment secrets and docker-compose contents are strictly stripped.
Inputs: name, page, nodeId, page_size, +2 more.
list_mysql_instancesList Local MySQL InstancesARead-only
List local MySQL/MariaDB server instances on the selected node. Remote database connections and credentials are excluded.
Inputs: page, nodeId, page_size.
list_nodesList 1Panel NodesARead-only
List the Main Node ("local") and all connected X-Pack Child Nodes (numeric string IDs) managed by this 1Panel cluster. Use the returned id as nodeId in other tools.
Inputs: no named parameters.
list_postgresql_databasesList PostgreSQL DatabasesARead-only
List databases in an explicitly named local PostgreSQL instance on the selected node. Credentials are excluded.
Inputs: database (required), info, page, nodeId, +1 more.
list_postgresql_instancesList Local PostgreSQL InstancesARead-only
List local PostgreSQL instances managed by 1Panel on the selected node. Remote instances and credentials are excluded.
Inputs: page, nodeId, page_size.
list_sslsList SSL CertificatesARead-only
List SSL certificates on the selected node. Private keys and PEM certificate contents are strictly excluded.
Inputs: page, nodeId, page_size.
list_website_domainsList Website DomainsARead-only
List recorded domains and ports bound to an explicit website ID on the selected node.
Inputs: website_id (required), page, nodeId, page_size.
list_website_proxiesList Website Reverse-Proxy RulesARead-only
List configured reverse-proxy rules on a website ID on the selected node. Raw Nginx file paths and config snippets are excluded.
Inputs: website_id (required), nodeId.
list_websitesList WebsitesARead-only
List websites on the selected node with optional name filter. Internal filesystem paths are excluded.
Inputs: name, page, nodeId, page_size.
operate_containerStart, Stop, or Restart ContainerB
Execute a safe container lifecycle operation (start, stop, or restart) on a Docker container on the selected node.
Inputs: container (required), operation (required), nodeId.
operate_installed_appUpgrade or Operate Installed AppA
Perform lifecycle operations (upgrade, restart, start, stop, rebuild) on an installed App Store application on the selected node. When operate is "upgrade" and detail_id is omitted, automatically selects the newest available version from get_app_update_versions.
Inputs: operate (required), install_id (required), backup, nodeId, +2 more.
operate_websiteStart or Stop WebsiteB
Start or stop an existing website (operate: "start" | "stop") on the selected node.
Inputs: operate (required), website_id (required), nodeId.
sync_app_storeSync App Store CatalogB
Trigger remote App Store catalog synchronization on the selected node (and optionally refresh X-Pack child-node app update status) so newly published app versions become visible.
Inputs: nodeId, sync_child_nodes.
upsert_website_proxyCreate or Update Website Reverse-Proxy RuleB
Create (operate: "create") or edit (operate: "edit") a reverse-proxy location rule on a website. Sanitizes upstream URL, match path, and headers against Nginx directive injection.
Inputs: name (required), operate (required), proxy_pass (required), website_id (required), +12 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 33 tools
Each tool has a distinct resource-and-action purpose, and even potentially close pairs (system info vs dashboard info, installed apps vs containers, MySQL instances vs databases) are clearly separated by explicit descriptions. No true duplicate or overlapping operations are apparent.
Names consistently use snake_case with predictable verb_noun phrasing such as list_websites, get_website, create_ssl, and operate_container. Longer names like get_child_node_upgrade_logs are still readable and follow the same convention.
The server exposes 33 tools, which is heavy for an agent-facing surface and exceeds the well-scoped range. Although the domain is broad, several website, app, and database operations could be consolidated or scoped more tightly to reduce selection cost.
The surface covers many reads and some lifecycle operations across websites, SSL, apps, containers, databases, nodes, and upgrades. However, it lacks notable operations such as website/database/SSL deletion, app install/uninstall, and cronjob management, leaving gaps for full 1Panel administration.
Maintenance
Related MCP Connectors
Secure and manage MCP servers through the Speakeasy AI Control Plane from your agent.
MCP gateway and cloud hosting for MCP servers, agents and apps like RAG, managed from your agent.
Private networking for AI agents: networks, nodes, commands, files, services via hosted MCP.
One PAT, any MCP agent: Vercel, GitHub, Cloudflare, Supabase, GCP — unified dev infra gateway.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI assistants to perform comprehensive SSH operations including command execution, file transfers, port forwarding, and key management through a stateless, Docker-ready MCP server.15MIT
- AlicenseNot gradedqualityDmaintenanceFull-featured MCP server for 1Panel server management panel. Provides 490+ tools for managing websites, databases, containers, files, and more through natural language.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to securely manage Linux, Docker, Kubernetes, and SSH infrastructure through MCP with permission control, audit logging, and dangerous command filtering.MIT
- AlicenseDqualityCmaintenanceEnables AI clients such as Claude Desktop, Cursor, and Claude Code to administer a 1Panel v1.x server through 257 MCP tools covering containers and images, apps and runtimes, files, backups, databases, websites, firewall, and monitoring. Supports both stdio and token-authenticated HTTP/SSE transports for local or remote access.257MIT