Skip to content
Back to search

mcp-1panel

mcp-1panel is an implementation of the Model Context Protocol (MCP) server for 1Panel.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/1Panel-dev/mcp-1panel with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/1Panel-dev/mcp-1panel'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/1panel-dev--mcp-1panel/badge.svg)](/listings/1panel-dev--mcp-1panel)

HTML

<a href="/listings/1panel-dev--mcp-1panel"><img src="/api/listings/1panel-dev--mcp-1panel/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Prerequisites

- Go 1.25.0 or higher - Existing 1Panel

Build from Source

1. Clone the repository:

   git clone https://github.com/1Panel-dev/mcp-1panel.git
   cd mcp-1panel

2. Build the project:

   make build

Move `./build/mcp-1panel` to the system environment path.

Install using go install

   go install github.com/1Panel-dev/mcp-1panel@latest

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 229 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. # 1Panel MCP Server
  2. [English](README.md) | [简体中文](docs/README.zh-Hans.md)
  3. An MCP server for 1Panel v2, with 20 shared tools for nodes, system status,
  4. websites, certificates, applications and MySQL. Independent mode uses the
  5. official Go MCP SDK; managed mode integrates with 1Panel's authorization and audit.
  6. ## Choose a mode
  7. | Mode | Connection and authorization | Deployment |
  8. | --- | --- | --- |
  9. | Independent: `--mode=legacy` (default) | Configured API Key calls existing public `/api/v2` APIs; panel permissions apply to every request | stdio or Streamable HTTP, as a binary or Docker container |
  10. | Managed: `--mode=panel` | Dedicated MCP credential; Core checks the owner's current permissions, node/tool grants and policy | Docker on the primary node, installed from **AI → MCP Management → 1Panel MCP** |
  11. Independent mode requires an enabled public API and compatible APIs/DTOs for the
  12. selected tools on your installed 1Panel v2 release. It needs no managed MCP
  13. installation. Managed mode requires matching Core, primary/child Agents and frontend.
  14. See [managed deployment](docs/panel-integration.md#docker-deployment).
  15. | Credential | Purpose |
  16. | --- | --- |
  17. | `PANEL_ACCESS_TOKEN` / `--token` | 1Panel API Key used by independent mode for outgoing panel requests |
  18. | `MCP_AUTH_TOKEN` / `--mcp-token` | Separate pre-shared Bearer used by clients connecting to independent Streamable HTTP |
  19. | Token created in the panel's MCP page | Dedicated managed credential with explicit node/tool grants; clients use the panel's HTTPS `/mcp` endpoint |
  20. The independent HTTP token permits use of the configured API Key; it does not
  21. create another panel identity. The two modes' MCP credentials are not interchangeable.
  22. ## Install
  23. ### Source
  24. Use Go **1.27.3**. The v2 source branch is `dev-v2`:
  25. ```sh
  26. git clone --branch dev-v2 https://github.com/1Panel-dev/mcp-1panel.git
  27. cd mcp-1panel
  28. go mod download
  29. make build
  30. ./build/mcp-1panel --version
  31. ```
  32. `make build` creates a host-platform binary at `build/mcp-1panel`.
  33. To cross-build Linux, use `make build_linux GOARCH=amd64` or `GOARCH=arm64`;
  34. `make build_linux_all` builds all seven architectures: 386, amd64, arm64, armv7, s390x, ppc64le and riscv64.
  35. Linux builds require a locally available toolchain and cached dependencies;
  36. outputs are `build/mcp-1panel-linux-{arch}`.
  37. ### Release binary
  38. Choose an explicitly published v2 release from [Releases](https://github.com/1Panel-dev/mcp-1panel/releases)
  39. compatible with your installed panel's public APIs. Download the matching architecture
  40. and `SHA256SUMS`, verify the checksum, then run, for example on Linux amd64:
  41. ```sh
  42. chmod +x ./mcp-1panel-linux-amd64
  43. ./mcp-1panel-linux-amd64 --version
  44. ```
  45. Use that binary's absolute path in the client configuration below.
  46. For maintainers, publishing a GitHub Release triggers tests, builds all seven Linux binaries,
  47. uploads them with `SHA256SUMS` to that release, and pushes the multi-platform Docker image.
  48. Ordinary commits, tag pushes and saved drafts do not trigger this workflow. The release tag
  49. provides the version; prereleases and tags containing `-` do not update Docker `latest`.
  50. ### Docker
  51. The image defaults to independent stdio mode. To build and export a fixed version
  52. locally (these commands do not publish an image):
  53. ```sh
  54. make docker_build VERSION=v2.0.0-rc1 DOCKER_PLATFORM=linux/amd64
  55. make docker_save VERSION=v2.0.0-rc1 DOCKER_PLATFORM=linux/amd64
  56. # Transfer to a matching Linux host, then import:
  57. docker load -i build/mcp-1panel-linux-amd64-v2.0.0-rc1.tar
  58. ```
  59. Choose your own fixed version; the example tag is not a publication claim.
  60. The official repository is `1panel/mcp-server`. Docker builds support
  61. `linux/386`, `linux/amd64`, `linux/arm64`, `linux/arm/v7`, `linux/s390x`, `linux/ppc64le` and
  62. `linux/riscv64`. For managed installation, use the panel's installation dialog and
  63. [container contract](docs/panel-integration.md#container-and-socket-contract).
  64. ## Connect a client
  65. ### stdio
  66. Let the MCP client start the binary; use its absolute path and replace placeholders:
  67. ```json
  68. {
  69. "mcpServers": {
  70. "mcp-1panel": {
  71. "command": "/absolute/path/to/mcp-1panel",
  72. "args": ["--mode=legacy", "--transport=stdio", "--access-level=readonly"],
  73. "env": {
  74. "PANEL_HOST": "https://panel.example",
  75. "PANEL_ACCESS_TOKEN": "<1Panel API Key>",
  76. "MCP_LANGUAGE": "en"
  77. }
  78. }
  79. }
  80. }
  81. ```
  82. stdio does not listen on a port. When client-managed, no separate server process
  83. is needed. To use Docker instead, the client must launch this command with the
  84. same environment variables; the panel URL must be reachable from the container:
  85. ```sh
  86. docker run -i --rm -e PANEL_HOST -e PANEL_ACCESS_TOKEN \
  87. 1panel/mcp-server:v2.0.0-rc1 \
  88. --mode=legacy --transport=stdio --access-level=readonly
  89. ```
  90. Use an image you built/imported or an actually published tag. Container `localhost`
  91. is not the Docker host.
  92. ### HTTPS / Streamable HTTP
  93. Start the server before connecting. This example uses the source-built binary,
  94. a persistent local CA, and an independent MCP Bearer:
  95. ```sh
  96. export PANEL_HOST='https://panel.example'
  97. export PANEL_ACCESS_TOKEN='<1Panel API Key>'
  98. export MCP_AUTH_TOKEN='<separate strong random token>'
  99. ./build/mcp-1panel \
  100. --mode=legacy --transport=streamable-http \
  101. --addr=https://0.0.0.0:8000/mcp --allow-remote-http \
  102. --tls-hosts=mcp.example.com --tls-dir=./build/tls \
  103. --access-level=readonly
  104. ```
  105. Replace the domain, configure DNS and allow the required port. Configure a
  106. Streamable HTTP client with `https://mcp.example.com:8000/mcp` and the header
  107. `Authorization: Bearer <MCP_AUTH_TOKEN>`. Verify the CA fingerprint printed at
  108. startup and trust `build/tls/ca.crt` in the client. Keep the CA/private keys for
  109. reuse; share only the CA certificate. Do not disable certificate verification.
  110. Non-loopback listening requires HTTPS, authentication and `--allow-remote-http`.
  111. If the client sends `Origin`, allow its exact value with
  112. `--allowed-origins=https://client.example.com`. Same-host clients can instead use
  113. `--addr=http://127.0.0.1:8000/mcp` without TLS flags; the Bearer is still required.
  114. This is pre-shared authentication, not an MCP OAuth flow.
  115. ## Access levels and tools
  116. Independent mode defaults to `readonly`. `--access-level` / `MCP_ACCESS_LEVEL`
  117. controls both listing and execution, including direct calls to hidden tools.
  118. It restricts the configured Key and cannot add panel permissions. Managed mode
  119. uses Core grants instead of this option.
  120. | Level | Tools |
  121. | --- | --- |
  122. | `readonly` | 15 query, list and status tools |
  123. | `readwrite` | 18 tools, adding website, certificate and database creation |
  124. | `full` | All 20, adding MySQL and OpenResty installation |
  125. | Tool | Minimum level | Purpose |
  126. | --- | --- | --- |
  127. | `list_nodes` | `readonly` | Discover permitted node IDs |
  128. | `get_system_info` | `readonly` | System information |
  129. | `get_dashboard_info` | `readonly` | Dashboard status |
  130. | `list_websites` | `readonly` | Website list |
  131. | `get_website` | `readonly` | Website metadata |
  132. | `list_website_domains` | `readonly` | Domains and ports |
  133. | `get_website_https` | `readonly` | HTTPS and certificate metadata |
  134. | `list_ssls` | `readonly` | Certificate list |
  135. | `get_ssl_metadata` | `readonly` | Certificate metadata |
  136. | `list_installed_apps` | `readonly` | Installed application list |
  137. | `get_installed_app` | `readonly` | Installation state, version and ports |
  138. | `list_app_versions` | `readonly` | Available application versions |
  139. | `list_databases` | `readonly` | Databases in a selected local MySQL instance |
  140. | `list_mysql_instances` | `readonly` | Recorded local MySQL instances |
  141. | `get_mysql_status` | `readonly` | Fixed MySQL status counters |
  142. | `create_website` | `readwrite` | Create a static or proxy website |
  143. | `create_ssl` | `readwrite` | Submit certificate issuance |
  144. | `create_database` | `readwrite` | Create a local MySQL database |
  145. | `install_mysql` | `full` | Submit MySQL installation |
  146. | `install_openresty` | `full` | Submit OpenResty installation |
  147. `get_installed_app` may refresh the panel's status cache in independent mode;
  148. its query classification does not promise zero server writes. Managed mode reads recorded state.
  149. ## Nodes and write outcomes
  150. The 19 business tools accept optional `nodeId`, defaulting to `"local"`. Call
  151. `list_nodes` with `{}` for child IDs such as `"7"`, then pass the ID to a business
  152. tool. Names and IPs are not node selectors. Independent mode resolves ID to current
  153. name per call and routes through `CurrentNode`; local calls need no discovery.
  154. Managed mode uses stable-ID routing and rechecks grants on each API step.
  155. Neither mode falls back to the primary node. See [node authorization](docs/panel-integration.md#node-selection-and-authorization).
  156. Certificate issuance and app installation return `requestStatus:accepted`, which
  157. means submitted, not completed. A submitted write followed by a network/read
  158. failure, HTTP/business 5xx or an invalid success response has an **unknown outcome**.
  159. Check the actual resource or task in 1Panel before any manual retry; never automatically
  160. repeat the write. Disconnecting or revoking credentials does not roll back accepted work.
  161. See [tool inputs and constraints](docs/panel-integration.md#offline-manifest-and-twenty-shared-tools).
  162. ## Configuration reference
  163. Command-line values take precedence over their environment counterparts.
  164. | Option | Environment / default |
  165. | --- | --- |
  166. | `--mode` | `legacy` or `panel`; default `legacy` |
  167. | `--host`, `--token` | `PANEL_HOST`, `PANEL_ACCESS_TOKEN` |
  168. | `--key-id` | Optional `PANEL_KEY_ID` for panels with multiple API Keys |
  169. | `--transport` | `stdio` (default) or `streamable-http` |
  170. | `--addr` | Default `http://127.0.0.1:8000`; include `/mcp` when desired |
  171. | `--mcp-token` | `MCP_AUTH_TOKEN`, required for independent HTTP authentication |
  172. | `--access-level` | `MCP_ACCESS_LEVEL`; default `readonly` |
  173. | `--tls-dir`, `--tls-hosts` | Persistent CA/certificate directory and comma-separated certificate SANs |
  174. | `--allowed-origins` | Comma-separated exact Origin allowlist |
  175. | `--allow-remote-http` | Permit authenticated HTTPS on non-loopback addresses |
  176. | `--allow-insecure-http` | Unauthenticated loopback transport for local development only |
  177. | Error language | `MCP_LANGUAGE=zh-CN` or `en`; HTTP `Accept-Language` takes priority |
  178. `--version` and `--catalog` print metadata offline. The panel manages `--listen`
  179. and `--panel-socket`; `--healthcheck` checks managed adapter/Core readiness.
  180. Metadata and tool listing alone do not validate API connectivity or business operations.
  181. ## Documentation and validation
  182. - [Integration, authorization and managed deployment](docs/panel-integration.md)

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.