Back to MCP directory
publicPublicdnsLocal runtime

1Panel

1Panel MCP Server是为1Panel设计的模型上下文协议服务器实现。

article

README

🚀 1Panel MCP 服务器

1Panel MCP Server1Panel 的 Model Context Protocol (MCP) 服务器实现,可助力相关系统更高效地运行。

🚀 快速开始

📦 安装指南

方法一:从发布页面下载(推荐)

  1. 访问 发布页面,下载适用于您系统的可执行文件。
  2. 示例安装(针对 amd64):
chmod +x mcp-1panel-linux-amd64
mv mcp-1panel-linux-amd64 /usr/local/bin/mcp-1panel

方法二:从源码构建

确保本地已安装 Go 1.23 或更高版本。然后按以下步骤操作:

  1. 克隆仓库:
git clone https://github.com/1Panel-dev/mcp-1panel.git
cd mcp-1panel
  1. 构建可执行文件:
make build

将 ./build/mcp-1panel 移动到系统 PATH 包含的目录中。

方法三:通过 go install 安装

确保本地已安装 Go 1.23 或更高版本,然后运行:

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

方法四:通过 Docker 安装

确保 Docker 已正确安装并配置在您的机器上。官方镜像支持以下架构:

  • amd64
  • arm64
  • arm/v7
  • s390x
  • ppc64le

💻 使用示例

1Panel MCP 服务器支持两种运行模式:stdiosse

基础用法

stdio 模式
  • 使用本地二进制文件 在 Cursor 或 Windsurf 的配置文件中添加:
{
  "mcpServers": {
    "mcp-1panel": {
      "command": "mcp-1panel",
      "env": {
        "PANEL_ACCESS_TOKEN": "<your 1Panel access token>",
        "PANEL_HOST": "such as http://localhost:8080"
      }
    }
  }
}
  • 使用 Docker 运行
{
  "mcpServers": {
    "mcp-1panel": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "PANEL_HOST",
        "-e",
        "PANEL_ACCESS_TOKEN",
        "1panel/1panel-mcp-server"
      ],
      "env": {
        "PANEL_HOST": "such as http://localhost:8080",
        "PANEL_ACCESS_TOKEN": "<your 1Panel access token>"
      }
    }
  }
}
sse 模式
  1. 启动 MCP 服务器:
mcp-1panel -host http://localhost:8080 -token <your 1Panel access token> -transport sse -addr http://localhost:8000
  1. 在 Cursor 或 Windsurf 中配置:
{
  "mcpServers": {
    "mcp-1panel": {
      "url": "http://localhost:8000/sse"
    }
  }
}

高级用法

以下是命令行选项说明:

  • -token: 1Panel 访问令牌
  • -host: 默认监听地址
  • -transport: 支持的传输类型(默认为 http)
  • -addr: 监听地址和端口
  • -loglevel: 日志级别
  • -version: 显示版本信息

📚 详细文档

MCP 服务器提供了以下工具: | 属性 | 详情 | |------|------| | 工具名 | mcp-servermcp-clientmcp-configmcp-monitormcp-databasemcp-proxy | | 功能描述 | 分别用于启动 MCP 服务器、与 MCP 服务器交互、配置和管理 MCP 服务器的配置文件、监控 MCP 服务器的状态和性能指标、管理与 MCP 服务器关联的数据库、设置代理以转发请求到 MCP 服务器 |

这些工具可以帮助您更好地管理和监控 MCP 服务器。

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client