MCP Server for Baota (BT) Panel — query logs, manage websites, deploy HTML via AI assistant. Supports readonly & full mode.
Server has 17 tools with explicit schemas and descriptions. Naming is verb-first and clear (list_, get_, manage_, save_, call_). Descriptions are detailed and contextual, averaging ~180 chars, well above the 10-char minimum. However, several critical gaps reduce the score: (1) parameter descriptions are inconsistent, some params lack descriptions entirely (e.g., 'action' enums in manage_domains, manage_backups, manage_sites lack explanation of what each action does); (2) output schemas are not documented, tools return text responses but the structure of that text is not specified, forcing LLMs to parse unstructured output; (3) error handling is absent, no guidance on recovery, retryability, or what to do if a tool fails; (4) no tool annotations (readOnlyHint, destructiveHint, idempotentHint) despite clear risk levels (READ_ONLY vs WRITE vs IRREVERSIBLE); (5) composition issues, manage_domains and manage_backups reuse the same schema for list/add/delete actions, conflating three separate concerns into one tool.
【full 模式】调用内置官方 API 目录中的任意操作。使用 get_bt_api_operation 核对参数;密钥、request_time、request_token 和 action 自动注入,不能由调用方覆盖。
【应用层日志 — 业务/程序运行记录】读取后端应用程序自身输出的业务日志。记录的是代码运行过程中的 INFO/WARN/ERROR 信息:SQL 报错、接口异常、业务逻辑错误、堆栈跟踪等。适合排查:业务逻辑 Bug、数据库异常、第三方接口报错、程序崩溃、性能慢查询等。注意:此工具【不包含】HTTP 请求记录,那些属于 Nginx 层,应使用 get_nginx_logs。支持框架:Laravel、ThinkPHP、Java、Node.js,默认 auto 自动探测所有常见路径。
获取一个官方宝塔 API 操作的完整参数定义。先用 search_bt_api 找到操作 ID。所有模式可用。
读取指定网站的 Nginx 配置文件(/www/server/panel/vhost/nginx/<域名>.conf)。适合查看反代、SSL、location 规则等配置。只读,不修改。
【Nginx 层日志 — HTTP 请求记录】读取 Nginx 的访问日志(access)或错误日志(error)。记录的是每一条 HTTP 请求:IP、时间、URL、状态码(200/404/499/502)、响应大小、来源页面、UserAgent。适合排查:HTTP 状态码异常、流量来源分析、爬虫/攻击识别、Nginx 配置问题、静态资源 404 等。注意:此工具【不包含】任何业务逻辑、数据库、接口报错等应用层信息。工具会自动在 /www/wwwlogs/ 目录探测日志路径,无需手动填写。
Output schemas not documented. Tools return text responses but the structure (fields, types, format) is not specified. LLMs must parse unstructured output, wasting tokens and increasing hallucination risk.
Action-based tools (manage_domains, manage_backups, manage_sites) conflate multiple concerns into one tool. 'action' enum parameter lacks description of what each action does. Should split into separate tools: list_domains, add_domain, delete_domain, etc.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 58 | 2026-07-28+ | v2 |
读取宝塔面板自身的操作日志,包括登录记录、配置变更、安装/卸载软件等操作历史。适合审计谁在什么时候操作了面板。
获取服务器实时状态:CPU 使用率、内存占用、磁盘分区使用情况、网络实时流量、系统负载。适合排查性能问题或确认服务器资源是否充足。
查询网站的备份列表,包括备份 ID、文件名、创建时间。
查询网站绑定的所有域名列表,包括域名、端口、添加时间。
列出宝塔面板中所有托管的网站,包括域名、根目录、运行状态。查询日志前先用此工具确认网站名称和路径。
【full 模式】备份管理:立即备份网站、删除备份记录。
【full 模式】域名管理:给网站绑定新域名或删除域名绑定。
【full 模式】网站管理:启用/停用/删除/创建网站,修改备注、到期时间,查询 PHP 版本列表,查看网站防跨站/日志状态。
读取服务器上任意文件内容(只读)。适合查看 Nginx 配置文件、PHP 配置、应用配置文件、自定义日志路径等。建议配合 last_lines 参数避免读取超大文件。
【full 模式】写入/覆盖服务器上的任意文件内容(谨慎!)。
【full 模式】保存 Nginx 配置文件(谨慎!保存后立即生效,错误配置会导致网站无法访问)。
搜索当前内置的宝塔官方 API 目录。返回操作 ID、HTTP 路由、必填参数和模块统计;所有模式可用。
No tool annotations (readOnlyHint, destructiveHint, idempotentHint) despite explicit risk levels. Tools marked IRREVERSIBLE (save_nginx_config, save_file) should have destructiveHint=true. Tools marked READ_ONLY should have readOnlyHint=true. Annotations guide agent safety policies.
No error handling guidance. Tools do not document what errors can occur, whether they are retryable, or what the LLM should do next. E.g., 'file not found' vs 'permission denied' vs 'timeout' all return text with no recovery path.
Parameter descriptions incomplete. 'action' parameters in manage_domains, manage_backups, manage_sites have enum values but no description of what each action does. 'log_path' in get_nginx_logs and get_app_logs lacks format/constraint details.