宝塔面板 Mcp,支持日志查询、一键建站、网站管理

by SuxyEE

180 downloads
Not rated
GitHub

About

宝塔面板 Mcp,支持日志查询、一键建站、网站管理.

Details

Author
SuxyEE
Downloads
180
Categories
Other

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name 宝塔面板 Mcp,支持日志查询、一键建站、网站管理
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

{
  "mcpServers": {
    "bt-panel": {
      "command": "npx",
      "args": [
        "-y",
        "bt-panel-mcp-server"
      ],
      "env": {
        "BT_PANEL_URL": "http://\u670d\u52a1\u5668IP:\u9762\u677f\u7aef\u53e3/\u5b89\u5168\u5165\u53e3",
        "BT_API_KEY": "\u4f60\u7684API\u5bc6\u94a5",
        "BT_MODE": "readonly"
      }
    }
  }
}

list_sites

列出宝塔面板中所有托管的网站,包括域名、根目录、运行状态。查询日志前先用此工具确认网站名称和路径。

get_nginx_logs

【Nginx 层日志 — HTTP 请求记录】读取 Nginx 的访问日志(access)或错误日志(error)。记录的是每一条 HTTP 请求:IP、时间、URL、状态码(200/404/499/502)、响应大小、来源页面、UserAgent。适合排查:HTTP 状态码异常、流量来源分析、爬虫/攻击识别、Nginx 配置问题、静态资源 404 等。注意:此工具【不包含】任何业务逻辑、数据库、接口报错等应用层信息。工具会自动在 /www/wwwlogs/ 目录探测日志路径,无需手动填写。

get_app_logs

【应用层日志 — 业务/程序运行记录】读取后端应用程序自身输出的业务日志。记录的是代码运行过程中的 INFO/WARN/ERROR 信息:SQL 报错、接口异常、业务逻辑错误、堆栈跟踪等。适合排查:业务逻辑 Bug、数据库异常、第三方接口报错、程序崩溃、性能慢查询等。注意:此工具【不包含】HTTP 请求记录,那些属于 Nginx 层,应使用 get_nginx_logs。支持框架:Laravel、ThinkPHP、Java、Node.js,默认 auto 自动探测所有常见路径。

get_panel_logs

读取宝塔面板自身的操作日志,包括登录记录、配置变更、安装/卸载软件等操作历史。适合审计谁在什么时候操作了面板。

get_system_status

获取服务器实时状态:CPU 使用率、内存占用、磁盘分区使用情况、网络实时流量、系统负载。适合排查性能问题或确认服务器资源是否充足。

read_file

读取服务器上任意文件内容(只读)。适合查看 Nginx 配置文件、PHP 配置、应用配置文件、自定义日志路径等。建议配合 last_lines 参数避免读取超大文件。

get_nginx_config

读取指定网站的 Nginx 配置文件(/www/server/panel/vhost/nginx/<域名>.conf)。适合查看反代、SSL、location 规则等配置。只读,不修改。

list_domains

查询网站绑定的所有域名列表,包括域名、端口、添加时间。

list_backups

查询网站的备份列表,包括备份 ID、文件名、创建时间。

search_bt_api

搜索当前内置的宝塔官方 API 目录。返回操作 ID、HTTP 路由、必填参数和模块统计;所有模式可用。

get_bt_api_operation

获取一个官方宝塔 API 操作的完整参数定义。先用 search_bt_api 找到操作 ID。所有模式可用。

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "\u5b9d\u5854\u9762\u677f mcp\uff0c\u652f\u6301\u65e5\u5fd7\u67e5\u8be2\u3001\u4e00\u952e\u5efa\u7ad9\u3001\u7f51\u7ad9\u7ba1\u7406": {
            "bt-panel": {
                "command": "npx",
                "args": [
                    "-y",
                    "bt-panel-mcp-server"
                ],
                "env": {
                    "BT_PANEL_URL": "http://\u670d\u52a1\u5668IP:\u9762\u677f\u7aef\u53e3/\u5b89\u5168\u5165\u53e3",
                    "BT_API_KEY": "\u4f60\u7684API\u5bc6\u94a5",
                    "BT_MODE": "readonly"
                }
            }
        }
    }
}

McpServers

{
    "bt-panel": {
        "command": "npx",
        "args": [
            "-y",
            "bt-panel-mcp-server"
        ],
        "env": {
            "BT_PANEL_URL": "http://\u670d\u52a1\u5668IP:\u9762\u677f\u7aef\u53e3/\u5b89\u5168\u5165\u53e3",
            "BT_API_KEY": "\u4f60\u7684API\u5bc6\u94a5",
            "BT_MODE": "readonly"
        }
    }
}
No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.