sakurafrp-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| SAKURA_FRPC | No | Path to frpc.exe. | C:\Program Files\SakuraFrpLauncher\frpc.exe |
| SAKURA_CONFIG | No | Launcher config path; the token is read from this file only. | C:\ProgramData\SakuraFrpService\config.json |
| SAKURA_LOG_DIR | No | Launcher log directory. | C:\ProgramData\SakuraFrpService\Logs |
| SAKURA_SERVICE | No | Windows service name. | SakuraFrpService |
| SAKURA_API_BASE | No | Cloud API base URL. | https://api.natfrp.com/v4 |
| SAKURA_HTTP_TIMEOUT | No | Per-request timeout in milliseconds. | 15000 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
SakuraFrp 启动器控制面。只读工具直接调用;start_tunnel / stop_tunnel / restart_service / set_auto_start 会重启 Windows 服务(所有隧道短暂中断),需要 confirm: true。
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_tunnelsA | 列出 SakuraFrp 账号下的全部隧道(含节点名、本地/远端端口、在线状态、是否开机自启)。只读。 |
| user_infoA | 账户信息:流量用量与配额、限速、隧道数配额、实名等级、VIP 到期时间。只读。 |
| nodesA | 列出全部可用节点(含 host 与说明)。只读。 |
| local_statusA | 本机状态:SakuraFrpService / SakuraLauncher / frpc 进程存活、frpc 与节点的 TCP 连接、当前 auto_start_tunnels、各隧道本地端口是否真的可访问、WebUI 端口。只读。 |
| logsA | 读取 SakuraFrpService 最新日志文件的尾部若干行,可按隧道名过滤。只读。 |
| start_tunnelA | 启动指定隧道(按 id 或 name)。写操作:把隧道加入 auto_start_tunnels 并重启 SakuraFrpService,服务下所有隧道会短暂中断。必须传 confirm: true。 |
| stop_tunnelA | 停止指定隧道(按 id 或 name)。写操作:把隧道从 auto_start_tunnels 移除并重启服务。必须传 confirm: true。 |
| restart_serviceA | 重启 Windows 服务 SakuraFrpService(该服务下所有隧道短暂中断后自动恢复)。必须传 confirm: true。 |
| set_auto_startB | 整体设置 auto_start_tunnels 并重启服务(用于一次性打开/关闭多条)。必须传 confirm: true。 |
| create_tunnelA | 在账号下新建一条隧道。写操作,占用隧道额度,必须传 confirm: true。name 要求 3-20 字符仅字母数字下划线;remote 留空则自动分配远端端口。默认创建后即启动(start:false 可关)。 |
| edit_tunnelA | 修改已有隧道配置。写操作,必须传 confirm: true。严格按「停隧道 → 改云端配置 → 重新启动 → 验证上线」四步执行:在线直接改云端不会生效,frpc 不会热重载配置。只覆盖显式传入的字段,其余沿用云端当前值。 |
| delete_tunnelA | 永久删除隧道。写操作,必须传 confirm: true。不可恢复,公网入口立即失效。会先停隧道再删除,删除失败自动回滚。可额外传 name 做二次校验防止删错。 |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 12 tools
Read-only tools (list_tunnels, user_info, nodes, local_status, logs) and per-tunnel write tools (start/stop/create/edit/delete_tunnel) are clearly separable. The one fuzzy boundary is start_tunnel/stop_tunnel versus set_auto_start, since start/stop are implemented by mutating auto_start_tunnels and all three restart the service — the descriptions help but an agent could still pick wrongly for 'permanently enable one tunnel'.
Write tools follow a clean verb_noun CRUD pattern (create_tunnel/edit_tunnel/delete_tunnel/start_tunnel/stop_tunnel/restart_service/set_auto_start). Read tools break it: list_tunnels uses a list_ verb while nodes, logs, user_info and local_status are bare nouns, so there are two competing conventions.
12 tools is well within the sweet spot and each maps to a distinct operation in the tunnel lifecycle (inspect, start/stop, CRUD, service control). No redundant or filler tools; read-only diagnostics and write actions are balanced.
Full tunnel lifecycle (list, create, edit, delete, start, stop, auto-start batch) plus account, nodes, service/process and log diagnostics covers the domain well. Minor gaps: no get_tunnel by id for single-tunnel detail, no way to start a tunnel without it being added to auto_start, and no per-tunnel traffic/latency stats.