
1panel-dev/mcp-1panel
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
1panel-dev/mcp-1panel — это кандидат-сервер MCP, импортированный из https://github.com/1panel-dev/mcp-1panel.
Обзор
1panel-dev/mcp-1panel — это кандидат-сервер MCP, импортированный из https://github.com/1panel-dev/mcp-1panel.
Обзор (машинный перевод)
1Panel MCP Server — это реализация сервера Model Context Protocol (MCP) для 1Panel.
Установка
Требования
- Перейти на 1.25.0 или выше
- Существующая панель 1Panel
Build from Source
-
Клонировать репозиторий:
-
Постройте проект:
Переместите ./build/mcp-1panel на путь системной среды.
Установка с помощью go install
Использование
Пример конфигурации курсора и Windsurf:
режим stdio
Потоковый HTTP с автономным TLS
mcp-1panel может создавать и сохранять собственный локальный сертификат сервера CA и HTTPS. Он не зависит от управления сертификатами 1Panel.
При первом запуске сервер записывает путь CA и отпечаток SHA-256 в stderr. Настройте клиент MCP так, чтобы он доверял сгенерированному ca.crt; не отключайте проверку сертификатов. CA используется повторно, пока серверный сертификат обновляется автоматически.
HTTP-транспорты по умолчанию требуют токена аутентификации MCP. Клиенты должны отправлять его на каждый запрос как Authorization: Bearer ; закрытый заголовок [X-MCP-Token не принимается. Это режим предварительно совместного токена, предназначенный для развертывания одним пользователем/частным способом, а не для потока авторизации MCP OAuth.
Эта страница переведена автоматически. Технические детали смотрите в оригинале.
README
Показан фрагмент оригинального README. Открыть оригинал.
1Panel MCP Server
An MCP server for 1Panel v2, with 20 shared tools for nodes, system status, websites, certificates, applications and MySQL. Independent mode uses the official Go MCP SDK; managed mode integrates with 1Panel’s authorization and audit.
Choose a mode
| Mode | Connection and authorization | Deployment |
|---|---|---|
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 |
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 |
Independent mode requires an enabled public API and compatible APIs/DTOs for the selected tools on your installed 1Panel v2 release. It needs no managed MCP installation. Managed mode requires matching Core, primary/child Agents and frontend. See managed deployment.
| Credential | Purpose |
|---|---|
PANEL_ACCESS_TOKEN / --token |
1Panel API Key used by independent mode for outgoing panel requests |
MCP_AUTH_TOKEN / --mcp-token |
Separate pre-shared Bearer used by clients connecting to independent Streamable HTTP |
| Token created in the panel’s MCP page | Dedicated managed credential with explicit node/tool grants; clients use the panel’s HTTPS /mcp endpoint |
The independent HTTP token permits use of the configured API Key; it does not create another panel identity. The two modes’ MCP credentials are not interchangeable.
Install
Source
Use Go 1.27.3. The v2 source branch is dev-v2:
git clone --branch dev-v2 https://github.com/1Panel-dev/mcp-1panel.git
cd mcp-1panel
go mod download
make build
./build/mcp-1panel --version
make build creates a host-platform binary at build/mcp-1panel.
To cross-build Linux, use make build_linux GOARCH=amd64 or GOARCH=arm64;
make build_linux_all builds all seven architectures: 386, amd64, arm64, armv7, s390x, ppc64le and riscv64.
Linux builds require a locally available toolchain and cached dependencies;
outputs are build/mcp-1panel-linux-{arch}.
Release binary
Choose an explicitly published v2 release from Releases
compatible with your installed panel’s public APIs. Download the matching architecture
and SHA256SUMS, verify the checksum, then run, for example on Linux amd64:
chmod +x ./mcp-1panel-linux-amd64
./mcp-1panel-linux-amd64 --version
Use that binary’s absolute path in the client configuration below.
For maintainers, publishing a GitHub Release triggers tests, builds all seven Linux binaries,
uploads them with SHA256SUMS to that release, and pushes the multi-platform Docker image.
Установка
docker run -i --rm -e PANEL_HOST -e PANEL_ACCESS_TOKEN \Конфигурация
{
"mcpServers": {
"mcp-1panel": {
"command": "/absolute/path/to/mcp-1panel",
"args": ["--mode=legacy", "--transport=stdio", "--access-level=readonly"],
"env": {
"PANEL_HOST": "https://panel.example",
"PANEL_ACCESS_TOKEN": "<1Panel API Key>",
"MCP_LANGUAGE": "en"
}
}
}
}