工具参考
7.0.1 · 44 个 MCP 工具
示例里的服务器名、ID 和路径只是演示格式,实际调用请换成真实返回值。所有 timeout 参数单位都是毫秒。如果直接连中心的 /mcp 接口,只能用不涉及本机文件、本机地址和本机节点的工具;需要完整功能请在本机安装 SummerSSH。

没有找到匹配的工具,换个关键词或分类试试。
服务器与权限
ssh_list_servers只读查看服务器列表
Find the authoritative SummerSSH server names before any remote operation. This is the starting tool when the user names a server; do not search local SSH files to select it.
输入参数
No arguments. Use the returned name exactly in other tools; host/IP alone is not a server argument. If the target is missing, obtain its intended connection details before ssh_server_manage add.
返回结果与后续处理
Returns count and servers with name, platform, permission mode and configured route scope. A server with policyError has an invalid mode or pattern and refuses every operation until its configuration is corrected. Empty servers is a valid empty catalog, not a connection failure. Listing does not test SSH login.
调用示例
{}不需要参数,传 {} 即可。
查看完整 JSON Schema
{
"additionalProperties": true,
"examples": [
{}
],
"properties": {},
"required": [],
"type": "object"
}ssh_server_manage增删改服务器配置
Manage server entries and center host-key approvals. Catalog changes belong to the center in center mode, otherwise this computer. Use after ssh_list_servers; no MCP restart is needed.
输入参数
action=add needs a new server name and config.host/config.user plus the intended authentication. update needs an existing server and only changed config fields; null clears nullable credentials and proxy_jump. remove needs server. reload needs no server. install_helper installs the file helper on one server and needs write access under that server's mode. installHelper defaults true for add, false otherwise. host_key needs server and op=list/approve/reject; approve/reject also need fingerprint from list. A center administrator must independently verify the fingerprint before approval. add/update accepts top-level hostKeyFingerprint as one independently verified SHA256 fingerprint or up to 8 in an array; [] clears declarations and omission preserves them. proxy_command is not accepted; use proxy_jump.
返回结果与后续处理
A saved catalog entry is not proof of SSH login: run a read-only ssh_execute next. An entry with an unknown mode or an invalid pattern is refused and nothing is written. Helper failure can coexist with a saved entry; do not repeat add. key_path/ssh_key are file paths: a center-connected device reads its local private key and securely uploads the material; standalone local mode reads locally. Direct center/MCP connectors do not accept private-key file paths. host_key operations require a center administrator; list returns recorded keys and declarations, approve verifies one recorded key, and reject removes it.
调用示例
{
"action": "reload"
}参数说明
| 字段 | 类型与默认值 | 说明 |
|---|---|---|
| action必填 | stringadd · update · remove · reload · install_helper · host_key | add: new server and connection config; update: existing server and changed fields; remove: server; reload: no server needed; install_helper: install on server without changing the catalog; host_key: center administrator lists, approves or rejects server host keys using op. |
| config | object | Changed catalog fields only. add requires host and user; update preserves omitted fields. null clears nullable credential fields and proxy_jump. |
| description | string | Compatibility alias for config.description. |
| fingerprint | string | Required for host_key approve/reject: the exact SHA256 fingerprint of a recorded key returned by host_key list. Independently verify it before approval. |
| host | string | Compatibility top-level alias for config.host. Prefer config and do not mix both forms. |
| hostKeyFingerprint | string / array | add/update only, at the top level: declare one independently verified SHA256 host-key fingerprint or an array of up to 8. An empty array clears declarations; omission preserves them. |
| installHelper | boolean | Attempt remote file-helper installation after add/update. Default true for add, false for update. A helper failure can occur after a successful catalog save; inspect both results. |
| key_path | string / null | Compatibility alias for config.key_path, with the same device-local path handling. Direct center/MCP connectors do not accept it. null clears it. |
| mode | stringunrestricted · readonly · restricted | Compatibility alias for config.mode. |
| op | stringlist · approve · reject | Required for host_key. list reads this server's recorded keys and declarations; approve verifies one recorded key only after independent fingerprint verification; reject removes one recorded key. Center administrator only. |
| password | string / null | Compatibility alias for config.password; null clears it. Secret. |
| port | integer | Compatibility alias for config.port. |
| server | string | Exact existing name for update/remove/install_helper/host_key, or the user's chosen new name for add. Omit for reload. |
| user | string | Compatibility top-level alias for config.user. |
查看完整 JSON Schema
{
"additionalProperties": true,
"examples": [
{
"action": "reload"
}
],
"properties": {
"action": {
"description": "add: new server and connection config; update: existing server and changed fields; remove: server; reload: no server needed; install_helper: install on server without changing the catalog; host_key: center administrator lists, approves or rejects server host keys using op.",
"enum": [
"add",
"update",
"remove",
"reload",
"install_helper",
"host_key"
],
"type": "string"
},
"config": {
"additionalProperties": false,
"description": "Changed catalog fields only. add requires host and user; update preserves omitted fields. null clears nullable credential fields and proxy_jump.",
"properties": {
"allow_patterns": {
"description": "Regular expressions for commands a restricted server may run; an empty list rejects every command. A pattern that does not compile is rejected.",
"items": {
"type": "string"
},
"type": "array"
},
"audit_log": {
"description": "Audit path owned by the configured runtime; omit to preserve existing audit configuration.",
"type": "string"
},
"default_dir": {
"description": "Default working directory on this server for command execution.",
"type": "string"
},
"deny_patterns": {
"description": "Regular expressions for commands a restricted server refuses even when allowed; cannot grant OS permissions. A pattern that does not compile is rejected.",
"items": {
"type": "string"
},
"type": "array"
},
"description": {
"description": "Human-readable catalog note; not a connection or route configuration.",
"type": "string"
},
"guard": {
"description": "Policy for high-confidence destructive command patterns. Defaults to confirm.",
"enum": [
"off",
"confirm",
"deny"
],
"type": "string"
},
"guard_lifecycle": {
"description": "Policy for lifecycle command patterns. Defaults to off.",
"enum": [
"off",
"confirm",
"deny"
],
"type": "string"
},
"host": {
"description": "SSH target hostname/address in its configured route scope; with proxy_jump, loopback/private addresses belong behind that hop.",
"type": "string"
},
"key_path": {
"description": "Existing private-key file on this device. A center-connected device reads it and securely uploads the material; standalone local mode reads it locally. Direct center/MCP connectors do not accept private-key file paths. null clears it.",
"type": [
"string",
"null"
]
},
"mode": {
"description": "Access policy combined with the SSH account's real OS permissions. readonly allows only reading and fixed diagnostics. restricted adds commands that match allow_patterns and no deny_patterns. Any other value is rejected. Neither is an OS sandbox.",
"enum": [
"unrestricted",
"readonly",
"restricted"
],
"type": "string"
},
"passphrase": {
"description": "Passphrase for the configured private key; null clears it. Secret.",
"type": [
"string",
"null"
]
},
"password": {
"description": "SSH login password. null clears it; do not print it or copy it into chat/logs.",
"type": [
"string",
"null"
]
},
"platform": {
"description": "windows selects Windows command/path handling; omit for POSIX targets.",
"enum": [
"linux",
"windows"
],
"type": "string"
},
"port": {
"default": 22,
"description": "SSH TCP port on the target.",
"maximum": 65535,
"minimum": 1,
"type": "integer"
},
"proxy_jump": {
"description": "Configured SSH jump server name/path; preserve required hops. null removes the jump; an empty name is refused. Use route inspect/plan/apply for managed topology changes.",
"type": [
"string",
"null"
]
},
"sandbox": {
"description": "Required command sandbox. workspace is Linux, process is Windows. Defaults to off.",
"enum": [
"off",
"workspace",
"process"
],
"type": "string"
},
"sandbox_writable_roots": {
"description": "Absolute Linux roots authorized by the required workspace sandbox. null clears the list. In a local catalog the tool can only keep or remove existing roots.",
"items": {
"type": "string"
},
"type": [
"array",
"null"
]
},
"ssh_key": {
"description": "Legacy alias with the same behavior as key_path: a local file path, never key content. Prefer key_path.",
"type": [
"string",
"null"
]
},
"sudo_password": {
"description": "Optional remote sudo password; distinct from SSH login password. Secret; omit to preserve the existing value.",
"type": "string"
},
"user": {
"description": "Remote SSH login account, not this MCP client account.",
"type": "string"
}
},
"type": "object"
},
"description": {
"description": "Compatibility alias for config.description.",
"type": "string"
},
"fingerprint": {
"description": "Required for host_key approve/reject: the exact SHA256 fingerprint of a recorded key returned by host_key list. Independently verify it before approval.",
"type": "string"
},
"host": {
"description": "Compatibility top-level alias for config.host. Prefer config and do not mix both forms.",
"type": "string"
},
"hostKeyFingerprint": {
"description": "add/update only, at the top level: declare one independently verified SHA256 host-key fingerprint or an array of up to 8. An empty array clears declarations; omission preserves them.",
"items": {
"type": "string"
},
"maxItems": 8,
"type": [
"string",
"array"
]
},
"installHelper": {
"description": "Attempt remote file-helper installation after add/update. Default true for add, false for update. A helper failure can occur after a successful catalog save; inspect both results.",
"type": "boolean"
},
"key_path": {
"description": "Compatibility alias for config.key_path, with the same device-local path handling. Direct center/MCP connectors do not accept it. null clears it.",
"type": [
"string",
"null"
]
},
"mode": {
"description": "Compatibility alias for config.mode.",
"enum": [
"unrestricted",
"readonly",
"restricted"
],
"type": "string"
},
"op": {
"description": "Required for host_key. list reads this server's recorded keys and declarations; approve verifies one recorded key only after independent fingerprint verification; reject removes one recorded key. Center administrator only.",
"enum": [
"list",
"approve",
"reject"
],
"type": "string"
},
"password": {
"description": "Compatibility alias for config.password; null clears it. Secret.",
"type": [
"string",
"null"
]
},
"port": {
"description": "Compatibility alias for config.port.",
"maximum": 65535,
"minimum": 1,
"type": "integer"
},
"server": {
"description": "Exact existing name for update/remove/install_helper/host_key, or the user's chosen new name for add. Omit for reload.",
"type": "string"
},
"user": {
"description": "Compatibility top-level alias for config.user.",
"type": "string"
}
},
"required": [
"action"
],
"type": "object"
}ssh_connection_status查看连接与更新状态
Inspect the actual companion version, update state, SSH pools, sessions and tunnels. Use this first for runtime/update diagnosis; use ssh_route_inspect for path and resource diagnosis.
输入参数
action defaults status; optional server from ssh_list_servers filters pool actions. reconnect/disconnect affect shared connections used by local clients; use only for an intended forced operation. cleanup removes idle/dead entries.
返回结果与后续处理
Read companionVersion and update receipts separately from saved config. deferred means waiting for real work to become idle, not an update failure. Queue an enabled update check with ssh_node_manage {server:@local,action:upgrade}; do not kill clients to force it.
调用示例
{
"action": "status"
}参数说明
| 字段 | 类型与默认值 | 说明 |
|---|---|---|
| action | stringstatus · reconnect · disconnect · cleanup | Default status is read-only. reconnect/disconnect force shared pool changes and can affect other local clients. cleanup evicts idle/dead entries. |
| server | string | Optional catalog server name for pool inspection/action; omission targets the pool as a whole. |
查看完整 JSON Schema
{
"additionalProperties": true,
"examples": [
{
"action": "status"
}
],
"properties": {
"action": {
"description": "Default status is read-only. reconnect/disconnect force shared pool changes and can affect other local clients. cleanup evicts idle/dead entries.",
"enum": [
"status",
"reconnect",
"disconnect",
"cleanup"
],
"type": "string"
},
"server": {
"description": "Optional catalog server name for pool inspection/action; omission targets the pool as a whole.",
"type": "string"
}
},
"required": [],
"type": "object"
}ssh_group_manage管理服务器分组
Maintain named server groups for ssh_execute_group in the authoritative catalog. Groups are separate from native device clusters.
输入参数
list/get reads all. set/add replaces the named group with servers from ssh_list_servers and optional strategy, delay in milliseconds, stopOnError, canary, concurrency and description. concurrency must be an integer from 1 to 32; the parallel default is 8. canary defaults false and requires the first member to exit 0 without timeout or execution error before other members start. Execution preserves member order and removes duplicates. update changes only supplied fields. add-servers/remove-servers changes only named membership. remove/delete needs name and removes that group only.
返回结果与后续处理
Returns the saved group map without contacting members. ssh_execute_group inherits saved defaults unless its call overrides them. stopOnError stops new dispatches after failure and leaves already dispatched commands to finish.
调用示例
{
"action": "list"
}参数说明
| 字段 | 类型与默认值 | 说明 |
|---|---|---|
| action | stringlist · get · set · add · update · remove · delete · add-servers · remove-servers | Default list. list/get reads the whole map; set/add replaces one group; update changes only the supplied fields; remove/delete deletes one group; add-servers/remove-servers changes its membership. |
| canary | boolean默认 false | Run the first member to completion before starting other members; only exit code 0 without timeout or execution error opens the rest of the group. |
| concurrency | integer默认 8 | Default maximum commands in flight for parallel execution; ssh_execute_group may override it. |
| delay | integer | Default rolling delay in milliseconds; 1000 = 1 second. |
| description | string | Optional saved note; no execution effect. |
| name | string | Group name. Required by every action except list/get. |
| servers | array | Catalog names to save, add or remove from this local command group. |
| stopOnError | boolean默认 false | Stop scheduling new targets after a failure; already dispatched commands are not recalled. |
| strategy | stringparallel · sequential · rolling | Default group execution strategy used by ssh_execute_group when its call omits strategy. |
| value | object | Optional object carrying servers, strategy, delay, stopOnError, canary, concurrency and description instead of the top-level fields. |
查看完整 JSON Schema
{
"additionalProperties": true,
"examples": [
{
"action": "list"
}
],
"properties": {
"action": {
"description": "Default list. list/get reads the whole map; set/add replaces one group; update changes only the supplied fields; remove/delete deletes one group; add-servers/remove-servers changes its membership.",
"enum": [
"list",
"get",
"set",
"add",
"update",
"remove",
"delete",
"add-servers",
"remove-servers"
],
"type": "string"
},
"canary": {
"default": false,
"description": "Run the first member to completion before starting other members; only exit code 0 without timeout or execution error opens the rest of the group.",
"type": "boolean"
},
"concurrency": {
"default": 8,
"description": "Default maximum commands in flight for parallel execution; ssh_execute_group may override it.",
"maximum": 32,
"minimum": 1,
"type": "integer"
},
"delay": {
"description": "Default rolling delay in milliseconds; 1000 = 1 second.",
"minimum": 0,
"type": "integer"
},
"description": {
"description": "Optional saved note; no execution effect.",
"type": "string"
},
"name": {
"description": "Group name. Required by every action except list/get.",
"type": "string"
},
"servers": {
"description": "Catalog names to save, add or remove from this local command group.",
"items": {
"type": "string"
},
"type": "array"
},
"stopOnError": {
"default": false,
"description": "Stop scheduling new targets after a failure; already dispatched commands are not recalled.",
"type": "boolean"
},
"strategy": {
"description": "Default group execution strategy used by ssh_execute_group when its call omits strategy.",
"enum": [
"parallel",
"sequential",
"rolling"
],
"type": "string"
},
"value": {
"description": "Optional object carrying servers, strategy, delay, stopOnError, canary, concurrency and description instead of the top-level fields.",
"type": "object"
}
},
"required": [],
"type": "object"
}ssh_access_manage管理中心账号与接入码
Manage who may use the center: its subjects, their roles and scopes, enrollment codes, device bindings and the audit chain. The center decides every request and gives the reason for a refusal. Works only where SummerSSH is connected to a center.
输入参数
action is required. whoami and list take nothing else. issue_code needs role and scope, with optional kind, label and ttlMinutes. set_role needs subject and role; set_scope needs subject and scope. freeze/unfreeze/revoke need subject. legacy_key needs enabled. bind_device needs device and subject; unbind_device needs device. audit takes optional limit, before, subject and kind. candidates needs subject and Admin, with optional limit (default 100, maximum 500) and cursor from nextCursor. maintenance_get needs target {kind:center|cluster|node,id?}; maintenance_set also needs expectedRevision and complete overrides, with optional center-only mode. Scoped maintenance writes require Ops or Admin; center defaults, mode and any effective lease extension require Admin. Other administration actions require Admin.
返回结果与后续处理
Returns action and result, the center's answer: the caller's own record for whoami, every subject for list, audit rows newest first for audit, separate local SSH connection closure reports and unverified certificate or static credential exposure for candidates, and what was changed for the rest. Closure reports describe only local connection handles. A static credential's rotation is managed only when that delivery sent nothing but a private key, the key is provably still the one stored, and its line is one SummerSSH installed and records, so one ssh_credential_manage rotate replaces it; everything else is manual, including a key replaced since it went out, whose line may still log in until removed by hand. issue_code creates a new subject on every call and returns its enrollment code in result.code, once: the code is short-lived, single-use and bound to the role and scope given, and its issue is audited. Hand it only to whoever enrolls that device. A null result.code means the answer that carried the code was lost; issue another. Do not repeat a refused request unchanged.
调用示例
{
"action": "whoami"
}参数说明
| 字段 | 类型与默认值 | 说明 |
|---|---|---|
| action必填 | stringwhoami · list · issue_code · set_role · set_scope · freeze · unfreeze · revoke · legacy_key · bind_device · unbind_device · audit · candidates · maintenance_get · maintenance_set | whoami: the caller's own subject. list: every subject. issue_code: create a subject and its enrollment code. set_role/set_scope: change grants. freeze/unfreeze/revoke: suspend, restore or end a subject. legacy_key: manage the old shared key. bind_device/unbind_device: bind a directory device. audit: one page of audit rows. candidates: review reported local SSH connection closures and credential exposure for a subject. maintenance_get/set: inspect or replace inherited node lease and scan policy. Subject administration requires Admin; scoped maintenance writes require Ops or Admin, and extending an effective lease requires Admin. |
| before | integer | audit only: list rows older than the one with this seq. Pass the lowest seq of a page to read the page before it. |
| cursor | string | candidates only: opaque nextCursor from the previous page for the same subject and grant epoch. |
| device | string | bind_device and unbind_device: the UUID of a device in the route directory. Only a device that no server manages is bound. |
| enabled | boolean | legacy_key only, required: false stops accepting the shared key; true accepts again the key this run of the center was started with. |
| expectedRevision | integer | maintenance_set: current target revision from maintenance_get. |
| kind | string | issue_code: what the new subject is. Leave it out for a device, which is companion, the default. audit: only rows whose kind starts with this text; 'access.' selects the changes made through this tool. |
| label | string | issue_code only: a note shown with the subject in list. Not a credential. |
| limit | integer | Most records in one page. audit defaults to 50, maximum 256. candidates defaults to 100, maximum 500. |
| mode | stringmaintain · revocations_only · disabled | maintenance_set for center only; Admin required. |
| overrides | object | maintenance_set: required complete replacement; {} clears explicit values. Node targets require a bound managed node with a verified root. |
| reason | stringadministrator · owner_revoked | revoke only: recorded with the revocation for audit and display. Default administrator. |
| role | stringadmin · ops · read_only | issue_code and set_role: the most the subject may do on any server in its scope. admin is granted only with the scope all. |
| scope | object | issue_code and set_scope: the servers the subject may see. {"kind":"all"} is every server; {"kind":"listed","groups":[...],"servers":[...]} is the named center groups and catalog servers and nothing else. The role admin is granted only with kind all. |
| subject | string | Subject id, 32 hexadecimal characters, as list and whoami return it. Required by set_role, set_scope, freeze, unfreeze, revoke, bind_device and candidates. With audit, lists only this subject's rows. |
| target | object | maintenance_get/set: policy scope to read or update. |
| ttlMinutes | integer默认 15 | issue_code only: minutes until an unused code expires. Default 15. |
查看完整 JSON Schema
{
"additionalProperties": true,
"examples": [
{
"action": "whoami"
}
],
"properties": {
"action": {
"description": "whoami: the caller's own subject. list: every subject. issue_code: create a subject and its enrollment code. set_role/set_scope: change grants. freeze/unfreeze/revoke: suspend, restore or end a subject. legacy_key: manage the old shared key. bind_device/unbind_device: bind a directory device. audit: one page of audit rows. candidates: review reported local SSH connection closures and credential exposure for a subject. maintenance_get/set: inspect or replace inherited node lease and scan policy. Subject administration requires Admin; scoped maintenance writes require Ops or Admin, and extending an effective lease requires Admin.",
"enum": [
"whoami",
"list",
"issue_code",
"set_role",
"set_scope",
"freeze",
"unfreeze",
"revoke",
"legacy_key",
"bind_device",
"unbind_device",
"audit",
"candidates",
"maintenance_get",
"maintenance_set"
],
"type": "string"
},
"before": {
"description": "audit only: list rows older than the one with this seq. Pass the lowest seq of a page to read the page before it.",
"minimum": 0,
"type": "integer"
},
"cursor": {
"description": "candidates only: opaque nextCursor from the previous page for the same subject and grant epoch.",
"maxLength": 128,
"type": "string"
},
"device": {
"description": "bind_device and unbind_device: the UUID of a device in the route directory. Only a device that no server manages is bound.",
"type": "string"
},
"enabled": {
"description": "legacy_key only, required: false stops accepting the shared key; true accepts again the key this run of the center was started with.",
"type": "boolean"
},
"expectedRevision": {
"description": "maintenance_set: current target revision from maintenance_get.",
"minimum": 0,
"type": "integer"
},
"kind": {
"description": "issue_code: what the new subject is. Leave it out for a device, which is companion, the default. audit: only rows whose kind starts with this text; 'access.' selects the changes made through this tool.",
"type": "string"
},
"label": {
"description": "issue_code only: a note shown with the subject in list. Not a credential.",
"type": "string"
},
"limit": {
"description": "Most records in one page. audit defaults to 50, maximum 256. candidates defaults to 100, maximum 500.",
"maximum": 500,
"minimum": 1,
"type": "integer"
},
"mode": {
"description": "maintenance_set for center only; Admin required.",
"enum": [
"maintain",
"revocations_only",
"disabled"
],
"type": "string"
},
"overrides": {
"additionalProperties": false,
"description": "maintenance_set: required complete replacement; {} clears explicit values. Node targets require a bound managed node with a verified root.",
"properties": {
"maintenanceScanSeconds": {
"description": "Fallback inspection interval in seconds.",
"maximum": 3600,
"minimum": 30,
"type": "integer"
},
"peerLeaseTtlSeconds": {
"description": "Peer authorization lease duration in seconds.",
"maximum": 2592000,
"minimum": 3600,
"type": "integer"
}
},
"type": "object"
},
"reason": {
"description": "revoke only: recorded with the revocation for audit and display. Default administrator.",
"enum": [
"administrator",
"owner_revoked"
],
"type": "string"
},
"role": {
"description": "issue_code and set_role: the most the subject may do on any server in its scope. admin is granted only with the scope all.",
"enum": [
"admin",
"ops",
"read_only"
],
"type": "string"
},
"scope": {
"description": "issue_code and set_scope: the servers the subject may see. {\"kind\":\"all\"} is every server; {\"kind\":\"listed\",\"groups\":[...],\"servers\":[...]} is the named center groups and catalog servers and nothing else. The role admin is granted only with kind all.",
"properties": {
"groups": {
"description": "kind=listed: center group names whose members are in scope. Required with listed; may be empty.",
"items": {
"type": "string"
},
"type": "array"
},
"kind": {
"description": "all: every server. listed: only what groups and servers name.",
"enum": [
"all",
"listed"
],
"type": "string"
},
"servers": {
"description": "kind=listed: catalog server names in scope. Required with listed; may be empty.",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"kind"
],
"type": "object"
},
"subject": {
"description": "Subject id, 32 hexadecimal characters, as list and whoami return it. Required by set_role, set_scope, freeze, unfreeze, revoke, bind_device and candidates. With audit, lists only this subject's rows.",
"type": "string"
},
"target": {
"additionalProperties": false,
"description": "maintenance_get/set: policy scope to read or update.",
"properties": {
"id": {
"description": "Cluster ID or node UUID; required for cluster/node, omitted for center.",
"type": "string"
},
"kind": {
"description": "Policy level: center, cluster or node.",
"enum": [
"center",
"cluster",
"node"
],
"type": "string"
}
},
"required": [
"kind"
],
"type": "object"
},
"ttlMinutes": {
"default": 15,
"description": "issue_code only: minutes until an unused code expires. Default 15.",
"minimum": 0,
"type": "integer"
}
},
"required": [
"action"
],
"type": "object"
}ssh_credential_manage管理登录凭据与证书
Move catalog servers from static SSH credentials to per-server SSH certificates signed by the center, register low-privilege accounts, and rotate static keys and CAs. Admin only; needs a center. plan and verify read the server's authorized-keys file. verify records confirmed changes at the center. Other remote actions can write the server's authorized-keys files regardless of its SummerSSH mode. manualMaintenance keeps those file changes manual. Each action on each server runs over one SSH session of its own, closed when the action ends: at ca and ca-only it logs in as the catalog's login account with a short certificate the center issues for that action alone, at static with the server's own credentials. Certificate lifetime and revocation delivery bound only new logins: no tier change, rotation, revocation or expiry ends an SSH session already established. sshd enforces only PTY, port forwarding and the jump forced command; readonly and restricted modes on the same account remain SummerSSH policy.
输入参数
action is required. Every action but policy takes exactly one of server, servers or group (a center group, or all) and handles the servers one at a time. plan and apply take targetTier ca or ca-only; omitted, the server's policy tier is used, and plan falls back to ca. ca-only needs a registered break-glass key or a waiver, and every entry for the same account at ca-only already or in the same call. Where the remote file agent is missing, apply installs it over that session; on a manualMaintenance server, or when that install fails, apply creates the CA keys and returns the lines to install by hand, and verify then proves and records them. plan, verify and a manualMaintenance server read the file by command and install nothing. On a jump, apply also installs the line of each edge it lacks, replaces the line of an edge whose next hop's address changed, and removes SummerSSH's lines for next hops it no longer serves. breakGlass needs publicKey or waive=true. settings needs at least one of manualMaintenance, sudoDelivery or targetCertValiditySeconds. targetCertValiditySeconds accepts an integer from 300 to 900 seconds for new target certificates. policy needs scope, name for a group, and targetTier; servers added later with ssh_server_manage move to it. accounts needs mode, account and attestation on a server at ca or ca-only: the account's own authorized-keys file gets the CA line without options, and a certificate login as the account proves it. attestation is the administrator's statement of how the server bounds the account; the program's checks (exists, not uid 0, not in Administrators, wheel, sudo or admin, sudo rules where readable) do not prove its privileges match the mode. rotate takes optional confirmRemoveUnmanaged; it applies at static and ca and does nothing at ca-only. Passwords are only listed. rotateCa needs role, and nextHop for jump; it runs in two phases: new lines installed and proven on every account, one commit that retires the old generation, then the old lines removed.
返回结果与后续处理
results has one entry per server with success and error. apply reports tierBefore, tierAfter, the lines added or removed with their file receipt, and edges: one per next hop changed when the server is a jump, each with its own success and replacedLines for a moved next hop, or incompatible with the reason, plus one staleLines entry for the lines of next hops no longer served. A failed server keeps its tier and loses the lines this call added. If the center's answer to a record step was lost, the line stays and the error says so; run plan before retrying. plan lists add, remove (static keys for ca-only, and edge lines apply replaces or removes), incompatible, blocked (why apply would stop) and warnings. verify reports confirmed retirements in retiredStaticKeys and old fingerprints still in the file with matchingLines in pendingStaticKeys. Unmanaged keys and password login are named, never removed. A receipt with helper=false was read by command. accounts reports privilegesProven=false. rotate reports the old and new key fingerprints, never the key; an old line SummerSSH did not install stays unless confirmRemoveUnmanaged. rotateCa reports each account's proof; once the new generation is committed, an old line that could not be removed is only a warning, since its CA signs nothing any more. settings reports the values recorded.
调用示例
{
"action": "plan",
"server": "web-a",
"targetTier": "ca"
}参数说明
| 字段 | 类型与默认值 | 说明 |
|---|---|---|
| account | string | accounts: an existing account on the server, not the login account and not the other mode's account. It must not have uid 0 or be in Administrators, wheel, sudo or admin. SummerSSH does not create it. |
| action必填 | stringplan · apply · verify · policy · breakGlass · accounts · rotate · rotateCa · settings | plan: what apply would do, changing nothing. apply: move to targetTier and bring the server's jump edges up to date. verify: prove and record lines installed by hand, and record the retirement of replaced login keys whose lines are absent. policy: set the target tier of the catalog or a group. breakGlass: register an emergency public key, or waive one. accounts: register the low-privilege account readonly or restricted callers log in as. rotate: replace the stored static login key. rotateCa: move the target CA or one jump edge's CA to a new generation. settings records manualMaintenance, sudoDelivery or targetCertValiditySeconds in the center catalog. |
| attestation | string | accounts, required: how the server itself bounds this account's reads or commands, such as a restricted shell, ForceCommand, read-only mounts or sudoers limits. Recorded in the center's audit. SummerSSH's checks do not prove the account's privileges match the mode. |
| confirmRemoveUnmanaged | boolean默认 false | rotate: also take out the old key's line when SummerSSH did not install it. That key may be in use elsewhere; without this its line stays and is reported. |
| group | string | A center group name, or all for every server this caller can see. |
| manualMaintenance | boolean | settings: true keeps SummerSSH from writing to the server; apply then returns the lines for a person to install and verify records them. Omitted, unchanged. |
| mode | stringreadonly · restricted | accounts: the mode whose callers log in as account. Each mode has its own account; neither stands in for the other. |
| name | string | policy with scope=group: the center group's name. |
| nextHop | string | rotateCa with role=jump: the catalog server the edge reaches. |
| publicKey | string | breakGlass: an OpenSSH public key such as ssh-ed25519 AAAA...; keep its private key offline. SummerSSH never removes or rotates this line. |
| role | stringtarget · jump | rotateCa: target for the server's own CA, on the login account and every registered low-privilege account; jump for the CA of the edge to nextHop. |
| scope | stringcatalog · group | policy: catalog for every server, group for the members of name. |
| server | string | One catalog server name from ssh_list_servers. Give exactly one of server, servers or group. |
| servers | array | Catalog server names, handled one at a time in this order. |
| sudoDelivery | stringnone · admin | settings: who receives the server's sudo password at ca and ca-only. none: nobody; admin: only callers whose effective access to this server is unrestricted. Omitted, unchanged. At static it has no effect until the server moves to ca. |
| targetCertValiditySeconds | integer | settings sets the time from issuance to expiry for new target SSH certificates. A new registration defaults to 300 seconds. Omit to keep the recorded value. |
| targetTier | stringstatic · ca · ca-only | plan and apply: ca or ca-only; omitted, the server's policy tier. A server is never moved back to static. policy: the tier servers in scope move to. |
| waive | boolean默认 false | breakGlass: true records that the server goes to ca-only without an emergency key. |
查看完整 JSON Schema
{
"additionalProperties": true,
"examples": [
{
"action": "plan",
"server": "web-a",
"targetTier": "ca"
}
],
"properties": {
"account": {
"description": "accounts: an existing account on the server, not the login account and not the other mode's account. It must not have uid 0 or be in Administrators, wheel, sudo or admin. SummerSSH does not create it.",
"type": "string"
},
"action": {
"description": "plan: what apply would do, changing nothing. apply: move to targetTier and bring the server's jump edges up to date. verify: prove and record lines installed by hand, and record the retirement of replaced login keys whose lines are absent. policy: set the target tier of the catalog or a group. breakGlass: register an emergency public key, or waive one. accounts: register the low-privilege account readonly or restricted callers log in as. rotate: replace the stored static login key. rotateCa: move the target CA or one jump edge's CA to a new generation. settings records manualMaintenance, sudoDelivery or targetCertValiditySeconds in the center catalog.",
"enum": [
"plan",
"apply",
"verify",
"policy",
"breakGlass",
"accounts",
"rotate",
"rotateCa",
"settings"
],
"type": "string"
},
"attestation": {
"description": "accounts, required: how the server itself bounds this account's reads or commands, such as a restricted shell, ForceCommand, read-only mounts or sudoers limits. Recorded in the center's audit. SummerSSH's checks do not prove the account's privileges match the mode.",
"type": "string"
},
"confirmRemoveUnmanaged": {
"default": false,
"description": "rotate: also take out the old key's line when SummerSSH did not install it. That key may be in use elsewhere; without this its line stays and is reported.",
"type": "boolean"
},
"group": {
"description": "A center group name, or all for every server this caller can see.",
"type": "string"
},
"manualMaintenance": {
"description": "settings: true keeps SummerSSH from writing to the server; apply then returns the lines for a person to install and verify records them. Omitted, unchanged.",
"type": "boolean"
},
"mode": {
"description": "accounts: the mode whose callers log in as account. Each mode has its own account; neither stands in for the other.",
"enum": [
"readonly",
"restricted"
],
"type": "string"
},
"name": {
"description": "policy with scope=group: the center group's name.",
"type": "string"
},
"nextHop": {
"description": "rotateCa with role=jump: the catalog server the edge reaches.",
"type": "string"
},
"publicKey": {
"description": "breakGlass: an OpenSSH public key such as ssh-ed25519 AAAA...; keep its private key offline. SummerSSH never removes or rotates this line.",
"type": "string"
},
"role": {
"description": "rotateCa: target for the server's own CA, on the login account and every registered low-privilege account; jump for the CA of the edge to nextHop.",
"enum": [
"target",
"jump"
],
"type": "string"
},
"scope": {
"description": "policy: catalog for every server, group for the members of name.",
"enum": [
"catalog",
"group"
],
"type": "string"
},
"server": {
"description": "One catalog server name from ssh_list_servers. Give exactly one of server, servers or group.",
"type": "string"
},
"servers": {
"description": "Catalog server names, handled one at a time in this order.",
"items": {
"type": "string"
},
"type": "array"
},
"sudoDelivery": {
"description": "settings: who receives the server's sudo password at ca and ca-only. none: nobody; admin: only callers whose effective access to this server is unrestricted. Omitted, unchanged. At static it has no effect until the server moves to ca.",
"enum": [
"none",
"admin"
],
"type": "string"
},
"targetCertValiditySeconds": {
"description": "settings sets the time from issuance to expiry for new target SSH certificates. A new registration defaults to 300 seconds. Omit to keep the recorded value.",
"maximum": 900,
"minimum": 300,
"type": "integer"
},
"targetTier": {
"description": "plan and apply: ca or ca-only; omitted, the server's policy tier. A server is never moved back to static. policy: the tier servers in scope move to.",
"enum": [
"static",
"ca",
"ca-only"
],
"type": "string"
},
"waive": {
"default": false,
"description": "breakGlass: true records that the server goes to ca-only without an emergency key.",
"type": "boolean"
}
},
"required": [
"action"
],
"type": "object"
}ssh_history只读查看命令历史
Read recent command history recorded on this MCP computer. Use it to locate prior commands, not to prove current remote state.
输入参数
Optional server/command search filters, success boolean and limit (default 20, maximum 1000). Does not fetch shell history from a remote server.
返回结果与后续处理
Returns entries with recorded command, timestamp and outcome, oldest first. Standard input such as a sudo password is never recorded. The file is rotated once at 4 MiB, so older entries age out. Historical success may be stale; inspect the target before deciding whether a write must run again.
调用示例
{
"limit": 10
}参数说明
| 字段 | 类型与默认值 | 说明 |
|---|---|---|
| limit | integer默认 20 | Maximum retained history entries returned, newest window; 0 returns no entries. |
| search | string | Case-insensitive substring in recorded command text; not remote shell-history search. |
| server | string | Case-insensitive substring filter on recorded server names. |
| success | boolean | Omit for all outcomes; true/false filters the recorded command success. |
查看完整 JSON Schema
{
"additionalProperties": true,
"examples": [
{
"limit": 10
}
],
"properties": {
"limit": {
"default": 20,
"description": "Maximum retained history entries returned, newest window; 0 returns no entries.",
"maximum": 1000,
"minimum": 0,
"type": "integer"
},
"search": {
"description": "Case-insensitive substring in recorded command text; not remote shell-history search.",
"type": "string"
},
"server": {
"description": "Case-insensitive substring filter on recorded server names.",
"type": "string"
},
"success": {
"description": "Omit for all outcomes; true/false filters the recorded command success.",
"type": "boolean"
}
},
"required": [],
"type": "object"
}命令、后台任务与会话
ssh_execute执行单机命令
Run one command on one catalog server. Start with ssh_list_servers; use ssh_execute_group for the same command on several servers.
输入参数
server is the returned name and cwd belongs to that server. POSIX commands run under sh -lc; Windows commands use noninteractive Windows PowerShell 5.1. Without a helper, a Windows PowerShell 5.1 login runs in the SSH-started process with its profiles loaded; cmd and PowerShell 7 logins start a separate Windows PowerShell 5.1 with -NoProfile. timeout is milliseconds: 10000 = 10 seconds; omit for 120000, maximum 300000. maxOutputBytes bounds the returned part of each stream (default 65536). A readonly server refuses it; a restricted server runs only commands its allow patterns match and no deny pattern matches. Use ssh_execute_sudo when elevation is required.
返回结果与后续处理
Read code, stdout and stderr; code=0 means the command exited successfully, not that the whole deployment is verified. pty=true uses a terminal (cols=120, rows=40 by default), merges stderr into stdout and cannot use a sandbox. timedOut=true comes with code 124. When truncated=true, stdout/stderr hold the start and end around one marker line, stdoutPath/stderrPath name the complete output saved on this MCP computer, and errorLines lists up to 20 error-looking lines with their line numbers. A timeout/disconnect may leave the outcome unknown: inspect the remote state before retrying a write.
调用示例
{
"command": "hostname",
"server": "web-a",
"timeout": 10000
}参数说明
| 字段 | 类型与默认值 | 说明 |
|---|---|---|
| cols | integer默认 120 | Terminal columns when pty is true. |
| command必填 | string | Command interpreted by the target server's shell. Use POSIX syntax for POSIX targets and PowerShell for platform=windows. The command can change remote state; scope it to the user's request. |
| cwd | string | Working directory on the target server; omitted uses its configured default directory or SSH login directory. |
| maxOutputBytes | integer默认 65536 | Bytes of each output stream returned in the result, split evenly between its start and its end. Default 65536, range 4096 to 1048576; values outside the range are clamped. Longer output is saved whole on this MCP computer and the result names the file. |
| pty | boolean默认 false | Allocate a terminal before execution, merging stderr into stdout. Cannot be used with a sandbox. |
| rows | integer默认 40 | Terminal rows when pty is true. |
| sandbox | stringoff · workspace · process | Optional execution sandbox. workspace needs Linux and an explicit cwd when the server has no sandbox. process needs Windows PowerShell 5.1. The server's required profile always applies. |
| server必填 | string | Exact server name returned by ssh_list_servers. Do not pass a host/IP unless it is the registered name. |
| timeout | integer默认 120000 | Timeout in milliseconds, not seconds. Use 10000 for 10 seconds or 30000 for 30 seconds. Default 120000 ms; capped at 300000 ms. 0 disables the command deadline and remote timeout wrapper; connection-establishment limits still apply. Prefer omission for the normal bounded default. A timeout does not prove a remote write had no effect. |
| writablePaths | array | Additional writable Linux directories for the workspace sandbox. Use absolute paths or paths starting with ~/. A server's configured writable roots bound every declared directory. |
查看完整 JSON Schema
{
"additionalProperties": true,
"examples": [
{
"command": "hostname",
"server": "web-a",
"timeout": 10000
}
],
"properties": {
"cols": {
"default": 120,
"description": "Terminal columns when pty is true.",
"maximum": 4294967295,
"minimum": 0,
"type": "integer"
},
"command": {
"description": "Command interpreted by the target server's shell. Use POSIX syntax for POSIX targets and PowerShell for platform=windows. The command can change remote state; scope it to the user's request.",
"type": "string"
},
"cwd": {
"description": "Working directory on the target server; omitted uses its configured default directory or SSH login directory.",
"type": "string"
},
"maxOutputBytes": {
"default": 65536,
"description": "Bytes of each output stream returned in the result, split evenly between its start and its end. Default 65536, range 4096 to 1048576; values outside the range are clamped. Longer output is saved whole on this MCP computer and the result names the file.",
"maximum": 1048576,
"minimum": 4096,
"type": "integer"
},
"pty": {
"default": false,
"description": "Allocate a terminal before execution, merging stderr into stdout. Cannot be used with a sandbox.",
"type": "boolean"
},
"rows": {
"default": 40,
"description": "Terminal rows when pty is true.",
"maximum": 4294967295,
"minimum": 0,
"type": "integer"
},
"sandbox": {
"description": "Optional execution sandbox. workspace needs Linux and an explicit cwd when the server has no sandbox. process needs Windows PowerShell 5.1. The server's required profile always applies.",
"enum": [
"off",
"workspace",
"process"
],
"type": "string"
},
"server": {
"description": "Exact server name returned by ssh_list_servers. Do not pass a host/IP unless it is the registered name.",
"type": "string"
},
"timeout": {
"default": 120000,
"description": "Timeout in milliseconds, not seconds. Use 10000 for 10 seconds or 30000 for 30 seconds. Default 120000 ms; capped at 300000 ms. 0 disables the command deadline and remote timeout wrapper; connection-establishment limits still apply. Prefer omission for the normal bounded default. A timeout does not prove a remote write had no effect.",
"maximum": 300000,
"minimum": 0,
"type": "integer"
},
"writablePaths": {
"description": "Additional writable Linux directories for the workspace sandbox. Use absolute paths or paths starting with ~/. A server's configured writable roots bound every declared directory.",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"server",
"command"
],
"type": "object"
}ssh_execute_sudo执行 sudo 命令
Run one authorized command with sudo on a POSIX catalog server. Use ssh_execute when elevation is unnecessary.
输入参数
server, command; cwd is remote. Only a server in unrestricted mode accepts it. Uses the configured sudo credential or passwordless sudo. password is an optional override; never ask the user to paste secrets into chat. timeout uses milliseconds, default 120000, maximum 300000. maxOutputBytes works as in ssh_execute.
返回结果与后续处理
Read code/stdout/stderr as for ssh_execute, including truncated output, and verify the intended state. pty=true allocates a terminal (cols=120, rows=40 by default), disables echo and merges stderr into stdout. PTY and sandbox cannot be combined. Elevation or timeout failure does not authorize changing sudo policy or replaying a write.
调用示例
{
"command": "systemctl is-active nginx",
"server": "web-a",
"timeout": 10000
}参数说明
| 字段 | 类型与默认值 | 说明 |
|---|---|---|
| cols | integer默认 120 | Terminal columns when pty is true. |
| command必填 | string | Command interpreted by the target server's shell. Use POSIX syntax for POSIX targets and PowerShell for platform=windows. The command can change remote state; scope it to the user's request. |
| cwd | string | Working directory on the target server; omitted uses its configured default directory or SSH login directory. |
| maxOutputBytes | integer默认 65536 | Bytes of each output stream returned in the result, split evenly between its start and its end. Default 65536, range 4096 to 1048576; values outside the range are clamped. Longer output is saved whole on this MCP computer and the result names the file. |
| password | string | Optional sudo password override. Omit to use the configured sudo credential or passwordless sudo; never copy secrets into chat or logs. |
| pty | boolean默认 false | Allocate a terminal before execution, merging stderr into stdout. Cannot be used with a sandbox. |
| rows | integer默认 40 | Terminal rows when pty is true. |
| server必填 | string | Exact server name returned by ssh_list_servers. Do not pass a host/IP unless it is the registered name. |
| timeout | integer默认 120000 | Timeout in milliseconds, not seconds. Use 10000 for 10 seconds or 30000 for 30 seconds. Default 120000 ms; capped at 300000 ms. 0 disables the command deadline and remote timeout wrapper; connection-establishment limits still apply. Prefer omission for the normal bounded default. A timeout does not prove a remote write had no effect. |
查看完整 JSON Schema
{
"additionalProperties": true,
"examples": [
{
"command": "systemctl is-active nginx",
"server": "web-a",
"timeout": 10000
}
],
"properties": {
"cols": {
"default": 120,
"description": "Terminal columns when pty is true.",
"maximum": 4294967295,
"minimum": 0,
"type": "integer"
},
"command": {
"description": "Command interpreted by the target server's shell. Use POSIX syntax for POSIX targets and PowerShell for platform=windows. The command can change remote state; scope it to the user's request.",
"type": "string"
},
"cwd": {
"description": "Working directory on the target server; omitted uses its configured default directory or SSH login directory.",
"type": "string"
},
"maxOutputBytes": {
"default": 65536,
"description": "Bytes of each output stream returned in the result, split evenly between its start and its end. Default 65536, range 4096 to 1048576; values outside the range are clamped. Longer output is saved whole on this MCP computer and the result names the file.",
"maximum": 1048576,
"minimum": 4096,
"type": "integer"
},
"password": {
"description": "Optional sudo password override. Omit to use the configured sudo credential or passwordless sudo; never copy secrets into chat or logs.",
"type": "string"
},
"pty": {
"default": false,
"description": "Allocate a terminal before execution, merging stderr into stdout. Cannot be used with a sandbox.",
"type": "boolean"
},
"rows": {
"default": 40,
"description": "Terminal rows when pty is true.",
"maximum": 4294967295,
"minimum": 0,
"type": "integer"
},
"server": {
"description": "Exact server name returned by ssh_list_servers. Do not pass a host/IP unless it is the registered name.",
"type": "string"
},
"timeout": {
"default": 120000,
"description": "Timeout in milliseconds, not seconds. Use 10000 for 10 seconds or 30000 for 30 seconds. Default 120000 ms; capped at 300000 ms. 0 disables the command deadline and remote timeout wrapper; connection-establishment limits still apply. Prefer omission for the normal bounded default. A timeout does not prove a remote write had no effect.",
"maximum": 300000,
"minimum": 0,
"type": "integer"
}
},
"required": [
"server",
"command"
],
"type": "object"
}ssh_execute_group多台机器批量执行命令
Run the same command on an explicit set of catalog servers in one call. Prefer this over separate ssh_execute calls for independent targets.
输入参数
Provide servers from ssh_list_servers, or one existing group. Targets retain input order and duplicates are removed. strategy=parallel runs up to concurrency targets (1–32, group default or 8); sequential runs one at a time; rolling adds delay in milliseconds. canary uses the group default or false: the first target must exit cleanly with code 0 before others start. stopOnError prevents new dispatch after failure; running commands continue.
返回结果与后续处理
Inspect every server entry: result holds that server's ssh_execute result, error holds why it did not run. canaryAborted=true means the first target failed; all remaining targets report notStarted. The result includes canary and concurrency. Successful targets stay changed if another fails. Retry only targets whose state is known.
调用示例
{
"command": "hostname",
"servers": [
"web-a",
"web-b"
],
"strategy": "parallel",
"timeout": 10000
}参数说明
| 字段 | 类型与默认值 | 说明 |
|---|---|---|
| canary | boolean | Use the group default, otherwise false. Run the first target alone; only a clean exit code 0 starts the others. |
| command必填 | string | Command interpreted by the target server's shell. Use POSIX syntax for POSIX targets and PowerShell for platform=windows. The command can change remote state; scope it to the user's request. |
| concurrency | integer | Maximum parallel commands. Use the group default, otherwise 8. |
| cwd | string | Working directory on the target server; omitted uses its configured default directory or SSH login directory. |
| delay | integer | Rolling delay in milliseconds: 1000 = 1 second. Omit for group setting or 0; ignored by parallel/sequential. |
| group | string | Existing local group from ssh_group_manage. Required when servers is omitted/empty. |
| maxOutputBytes | integer默认 65536 | Bytes of each output stream returned in the result, split evenly between its start and its end. Default 65536, range 4096 to 1048576; values outside the range are clamped. Longer output is saved whole on this MCP computer and the result names the file. |
| sandbox | stringoff · workspace · process | Optional execution sandbox. workspace needs Linux and an explicit cwd when the server has no sandbox. process needs Windows PowerShell 5.1. The server's required profile always applies. |
| servers | array | Explicit target names from ssh_list_servers. Prefer this for a fixed task scope; a nonempty list takes precedence over group. |
| stopOnError | boolean | Default false, or the group setting. A failure prevents dispatching remaining targets; already running commands continue. |
| strategy | stringparallel · sequential · rolling | Default parallel, or the group's configured strategy. Targets retain input order with duplicates removed. parallel starts up to concurrency targets; rolling adds delay between sequential targets. |
| timeout | integer默认 120000 | Timeout in milliseconds, not seconds. Use 10000 for 10 seconds or 30000 for 30 seconds. Default 120000 ms; capped at 300000 ms. 0 disables the command deadline and remote timeout wrapper; connection-establishment limits still apply. Prefer omission for the normal bounded default. A timeout does not prove a remote write had no effect. |
| writablePaths | array | Additional writable Linux directories for the workspace sandbox. Use absolute paths or paths starting with ~/. A server's configured writable roots bound every declared directory. |
查看完整 JSON Schema
{
"additionalProperties": true,
"examples": [
{
"command": "hostname",
"servers": [
"web-a",
"web-b"
],
"strategy": "parallel",
"timeout": 10000
}
],
"properties": {
"canary": {
"description": "Use the group default, otherwise false. Run the first target alone; only a clean exit code 0 starts the others.",
"type": "boolean"
},
"command": {
"description": "Command interpreted by the target server's shell. Use POSIX syntax for POSIX targets and PowerShell for platform=windows. The command can change remote state; scope it to the user's request.",
"type": "string"
},
"concurrency": {
"description": "Maximum parallel commands. Use the group default, otherwise 8.",
"maximum": 32,
"minimum": 1,
"type": "integer"
},
"cwd": {
"description": "Working directory on the target server; omitted uses its configured default directory or SSH login directory.",
"type": "string"
},
"delay": {
"description": "Rolling delay in milliseconds: 1000 = 1 second. Omit for group setting or 0; ignored by parallel/sequential.",
"minimum": 0,
"type": "integer"
},
"group": {
"description": "Existing local group from ssh_group_manage. Required when servers is omitted/empty.",
"type": "string"
},
"maxOutputBytes": {
"default": 65536,
"description": "Bytes of each output stream returned in the result, split evenly between its start and its end. Default 65536, range 4096 to 1048576; values outside the range are clamped. Longer output is saved whole on this MCP computer and the result names the file.",
"maximum": 1048576,
"minimum": 4096,
"type": "integer"
},
"sandbox": {
"description": "Optional execution sandbox. workspace needs Linux and an explicit cwd when the server has no sandbox. process needs Windows PowerShell 5.1. The server's required profile always applies.",
"enum": [
"off",
"workspace",
"process"
],
"type": "string"
},
"servers": {
"description": "Explicit target names from ssh_list_servers. Prefer this for a fixed task scope; a nonempty list takes precedence over group.",
"items": {
"type": "string"
},
"type": "array"
},
"stopOnError": {
"description": "Default false, or the group setting. A failure prevents dispatching remaining targets; already running commands continue.",
"type": "boolean"
},
"strategy": {
"description": "Default parallel, or the group's configured strategy. Targets retain input order with duplicates removed. parallel starts up to concurrency targets; rolling adds delay between sequential targets.",
"enum": [
"parallel",
"sequential",
"rolling"
],
"type": "string"
},
"timeout": {
"default": 120000,
"description": "Timeout in milliseconds, not seconds. Use 10000 for 10 seconds or 30000 for 30 seconds. Default 120000 ms; capped at 300000 ms. 0 disables the command deadline and remote timeout wrapper; connection-establishment limits still apply. Prefer omission for the normal bounded default. A timeout does not prove a remote write had no effect.",
"maximum": 300000,
"minimum": 0,
"type": "integer"
},
"writablePaths": {
"description": "Additional writable Linux directories for the workspace sandbox. Use absolute paths or paths starting with ~/. A server's configured writable roots bound every declared directory.",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"command"
],
"type": "object"
}ssh_job运行断开不中断的后台长任务
Start a detached remote command or inspect its retained state and output. Start uses the command policy, confirmation and sandbox checks.
输入参数
action and server are required. start takes command, optional cwd/sandbox/writablePaths/maxRuntimeMs/logLimitBytes. status/output/cancel require jobId. output supports stream, offset and maxBytes. list reads the job directory.
返回结果与后续处理
A job requires the 7.0 helper. If its start receipt is lost, query the returned jobId; do not resend start. Cancelling the MCP start call after JobStarted does not stop the detached command. lost means its outcome is unknown and needs manual investigation.
调用示例
{
"action": "start",
"command": "./build.sh",
"cwd": "/srv/app",
"maxRuntimeMs": 3600000,
"server": "web-a"
}参数说明
| 字段 | 类型与默认值 | 说明 |
|---|---|---|
| action必填 | stringstart · status · output · list · cancel | start creates a detached remote job; the other actions inspect or cancel an existing job. |
| command | string | Command interpreted by the target server's shell. Use POSIX syntax for POSIX targets and PowerShell for platform=windows. The command can change remote state; scope it to the user's request. |
| cwd | string | Working directory on the target server; omitted uses its configured default directory or SSH login directory. |
| jobId | string | Required for status/output/cancel. start generates its own ID after confirmation. |
| logLimitBytes | integer默认 67108864 | Maximum retained bytes per output stream; excess is drained and discarded. |
| maxBytes | integer默认 65536 | 详见下方 JSON Schema。 |
| maxRuntimeMs | integer | Remote execution limit in milliseconds; omitted or 0 has no time limit. |
| offset | integer默认 0 | Byte offset into a retained output stream. |
| sandbox | stringoff · workspace · process | Optional execution sandbox. workspace needs Linux and an explicit cwd when the server has no sandbox. process needs Windows PowerShell 5.1. The server's required profile always applies. |
| server必填 | string | Exact server name returned by ssh_list_servers. Do not pass a host/IP unless it is the registered name. |
| stream | stringstdout · stderr | output stream, default stdout. |
| writablePaths | array | Additional writable Linux directories for the workspace sandbox. Use absolute paths or paths starting with ~/. A server's configured writable roots bound every declared directory. |
查看完整 JSON Schema
{
"additionalProperties": true,
"examples": [
{
"action": "start",
"command": "./build.sh",
"cwd": "/srv/app",
"maxRuntimeMs": 3600000,
"server": "web-a"
}
],
"properties": {
"action": {
"description": "start creates a detached remote job; the other actions inspect or cancel an existing job.",
"enum": [
"start",
"status",
"output",
"list",
"cancel"
],
"type": "string"
},
"command": {
"description": "Command interpreted by the target server's shell. Use POSIX syntax for POSIX targets and PowerShell for platform=windows. The command can change remote state; scope it to the user's request.",
"type": "string"
},
"cwd": {
"description": "Working directory on the target server; omitted uses its configured default directory or SSH login directory.",
"type": "string"
},
"jobId": {
"description": "Required for status/output/cancel. start generates its own ID after confirmation.",
"pattern": "^[0-9a-fA-F]{32}$",
"type": "string"
},
"logLimitBytes": {
"default": 67108864,
"description": "Maximum retained bytes per output stream; excess is drained and discarded.",
"maximum": 67108864,
"minimum": 0,
"type": "integer"
},
"maxBytes": {
"default": 65536,
"maximum": 1048576,
"minimum": 0,
"type": "integer"
},
"maxRuntimeMs": {
"description": "Remote execution limit in milliseconds; omitted or 0 has no time limit.",
"minimum": 0,
"type": "integer"
},
"offset": {
"default": 0,
"description": "Byte offset into a retained output stream.",
"minimum": 0,
"type": "integer"
},
"sandbox": {
"description": "Optional execution sandbox. workspace needs Linux and an explicit cwd when the server has no sandbox. process needs Windows PowerShell 5.1. The server's required profile always applies.",
"enum": [
"off",
"workspace",
"process"
],
"type": "string"
},
"server": {
"description": "Exact server name returned by ssh_list_servers. Do not pass a host/IP unless it is the registered name.",
"type": "string"
},
"stream": {
"description": "output stream, default stdout.",
"enum": [
"stdout",
"stderr"
],
"type": "string"
},
"writablePaths": {
"description": "Additional writable Linux directories for the workspace sandbox. Use absolute paths or paths starting with ~/. A server's configured writable roots bound every declared directory.",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"action",
"server"
],
"type": "object"
}ssh_interrupt查看或停止正在跑的命令
List the commands this SummerSSH instance is still running, or stop one. Use it for a command that hangs, that was started with timeout=0, or that is no longer wanted.
输入参数
action=list takes nothing else. action=interrupt takes execId, from list or from a command result. Both cover commands this MCP client started; allClients=true extends them to commands of other MCP clients attached to the same SummerSSH instance, whose work that stops. An instance with another profile is a different one and is not reached.
返回结果与后续处理
list returns executions with execId, server, tool and startedAt. interrupt returns state=requested as soon as the stop is asked for; how far it got is in the termination object of the command's own result, or of a later interrupt with the same execId, which returns state=ended with code and termination. state=not_active means no such command runs here and no result is kept: only the last 64 results are kept, each for at most 10 minutes, and a restart forgets them. Read termination.mechanism, scope and confirmed before assuming descendants are gone; a request, an exit code or a disconnected channel alone does not confirm cleanup.
调用示例
{
"action": "interrupt",
"execId": "x1f3a-7"
}参数说明
| 字段 | 类型与默认值 | 说明 |
|---|---|---|
| action必填 | stringlist · interrupt | list returns the running commands; interrupt asks the one named by execId to stop. |
| allClients | boolean默认 false | Also list, or stop, commands that other MCP clients attached to the same SummerSSH instance started. Stopping one ends that client's call. |
| execId | string | Required for interrupt: the execId from list or from a command result. Never invent one. |
查看完整 JSON Schema
{
"additionalProperties": true,
"examples": [
{
"action": "interrupt",
"execId": "x1f3a-7"
}
],
"properties": {
"action": {
"description": "list returns the running commands; interrupt asks the one named by execId to stop.",
"enum": [
"list",
"interrupt"
],
"type": "string"
},
"allClients": {
"default": false,
"description": "Also list, or stop, commands that other MCP clients attached to the same SummerSSH instance started. Stopping one ends that client's call.",
"type": "boolean"
},
"execId": {
"description": "Required for interrupt: the execId from list or from a command result. Never invent one.",
"type": "string"
}
},
"required": [
"action"
],
"type": "object"
}ssh_session_start开启带固定目录的会话
Create a client-owned command context for repeated commands with one server and fixed cwd. This is not an interactive terminal or a persistent shell.
输入参数
server from ssh_list_servers; optional remote cwd and display name. Only a server in unrestricted mode accepts a context, because what is sent to it is not checked against command patterns. For a single command, use ssh_execute directly.
返回结果与后续处理
Save session_id for ssh_session_send/close. Shell variables, cd and background processes do not persist between sends. An open context defers automatic updates; close it when finished.
调用示例
{
"cwd": "/srv/app",
"server": "web-a"
}参数说明
| 字段 | 类型与默认值 | 说明 |
|---|---|---|
| cwd | string | Fixed remote working directory used for every send. A cd command in one send does not change later sends. |
| name | string | Optional label for this client's context. |
| server必填 | string | Exact server name returned by ssh_list_servers. Do not pass a host/IP unless it is the registered name. |
查看完整 JSON Schema
{
"additionalProperties": true,
"examples": [
{
"cwd": "/srv/app",
"server": "web-a"
}
],
"properties": {
"cwd": {
"description": "Fixed remote working directory used for every send. A cd command in one send does not change later sends.",
"type": "string"
},
"name": {
"description": "Optional label for this client's context.",
"type": "string"
},
"server": {
"description": "Exact server name returned by ssh_list_servers. Do not pass a host/IP unless it is the registered name.",
"type": "string"
}
},
"required": [
"server"
],
"type": "object"
}ssh_session_send在会话中发命令
Run a command using a context returned by ssh_session_start.
输入参数
sessionId is the exact returned session_id; command is required. timeout is milliseconds, default 120000, maximum 300000. The context supplies server and fixed cwd; it is not a persistent shell. The server must still be in unrestricted mode.
返回结果与后续处理
Read code/stdout/stderr as for ssh_execute. If the connection dies during a write, inspect its effect before retrying. Close the context with ssh_session_close after the work.
调用示例
{
"command": "pwd",
"sessionId": "session_id_from_start",
"timeout": 10000
}参数说明
| 字段 | 类型与默认值 | 说明 |
|---|---|---|
| command必填 | string | Command interpreted by the target server's shell. Use POSIX syntax for POSIX targets and PowerShell for platform=windows. The command can change remote state; scope it to the user's request. |
| maxOutputBytes | integer默认 65536 | Bytes of each output stream returned in the result, split evenly between its start and its end. Default 65536, range 4096 to 1048576; values outside the range are clamped. Longer output is saved whole on this MCP computer and the result names the file. |
| session | string | Compatibility alias for sessionId; prefer sessionId and do not supply both. |
| sessionId | string | Required unless session alias is used: exact session_id from this client's ssh_session_start/list. Never invent an ID. |
| timeout | integer默认 120000 | Timeout in milliseconds, not seconds. Use 10000 for 10 seconds or 30000 for 30 seconds. Default 120000 ms; capped at 300000 ms. 0 disables the command deadline and remote timeout wrapper; connection-establishment limits still apply. Prefer omission for the normal bounded default. A timeout does not prove a remote write had no effect. |
查看完整 JSON Schema
{
"additionalProperties": true,
"examples": [
{
"command": "pwd",
"sessionId": "session_id_from_start",
"timeout": 10000
}
],
"properties": {
"command": {
"description": "Command interpreted by the target server's shell. Use POSIX syntax for POSIX targets and PowerShell for platform=windows. The command can change remote state; scope it to the user's request.",
"type": "string"
},
"maxOutputBytes": {
"default": 65536,
"description": "Bytes of each output stream returned in the result, split evenly between its start and its end. Default 65536, range 4096 to 1048576; values outside the range are clamped. Longer output is saved whole on this MCP computer and the result names the file.",
"maximum": 1048576,
"minimum": 4096,
"type": "integer"
},
"session": {
"description": "Compatibility alias for sessionId; prefer sessionId and do not supply both.",
"type": "string"
},
"sessionId": {
"description": "Required unless session alias is used: exact session_id from this client's ssh_session_start/list. Never invent an ID.",
"type": "string"
},
"timeout": {
"default": 120000,
"description": "Timeout in milliseconds, not seconds. Use 10000 for 10 seconds or 30000 for 30 seconds. Default 120000 ms; capped at 300000 ms. 0 disables the command deadline and remote timeout wrapper; connection-establishment limits still apply. Prefer omission for the normal bounded default. A timeout does not prove a remote write had no effect.",
"maximum": 300000,
"minimum": 0,
"type": "integer"
}
},
"required": [
"command"
],
"type": "object"
}ssh_session_list只读查看当前会话
List command contexts owned by this MCP client. Use this to recover a returned session ID or identify contexts delaying an update.
输入参数
No arguments lists this client's contexts; server optionally filters their server names.
返回结果与后续处理
Returns sessions with IDs, server, fixed cwd and last command. Other clients' contexts are not included; no persistent shell process is implied.
调用示例
{}参数说明
| 字段 | 类型与默认值 | 说明 |
|---|---|---|
| server | string | Optional server-name filter for resources owned by this MCP client. |
查看完整 JSON Schema
{
"additionalProperties": true,
"examples": [
{}
],
"properties": {
"server": {
"description": "Optional server-name filter for resources owned by this MCP client.",
"type": "string"
}
},
"required": [],
"type": "object"
}ssh_session_close关闭会话
Release one command context owned by this MCP client when its work is finished.
输入参数
sessionId from ssh_session_start/list. The special value all closes all of this client's contexts; use it only when that scope is intended.
返回结果与后续处理
success reports whether the context existed. This releases update blocking; it does not undo prior commands or terminate arbitrary remote processes.
调用示例
{
"sessionId": "session_id_from_start"
}参数说明
| 字段 | 类型与默认值 | 说明 |
|---|---|---|
| session | string | Compatibility alias for sessionId; use one of the two fields. |
| sessionId | string | Exact session_id from start/list. all closes every context owned by this client, so use only for that intended scope. |
查看完整 JSON Schema
{
"additionalProperties": true,
"examples": [
{
"sessionId": "session_id_from_start"
}
],
"properties": {
"session": {
"description": "Compatibility alias for sessionId; use one of the two fields.",
"type": "string"
},
"sessionId": {
"description": "Exact session_id from start/list. all closes every context owned by this client, so use only for that intended scope.",
"type": "string"
}
},
"required": [],
"type": "object"
}文件、复制与同步
ssh_read只读读取远端文本文件
Read a page of a remote text file with line numbers. Use ssh_download for binary files or a full local copy, ssh_search_file to find lines by pattern, ssh_list_dir to locate files.
输入参数
server from ssh_list_servers, remotePath on that server. offset is a 1-based starting line; limit is a line count. Neither is a byte offset.
返回结果与后续处理
Returns line-numbered text and a structured object whose content field contains the identical page, including any truncation notice, alongside file metadata and SHA-256 when available. The helper hashes files up to 64 MiB; SFTP partial reads report sha256Skipped. Use the hash as expectedSha256 for a conditional write/edit, and omit displayed line-number prefixes from edit text.
调用示例
{
"limit": 80,
"offset": 1,
"remotePath": "/srv/app/app.conf",
"server": "web-a"
}参数说明
| 字段 | 类型与默认值 | 说明 |
|---|---|---|
| limit | integer默认 2000 | Maximum lines in this page; default 2000, 0 returns no lines. Use a small page such as 80 for inspection. |
| offset | integer默认 1 | First line, 1-based; 1 starts at the file beginning. Not a byte offset. |
| remotePath必填 | string | Complete path on the selected remote server, not this MCP computer. Prefer an absolute path. |
| server必填 | string | Exact server name returned by ssh_list_servers. Do not pass a host/IP unless it is the registered name. |
查看完整 JSON Schema
{
"additionalProperties": true,
"examples": [
{
"limit": 80,
"offset": 1,
"remotePath": "/srv/app/app.conf",
"server": "web-a"
}
],
"properties": {
"limit": {
"default": 2000,
"description": "Maximum lines in this page; default 2000, 0 returns no lines. Use a small page such as 80 for inspection.",
"minimum": 0,
"type": "integer"
},
"offset": {
"default": 1,
"description": "First line, 1-based; 1 starts at the file beginning. Not a byte offset.",
"minimum": 1,
"type": "integer"
},
"remotePath": {
"description": "Complete path on the selected remote server, not this MCP computer. Prefer an absolute path.",
"type": "string"
},
"server": {
"description": "Exact server name returned by ssh_list_servers. Do not pass a host/IP unless it is the registered name.",
"type": "string"
}
},
"required": [
"server",
"remotePath"
],
"type": "object"
}ssh_write写入或新建远端文本文件
Create or replace a whole remote text file from supplied content. Use ssh_edit for a small change or ssh_upload for an existing local file.
输入参数
server from ssh_list_servers, remotePath is the complete remote filename, content is the full replacement text. createDirs controls missing parent directories. Optional expectedSha256 requires the existing target hash, or absent to create without overwriting.
返回结果与后续处理
Existing content is replaced, not appended. Check the write result and validate the consuming application separately; writing a config does not reload it.
调用示例
{
"content": "hello\n",
"createDirs": true,
"remotePath": "/srv/app/note.txt",
"server": "web-a"
}参数说明
| 字段 | 类型与默认值 | 说明 |
|---|---|---|
| content必填 | string | Entire new text content; overwrites the existing file rather than appending. Empty string intentionally empties it. |
| createDirs | boolean默认 true | Create missing parent directories on the target before writing. False requires them to exist. |
| expectedSha256 | string | Write only when the final target matches this SHA-256, or is absent. |
| remotePath必填 | string | Complete path on the selected remote server, not this MCP computer. Prefer an absolute path. |
| server必填 | string | Exact server name returned by ssh_list_servers. Do not pass a host/IP unless it is the registered name. |
查看完整 JSON Schema
{
"additionalProperties": true,
"examples": [
{
"content": "hello\n",
"createDirs": true,
"remotePath": "/srv/app/note.txt",
"server": "web-a"
}
],
"properties": {
"content": {
"description": "Entire new text content; overwrites the existing file rather than appending. Empty string intentionally empties it.",
"type": "string"
},
"createDirs": {
"default": true,
"description": "Create missing parent directories on the target before writing. False requires them to exist.",
"type": "boolean"
},
"expectedSha256": {
"description": "Write only when the final target matches this SHA-256, or is absent.",
"pattern": "^([0-9a-fA-F]{64}|absent)$",
"type": "string"
},
"remotePath": {
"description": "Complete path on the selected remote server, not this MCP computer. Prefer an absolute path.",
"type": "string"
},
"server": {
"description": "Exact server name returned by ssh_list_servers. Do not pass a host/IP unless it is the registered name.",
"type": "string"
}
},
"required": [
"server",
"remotePath",
"content"
],
"type": "object"
}ssh_edit修改远端文件片段
Replace exact text inside an existing remote file. Read the relevant text with ssh_read first. Use ssh_write only when replacing the entire file is intended.
输入参数
server, remotePath, oldString and newString. Strings are literal, not regex. replaceAll defaults false; multiple matches otherwise fail. Optional expectedSha256 binds both the original input and the target before replacement; absent is not accepted. Omit displayed line numbers from oldString.
返回结果与后续处理
Returns a bounded change summary. A successful edit is a saved file, not a service reload; validate the config and reload only within the user's scope. On a mismatch, read again and revise the edit.
调用示例
{
"newString": "workers = 4",
"oldString": "workers = 2",
"remotePath": "/srv/app/app.conf",
"server": "web-a"
}参数说明
| 字段 | 类型与默认值 | 说明 |
|---|---|---|
| expectedSha256 | string | Required SHA-256 of both the original input and the target immediately before replacement. |
| newString必填 | string | Replacement text. Empty string deletes matched text; include intended newlines exactly. |
| oldString必填 | string | Exact existing text from a recent ssh_read, excluding displayed line numbers. Literal match, not regex. |
| remotePath必填 | string | Complete path on the selected remote server, not this MCP computer. Prefer an absolute path. |
| replaceAll | boolean默认 false | Replace every match. False requires one unambiguous match; read again if it fails instead of guessing. |
| server必填 | string | Exact server name returned by ssh_list_servers. Do not pass a host/IP unless it is the registered name. |
查看完整 JSON Schema
{
"additionalProperties": true,
"examples": [
{
"newString": "workers = 4",
"oldString": "workers = 2",
"remotePath": "/srv/app/app.conf",
"server": "web-a"
}
],
"properties": {
"expectedSha256": {
"description": "Required SHA-256 of both the original input and the target immediately before replacement.",
"pattern": "^[0-9a-fA-F]{64}$",
"type": "string"
},
"newString": {
"description": "Replacement text. Empty string deletes matched text; include intended newlines exactly.",
"type": "string"
},
"oldString": {
"description": "Exact existing text from a recent ssh_read, excluding displayed line numbers. Literal match, not regex.",
"type": "string"
},
"remotePath": {
"description": "Complete path on the selected remote server, not this MCP computer. Prefer an absolute path.",
"type": "string"
},
"replaceAll": {
"default": false,
"description": "Replace every match. False requires one unambiguous match; read again if it fails instead of guessing.",
"type": "boolean"
},
"server": {
"description": "Exact server name returned by ssh_list_servers. Do not pass a host/IP unless it is the registered name.",
"type": "string"
}
},
"required": [
"server",
"remotePath",
"oldString",
"newString"
],
"type": "object"
}ssh_list_dir只读查看远端目录与文件信息
List one remote directory, or describe a single remote path (type, size, permissions, owner, modification time). It needs only read access, so on a readonly server it is the way to browse without shell commands. Not recursive; call it again for a subdirectory. Use ssh_read for file content.
输入参数
server from ssh_list_servers, remotePath on that server: a directory to list or any path to describe. limit caps the returned entries: default 200, range 1–10000; a value outside the range is refused.
返回结果与后续处理
JSON. A directory, or a symbolic link to one, gives kind=directory with entries sorted by name; count is the number returned. Each entry is one text row whose fields are named by columns: kind (file, directory, link or other), mode as octal permission bits such as 0644, uid:gid, size in bytes, modified in UTC, then the name, which is the rest of the row and may contain spaces. An entry of kind link is not followed; call the tool on it to see where it leads. truncated=true means more entries exist and which ones were returned is not defined: raise limit or list a narrower path. lossyNames counts names that are not UTF-8 and are shown with replacement characters. Any other path gives kind, size, mode, modified, uid and gid as fields for the path itself and no entries; a symbolic link adds targetKind (file, other, or missing for a broken link) and linkTarget when the server reports it. A path that does not exist is an error.
调用示例
{
"limit": 200,
"remotePath": "/srv/app",
"server": "web-a"
}参数说明
| 字段 | 类型与默认值 | 说明 |
|---|---|---|
| limit | integer默认 200 | Maximum entries returned for a directory; default 200, range 1 to 10000. Has no effect when the path is not a directory. |
| remotePath必填 | string | Complete path on the selected remote server, not this MCP computer. Prefer an absolute path. |
| server必填 | string | Exact server name returned by ssh_list_servers. Do not pass a host/IP unless it is the registered name. |
查看完整 JSON Schema
{
"additionalProperties": true,
"examples": [
{
"limit": 200,
"remotePath": "/srv/app",
"server": "web-a"
}
],
"properties": {
"limit": {
"default": 200,
"description": "Maximum entries returned for a directory; default 200, range 1 to 10000. Has no effect when the path is not a directory.",
"maximum": 10000,
"minimum": 1,
"type": "integer"
},
"remotePath": {
"description": "Complete path on the selected remote server, not this MCP computer. Prefer an absolute path.",
"type": "string"
},
"server": {
"description": "Exact server name returned by ssh_list_servers. Do not pass a host/IP unless it is the registered name.",
"type": "string"
}
},
"required": [
"server",
"remotePath"
],
"type": "object"
}ssh_search_file只读在远端文件里搜索内容
Find the lines of one remote text file that match a pattern, with their line numbers. It searches a single file and never recurses into a directory; find files with ssh_list_dir and page around a hit with ssh_read. It needs only read access, so it works on readonly servers.
输入参数
server from ssh_list_servers, remotePath of one regular file. pattern is literal text unless regex=true; a regex uses the Rust regex crate syntax, which has no look-around and no back-references, and is matched against each line separately. ignoreCase defaults false. maxMatches caps the returned lines: default 200, range 1–10000; a value outside the range is refused.
返回结果与后续处理
JSON: matches in file order, each with line (1-based, usable as the ssh_read offset) and text; count is the number returned. truncated=true means maxMatches or the 256 KiB bound on returned text stopped the search while more matches remained: narrow the pattern or raise maxMatches. clipped=true on a match means text is only the beginning of a longer line. binary=true means the file is binary and was not searched; fetch it with ssh_download. count 0 with truncated=false means no line matched, which is not an error.
调用示例
{
"ignoreCase": true,
"maxMatches": 50,
"pattern": "ERROR",
"remotePath": "/srv/app/app.log",
"server": "web-a"
}参数说明
| 字段 | 类型与默认值 | 说明 |
|---|---|---|
| ignoreCase | boolean默认 false | Match letters regardless of case. |
| maxMatches | integer默认 200 | Maximum matching lines returned; default 200, range 1 to 10000. The result sets truncated when more lines matched. |
| pattern必填 | string | Text to find in each line; must not be empty. Literal unless regex is true. |
| regex | boolean默认 false | Treat pattern as a regular expression in Rust regex crate syntax (no look-around, no back-references). False matches pattern as literal text. |
| remotePath必填 | string | Complete path on the selected remote server, not this MCP computer. Prefer an absolute path. |
| server必填 | string | Exact server name returned by ssh_list_servers. Do not pass a host/IP unless it is the registered name. |
查看完整 JSON Schema
{
"additionalProperties": true,
"examples": [
{
"ignoreCase": true,
"maxMatches": 50,
"pattern": "ERROR",
"remotePath": "/srv/app/app.log",
"server": "web-a"
}
],
"properties": {
"ignoreCase": {
"default": false,
"description": "Match letters regardless of case.",
"type": "boolean"
},
"maxMatches": {
"default": 200,
"description": "Maximum matching lines returned; default 200, range 1 to 10000. The result sets truncated when more lines matched.",
"maximum": 10000,
"minimum": 1,
"type": "integer"
},
"pattern": {
"description": "Text to find in each line; must not be empty. Literal unless regex is true.",
"minLength": 1,
"type": "string"
},
"regex": {
"default": false,
"description": "Treat pattern as a regular expression in Rust regex crate syntax (no look-around, no back-references). False matches pattern as literal text.",
"type": "boolean"
},
"remotePath": {
"description": "Complete path on the selected remote server, not this MCP computer. Prefer an absolute path.",
"type": "string"
},
"server": {
"description": "Exact server name returned by ssh_list_servers. Do not pass a host/IP unless it is the registered name.",
"type": "string"
}
},
"required": [
"server",
"remotePath",
"pattern"
],
"type": "object"
}ssh_upload上传单个本地文件
Copy one existing file from this MCP computer to one catalog server. Use ssh_upload_batch for several files, ssh_write for text you are composing, ssh_sync for directories.
输入参数
server from ssh_list_servers; localPath is an existing file on this computer, remotePath is the complete destination filename on that server. Prefer absolute paths; do not swap the two endpoints.
返回结果与后续处理
Transfers through this computer's configured route and replaces the destination file. Check the result and destination/hash as required. After timeout, inspect before retrying; the transfer may have finished.
调用示例
{
"localPath": "/home/me/app.conf",
"remotePath": "/srv/app/app.conf",
"server": "web-a"
}参数说明
| 字段 | 类型与默认值 | 说明 |
|---|---|---|
| localPath必填 | string | Complete file path on the computer running this MCP companion. Prefer an absolute path; Windows example C:/Users/me/file.txt. Not a path on the center or target server. |
| maxRate | integer | Maximum payload bytes per second. |
| remotePath必填 | string | Complete path on the selected remote server, not this MCP computer. Prefer an absolute path. |
| server必填 | string | Exact server name returned by ssh_list_servers. Do not pass a host/IP unless it is the registered name. |
查看完整 JSON Schema
{
"additionalProperties": true,
"examples": [
{
"localPath": "/home/me/app.conf",
"remotePath": "/srv/app/app.conf",
"server": "web-a"
}
],
"properties": {
"localPath": {
"description": "Complete file path on the computer running this MCP companion. Prefer an absolute path; Windows example C:/Users/me/file.txt. Not a path on the center or target server.",
"type": "string"
},
"maxRate": {
"description": "Maximum payload bytes per second.",
"minimum": 131072,
"type": "integer"
},
"remotePath": {
"description": "Complete path on the selected remote server, not this MCP computer. Prefer an absolute path.",
"type": "string"
},
"server": {
"description": "Exact server name returned by ssh_list_servers. Do not pass a host/IP unless it is the registered name.",
"type": "string"
}
},
"required": [
"server",
"localPath",
"remotePath"
],
"type": "object"
}ssh_upload_batch批量上传本地文件
Copy 1–256 existing local files to one catalog server in one call. Use ssh_sync for a directory or multiple destination devices.
输入参数
server from ssh_list_servers. Each files item has localPath on this computer and a complete remotePath on that server. Destinations must be unique. concurrency defaults to 4, range 1–8.
返回结果与后续处理
Returns ordered per-file results. Replacement is atomic per file; a batch has no rollback. Check every item and retry only failed items after checking their destination state.
调用示例
{
"files": [
{
"localPath": "/home/me/a.txt",
"remotePath": "/srv/app/a.txt"
},
{
"localPath": "/home/me/b.txt",
"remotePath": "/srv/app/b.txt"
}
],
"server": "web-a"
}参数说明
| 字段 | 类型与默认值 | 说明 |
|---|---|---|
| concurrency | integer默认 4 | Maximum simultaneous uploads to this one server; 1 is serial, 4 is the default. |
| files必填 | array | Existing local source files and unique remote destination filenames. Atomic per file; the entire batch is not rolled back. |
| maxRate | integer | Shared maximum payload bytes per second for the batch. |
| server必填 | string | Exact server name returned by ssh_list_servers. Do not pass a host/IP unless it is the registered name. |
查看完整 JSON Schema
{
"additionalProperties": true,
"examples": [
{
"files": [
{
"localPath": "/home/me/a.txt",
"remotePath": "/srv/app/a.txt"
},
{
"localPath": "/home/me/b.txt",
"remotePath": "/srv/app/b.txt"
}
],
"server": "web-a"
}
],
"properties": {
"concurrency": {
"default": 4,
"description": "Maximum simultaneous uploads to this one server; 1 is serial, 4 is the default.",
"maximum": 8,
"minimum": 1,
"type": "integer"
},
"files": {
"description": "Existing local source files and unique remote destination filenames. Atomic per file; the entire batch is not rolled back.",
"items": {
"additionalProperties": false,
"properties": {
"localPath": {
"description": "Complete file path on the computer running this MCP companion. Prefer an absolute path; Windows example C:/Users/me/file.txt. Not a path on the center or target server.",
"type": "string"
},
"remotePath": {
"description": "Complete path on the selected remote server, not this MCP computer. Prefer an absolute path.",
"type": "string"
}
},
"required": [
"localPath",
"remotePath"
],
"type": "object"
},
"maxItems": 256,
"minItems": 1,
"type": "array"
},
"maxRate": {
"description": "Shared maximum payload bytes per second for the batch.",
"minimum": 131072,
"type": "integer"
},
"server": {
"description": "Exact server name returned by ssh_list_servers. Do not pass a host/IP unless it is the registered name.",
"type": "string"
}
},
"required": [
"server",
"files"
],
"type": "object"
}ssh_download下载远端文件到本地
Copy one remote file to this MCP computer. Use ssh_read to inspect text without saving a local copy; use ssh_sync for directories.
输入参数
server from ssh_list_servers; remotePath is the existing source filename on that server, localPath is the complete destination filename on this computer. Windows localPath may be C:/Users/me/Downloads/file.zip.
返回结果与后续处理
Replaces the local destination through the configured direct/bastion route. Verify the saved file/hash as needed. A caller timeout alone does not prove that no local file was committed.
调用示例
{
"localPath": "/home/me/Downloads/report.txt",
"remotePath": "/srv/app/report.txt",
"server": "web-a"
}参数说明
| 字段 | 类型与默认值 | 说明 |
|---|---|---|
| localPath必填 | string | Complete file path on the computer running this MCP companion. Prefer an absolute path; Windows example C:/Users/me/file.txt. Not a path on the center or target server. |
| maxRate | integer | Maximum payload bytes per second. |
| remotePath必填 | string | Complete path on the selected remote server, not this MCP computer. Prefer an absolute path. |
| server必填 | string | Exact server name returned by ssh_list_servers. Do not pass a host/IP unless it is the registered name. |
查看完整 JSON Schema
{
"additionalProperties": true,
"examples": [
{
"localPath": "/home/me/Downloads/report.txt",
"remotePath": "/srv/app/report.txt",
"server": "web-a"
}
],
"properties": {
"localPath": {
"description": "Complete file path on the computer running this MCP companion. Prefer an absolute path; Windows example C:/Users/me/file.txt. Not a path on the center or target server.",
"type": "string"
},
"maxRate": {
"description": "Maximum payload bytes per second.",
"minimum": 131072,
"type": "integer"
},
"remotePath": {
"description": "Complete path on the selected remote server, not this MCP computer. Prefer an absolute path.",
"type": "string"
},
"server": {
"description": "Exact server name returned by ssh_list_servers. Do not pass a host/IP unless it is the registered name.",
"type": "string"
}
},
"required": [
"server",
"localPath",
"remotePath"
],
"type": "object"
}ssh_copy跨机器复制文件或目录
Plan and copy a file or directory between named endpoints, choosing a direct node path, an explicit relay or controller streaming. Remote endpoints need a registered node installation; native paths also require running, paired nodes.
输入参数
plan/execute take source and target {server,path}; @local refers to this companion. via selects a relay; routeExclude excludes path kinds/nodes. maxRate limits the whole path. overwrite defaults false; expectedSha256 is a target precondition and requires overwrite=true. execute also accepts planId.
返回结果与后续处理
plan returns candidates and a planId valid for 10 minutes. execute returns copyId; status/cancel use that ID. Progress counts committed files and their confirmed payload bytes; a single large file updates after commit. Each owner retains the latest 64 finished jobs; older IDs return not_found. Companion restart loses the registry, while verified staging can resume. Every attempt reserves the source's full length before settling actual payload bytes.
调用示例
{
"action": "plan",
"source": {
"path": "/srv/app.tar",
"server": "web-a"
},
"target": {
"path": "/srv/app.tar",
"server": "web-b"
}
}参数说明
| 字段 | 类型与默认值 | 说明 |
|---|---|---|
| action必填 | stringplan · execute · status · cancel | plan inspects paths and returns a 10-minute planId; execute accepts that planId or a fresh source/target request and returns copyId for background work. status/cancel require copyId. Cancellation remains pending until cleanup finishes. |
| allowLowQuota | boolean默认 false | Permit selection beyond a soft quota only after host confirmation. Hard quota limits still apply. |
| compression | string默认 "auto"auto · never · zstd | 详见下方 JSON Schema。 |
| copyId | string | Background copy ID returned by execute. Each owner retains the latest 64 finished copies. Running and cancelling copies remain; missing, evicted or another owner's IDs return not_found. Companion restart discards these records. |
| expectedSha256 | string / null | Expected SHA-256 of a single destination file before replacement. Requires overwrite=true. It is not a source hash; source contents are bound to the plan. |
| maxRate | integer / null | Maximum payload bytes per second for the selected path in total, shared or divided across its parallel streams. Rate-limited copies do not update throughput estimates. Omit for no rate limit. |
| overwrite | boolean默认 false | Allow replacing existing destination content. False refuses an existing target. |
| planId | string | Opaque plan token returned by plan, valid for 10 minutes and bound to this owner and companion. Mutually exclusive with source, target and transfer options; execute rescans and rejects a changed plan. |
| routeExclude | array默认 [] | Excluded path kinds (node_direct, node_relay, controller_stream), server names or node IDs. |
| source | object | 详见下方 JSON Schema。 |
| target | object | 详见下方 JSON Schema。 |
| timeout | integer默认 300000 | Transfer deadline in milliseconds. Cleanup still runs after cancellation or expiry. |
| via | string / null | Use only this registered native relay node id or unambiguous server name. No direct or controller fallback is allowed; an unavailable relay leaves the plan unavailable. Omission does not choose a node relay. |
查看完整 JSON Schema
{
"additionalProperties": false,
"allOf": [
{
"if": {
"properties": {
"expectedSha256": {
"type": "string"
}
},
"required": [
"expectedSha256"
]
},
"then": {
"properties": {
"overwrite": {
"const": true
}
},
"required": [
"overwrite"
]
}
}
],
"examples": [
{
"action": "plan",
"source": {
"path": "/srv/app.tar",
"server": "web-a"
},
"target": {
"path": "/srv/app.tar",
"server": "web-b"
}
}
],
"oneOf": [
{
"not": {
"anyOf": [
{
"required": [
"planId"
]
},
{
"required": [
"copyId"
]
}
]
},
"properties": {
"action": {
"const": "plan"
}
},
"required": [
"action",
"source",
"target"
]
},
{
"not": {
"anyOf": [
{
"required": [
"planId"
]
},
{
"required": [
"copyId"
]
}
]
},
"properties": {
"action": {
"const": "execute"
}
},
"required": [
"action",
"source",
"target"
]
},
{
"not": {
"anyOf": [
{
"required": [
"source"
]
},
{
"required": [
"target"
]
},
{
"required": [
"via"
]
},
{
"required": [
"routeExclude"
]
},
{
"required": [
"maxRate"
]
},
{
"required": [
"allowLowQuota"
]
},
{
"required": [
"overwrite"
]
},
{
"required": [
"expectedSha256"
]
},
{
"required": [
"compression"
]
},
{
"required": [
"timeout"
]
},
{
"required": [
"copyId"
]
}
]
},
"properties": {
"action": {
"const": "execute"
}
},
"required": [
"action",
"planId"
]
},
{
"not": {
"anyOf": [
{
"required": [
"source"
]
},
{
"required": [
"target"
]
},
{
"required": [
"via"
]
},
{
"required": [
"routeExclude"
]
},
{
"required": [
"maxRate"
]
},
{
"required": [
"allowLowQuota"
]
},
{
"required": [
"overwrite"
]
},
{
"required": [
"expectedSha256"
]
},
{
"required": [
"compression"
]
},
{
"required": [
"timeout"
]
},
{
"required": [
"planId"
]
}
]
},
"properties": {
"action": {
"const": "status"
}
},
"required": [
"action",
"copyId"
]
},
{
"not": {
"anyOf": [
{
"required": [
"source"
]
},
{
"required": [
"target"
]
},
{
"required": [
"via"
]
},
{
"required": [
"routeExclude"
]
},
{
"required": [
"maxRate"
]
},
{
"required": [
"allowLowQuota"
]
},
{
"required": [
"overwrite"
]
},
{
"required": [
"expectedSha256"
]
},
{
"required": [
"compression"
]
},
{
"required": [
"timeout"
]
},
{
"required": [
"planId"
]
}
]
},
"properties": {
"action": {
"const": "cancel"
}
},
"required": [
"action",
"copyId"
]
}
],
"properties": {
"action": {
"description": "plan inspects paths and returns a 10-minute planId; execute accepts that planId or a fresh source/target request and returns copyId for background work. status/cancel require copyId. Cancellation remains pending until cleanup finishes.",
"enum": [
"plan",
"execute",
"status",
"cancel"
],
"type": "string"
},
"allowLowQuota": {
"default": false,
"description": "Permit selection beyond a soft quota only after host confirmation. Hard quota limits still apply.",
"type": "boolean"
},
"compression": {
"default": "auto",
"enum": [
"auto",
"never",
"zstd"
],
"type": "string"
},
"copyId": {
"description": "Background copy ID returned by execute. Each owner retains the latest 64 finished copies. Running and cancelling copies remain; missing, evicted or another owner's IDs return not_found. Companion restart discards these records.",
"type": "string"
},
"expectedSha256": {
"description": "Expected SHA-256 of a single destination file before replacement. Requires overwrite=true. It is not a source hash; source contents are bound to the plan.",
"pattern": "^[0-9a-fA-F]{64}$",
"type": [
"string",
"null"
]
},
"maxRate": {
"description": "Maximum payload bytes per second for the selected path in total, shared or divided across its parallel streams. Rate-limited copies do not update throughput estimates. Omit for no rate limit.",
"minimum": 131072,
"type": [
"integer",
"null"
]
},
"overwrite": {
"default": false,
"description": "Allow replacing existing destination content. False refuses an existing target.",
"type": "boolean"
},
"planId": {
"description": "Opaque plan token returned by plan, valid for 10 minutes and bound to this owner and companion. Mutually exclusive with source, target and transfer options; execute rescans and rejects a changed plan.",
"type": "string"
},
"routeExclude": {
"default": [],
"description": "Excluded path kinds (node_direct, node_relay, controller_stream), server names or node IDs.",
"items": {
"type": "string"
},
"type": "array"
},
"source": {
"additionalProperties": false,
"properties": {
"instance": {
"description": "Existing native node instance on this endpoint; omit for primary.",
"type": [
"string",
"null"
]
},
"path": {
"description": "Absolute file or directory path on that server. No tilde, relative path or remote: prefix.",
"minLength": 1,
"type": "string"
},
"server": {
"description": "Exact ssh_list_servers profile or @local for this companion computer.",
"minLength": 1,
"type": "string"
}
},
"required": [
"server",
"path"
],
"type": "object"
},
"target": {
"additionalProperties": false,
"properties": {
"instance": {
"description": "Existing native node instance on this endpoint; omit for primary.",
"type": [
"string",
"null"
]
},
"path": {
"description": "Absolute file or directory path on that server. No tilde, relative path or remote: prefix.",
"minLength": 1,
"type": "string"
},
"server": {
"description": "Exact ssh_list_servers profile or @local for this companion computer.",
"minLength": 1,
"type": "string"
}
},
"required": [
"server",
"path"
],
"type": "object"
},
"timeout": {
"default": 300000,
"description": "Transfer deadline in milliseconds. Cleanup still runs after cancellation or expiry.",
"maximum": 86400000,
"minimum": 1000,
"type": "integer"
},
"via": {
"description": "Use only this registered native relay node id or unambiguous server name. No direct or controller fallback is allowed; an unavailable relay leaves the plan unavailable. Omission does not choose a node relay.",
"type": [
"string",
"null"
]
}
},
"required": [
"action"
],
"type": "object"
}ssh_sync单向分发与多端双向同步
Distribute a directory from one source to 1–7 targets, or reconcile a saved bidirectional sync set. Use upload/download for single files.
输入参数
Distribution: source and targets; each endpoint is an object with id, server from ssh_list_servers (or @local), and absolute root on that device. A string source is no longer accepted. Start with options.dryRun=true. Bidirectional: action=create with name/participants, then action=run with returned syncSet. inspect/list are read-only. timeout is inside options, in milliseconds (default 300000).
返回结果与后续处理
Read per-endpoint changes/conflicts/failures. delete and propagateDeletes default false; conflicts retain copies. Remote-to-remote controller streaming requires allowRelay=true. Progress counts committed files and their confirmed payload bytes, so a single large file updates after commit. Verified partial chunks may resume; partial progress does not mean the file is committed.
调用示例
{
"options": {
"dryRun": true
},
"source": {
"id": "src",
"root": "/home/me/site",
"server": "@local"
},
"targets": [
{
"id": "dst",
"root": "/srv/site",
"server": "web-a"
}
]
}参数说明
| 字段 | 类型与默认值 | 说明 |
|---|---|---|
| action | string默认 "run"run · create · list · inspect · delete | run distributes source contents to targets, or reconciles an existing syncSet; create saves a bidirectional set; delete retires its ledger without changing user files. list/inspect read durable state; inspect can repeatedly read a retained deletion receipt. |
| discardPending | boolean默认 false | For delete: explicitly abandon pending ledger operations after the running lease has expired. User files and staged transfers are unchanged. |
| exclude | array | For create: relative /-separated globs; excluded subtrees are neither copied nor deleted. |
| name | string | Human-readable name for create. |
| options | object | Run options only. Begin with dryRun=true; timeout is nested here in milliseconds. Deletions and controller relay require explicit flags. |
| participants | array | For create: equal writable peers. Concurrent edits retain deterministic conflict copies; delete/edit retains the edit. Up to 4096 tracked files per set. |
| propagateDeletes | boolean默认 false | For create: true propagates causally observed deletion and retains versioned tombstones for offline peers; false restores local deletions from live copies. This set policy is immutable. |
| revision | integer | For delete: exact active set revision or the matching retained deletion receipt revision. Retry the same id/revision to finish an interrupted deletion. |
| source | object | Distribution source endpoint; required with targets and mutually exclusive with syncSet. root is an absolute directory on this named server or @local. |
| syncSet | string | UUID returned by create/list. Participants, exclusion and deletion policy come from that authority. Mutually exclusive with source/targets. |
| targets | array | Distribution destinations, 1–7 distinct endpoint objects. Each root belongs to its named server; no implicit controller relay. |
查看完整 JSON Schema
{
"additionalProperties": false,
"examples": [
{
"options": {
"dryRun": true
},
"source": {
"id": "src",
"root": "/home/me/site",
"server": "@local"
},
"targets": [
{
"id": "dst",
"root": "/srv/site",
"server": "web-a"
}
]
}
],
"oneOf": [
{
"not": {
"anyOf": [
{
"required": [
"syncSet"
]
},
{
"required": [
"name"
]
},
{
"required": [
"revision"
]
},
{
"required": [
"discardPending"
]
},
{
"required": [
"participants"
]
},
{
"required": [
"propagateDeletes"
]
},
{
"required": [
"exclude"
]
}
]
},
"properties": {
"action": {
"const": "run"
}
},
"required": [
"source",
"targets"
]
},
{
"not": {
"anyOf": [
{
"required": [
"source"
]
},
{
"required": [
"targets"
]
},
{
"required": [
"name"
]
},
{
"required": [
"revision"
]
},
{
"required": [
"discardPending"
]
},
{
"required": [
"participants"
]
},
{
"required": [
"propagateDeletes"
]
},
{
"required": [
"exclude"
]
}
]
},
"properties": {
"action": {
"const": "run"
}
},
"required": [
"syncSet"
]
},
{
"not": {
"anyOf": [
{
"required": [
"source"
]
},
{
"required": [
"targets"
]
},
{
"required": [
"syncSet"
]
},
{
"required": [
"revision"
]
},
{
"required": [
"discardPending"
]
},
{
"required": [
"options"
]
}
]
},
"properties": {
"action": {
"const": "create"
}
},
"required": [
"action",
"name",
"participants"
]
},
{
"not": {
"anyOf": [
{
"required": [
"source"
]
},
{
"required": [
"targets"
]
},
{
"required": [
"name"
]
},
{
"required": [
"revision"
]
},
{
"required": [
"discardPending"
]
},
{
"required": [
"participants"
]
},
{
"required": [
"propagateDeletes"
]
},
{
"required": [
"exclude"
]
},
{
"required": [
"options"
]
}
]
},
"properties": {
"action": {
"const": "inspect"
}
},
"required": [
"action",
"syncSet"
]
},
{
"not": {
"anyOf": [
{
"required": [
"source"
]
},
{
"required": [
"targets"
]
},
{
"required": [
"name"
]
},
{
"required": [
"participants"
]
},
{
"required": [
"propagateDeletes"
]
},
{
"required": [
"exclude"
]
},
{
"required": [
"options"
]
}
]
},
"properties": {
"action": {
"const": "delete"
}
},
"required": [
"action",
"syncSet",
"revision"
]
},
{
"not": {
"anyOf": [
{
"required": [
"source"
]
},
{
"required": [
"targets"
]
},
{
"required": [
"syncSet"
]
},
{
"required": [
"name"
]
},
{
"required": [
"revision"
]
},
{
"required": [
"discardPending"
]
},
{
"required": [
"participants"
]
},
{
"required": [
"propagateDeletes"
]
},
{
"required": [
"exclude"
]
},
{
"required": [
"options"
]
}
]
},
"properties": {
"action": {
"const": "list"
}
},
"required": [
"action"
]
}
],
"properties": {
"action": {
"default": "run",
"description": "run distributes source contents to targets, or reconciles an existing syncSet; create saves a bidirectional set; delete retires its ledger without changing user files. list/inspect read durable state; inspect can repeatedly read a retained deletion receipt.",
"enum": [
"run",
"create",
"list",
"inspect",
"delete"
],
"type": "string"
},
"discardPending": {
"default": false,
"description": "For delete: explicitly abandon pending ledger operations after the running lease has expired. User files and staged transfers are unchanged.",
"type": "boolean"
},
"exclude": {
"description": "For create: relative /-separated globs; excluded subtrees are neither copied nor deleted.",
"items": {
"type": "string"
},
"type": "array"
},
"name": {
"description": "Human-readable name for create.",
"type": "string"
},
"options": {
"additionalProperties": false,
"description": "Run options only. Begin with dryRun=true; timeout is nested here in milliseconds. Deletions and controller relay require explicit flags.",
"properties": {
"allowLowQuota": {
"default": false,
"description": "Offer a real host confirmation before selecting a path beyond its soft quota. Hard quotas remain enforced; every path reserves the full source length before transfer, including resume.",
"type": "boolean"
},
"allowRelay": {
"default": false,
"description": "Allow a controller_stream candidate for remote-to-remote file payloads through this companion. The management center never receives payloads.",
"type": "boolean"
},
"compression": {
"default": "auto",
"description": "Content-aware zstd compression; auto samples chunks, and expanded output is sent raw.",
"enum": [
"auto",
"never",
"zstd"
],
"type": "string"
},
"delete": {
"default": false,
"description": "Distribution only: delete destination files absent from source, after validating all manifests. Excluded files are protected.",
"type": "boolean"
},
"dryRun": {
"default": false,
"description": "Read manifests, route candidates, quota estimates and up to 200 planned operations; creates no target directories, stages, grants or sync baseline. Requires the native helper already installed.",
"type": "boolean"
},
"exclude": {
"description": "Distribution only: relative globs such as .git or **/*.tmp; excluded trees are protected from deletion.",
"items": {
"type": "string"
},
"type": "array"
},
"maxRate": {
"description": "Aggregate payload bytes per second for each source-to-target path. Native receiver-pull candidates require PULL_RATE_LIMIT. Rate-limited transfers do not update throughput estimates.",
"minimum": 131072,
"type": "integer"
},
"permissions": {
"default": "preserve_target",
"description": "Distribution regular files only: source copies the low 9 POSIX permission bits, including metadata-only changes for equal content. Unsupported for syncSet or Windows targets. Directory permissions are unchanged.",
"enum": [
"preserve_target",
"source"
],
"type": "string"
},
"routeExclude": {
"description": "Exclude route kinds (node_direct, node_relay, controller_stream), canonical server names or device ids. options.exclude remains file globs.",
"items": {
"type": "string"
},
"type": "array"
},
"timeout": {
"default": 300000,
"description": "Whole operation deadline in milliseconds: 10000 = 10 seconds. Validated partial chunks survive interruption for resume.",
"maximum": 86400000,
"minimum": 1000,
"type": "integer"
},
"transport": {
"default": "auto",
"description": "auto considers direct, relay, then controller paths. If the first available path has no throughput sample it is selected; otherwise the fastest sampled path wins. ssh uses configured SSH endpoint routes. p2p permits native or @local carriers, including controller_stream, and excludes SSH data carriers. Native paths use the primary @local controller paired with each remote endpoint.",
"enum": [
"auto",
"ssh",
"p2p"
],
"type": "string"
},
"via": {
"description": "Use only this registered native relay node id or unambiguous server name. Direct and controller fallback are disabled; unavailable relay prerequisites leave the plan unavailable. Requires existing pairings and DATA_RELAY on all three nodes; creates no permanent pairing.",
"type": "string"
}
},
"type": "object"
},
"participants": {
"description": "For create: equal writable peers. Concurrent edits retain deterministic conflict copies; delete/edit retains the edit. Up to 4096 tracked files per set.",
"items": {
"additionalProperties": false,
"properties": {
"deviceId": {
"description": "Registered stable device identity from ssh_node_manage. Persisted sets pin it to prevent using another companion's @local root.",
"type": "string"
},
"id": {
"description": "Stable participant label, 1-40 ASCII letters/digits/_/-. Unique within this operation or set.",
"type": "string"
},
"instance": {
"description": "Installed native node instance on this endpoint; omit for primary.",
"type": "string"
},
"root": {
"description": "Absolute directory on that device, e.g. /srv/data or C:\\Data. Synchronizes its contents, without adding the root folder name. No tilde, relative paths or remote: prefix.",
"type": "string"
},
"server": {
"description": "Exact ssh_list_servers profile, or @local for this companion computer. A path always belongs to this named device.",
"type": "string"
}
},
"required": [
"id",
"server",
"root"
],
"type": "object"
},
"maxItems": 8,
"minItems": 2,
"type": "array"
},
"propagateDeletes": {
"default": false,
"description": "For create: true propagates causally observed deletion and retains versioned tombstones for offline peers; false restores local deletions from live copies. This set policy is immutable.",
"type": "boolean"
},
"revision": {
"description": "For delete: exact active set revision or the matching retained deletion receipt revision. Retry the same id/revision to finish an interrupted deletion.",
"minimum": 0,
"type": "integer"
},
"source": {
"additionalProperties": false,
"description": "Distribution source endpoint; required with targets and mutually exclusive with syncSet. root is an absolute directory on this named server or @local.",
"properties": {
"deviceId": {
"description": "Registered stable device identity from ssh_node_manage. Persisted sets pin it to prevent using another companion's @local root.",
"type": "string"
},
"id": {
"description": "Stable participant label, 1-40 ASCII letters/digits/_/-. Unique within this operation or set.",
"type": "string"
},
"instance": {
"description": "Installed native node instance on this endpoint; omit for primary.",
"type": "string"
},
"root": {
"description": "Absolute directory on that device, e.g. /srv/data or C:\\Data. Synchronizes its contents, without adding the root folder name. No tilde, relative paths or remote: prefix.",
"type": "string"
},
"server": {
"description": "Exact ssh_list_servers profile, or @local for this companion computer. A path always belongs to this named device.",
"type": "string"
}
},
"required": [
"id",
"server",
"root"
],
"type": "object"
},
"syncSet": {
"description": "UUID returned by create/list. Participants, exclusion and deletion policy come from that authority. Mutually exclusive with source/targets.",
"type": "string"
},
"targets": {
"description": "Distribution destinations, 1–7 distinct endpoint objects. Each root belongs to its named server; no implicit controller relay.",
"items": {
"additionalProperties": false,
"properties": {
"deviceId": {
"description": "Registered stable device identity from ssh_node_manage. Persisted sets pin it to prevent using another companion's @local root.",
"type": "string"
},
"id": {
"description": "Stable participant label, 1-40 ASCII letters/digits/_/-. Unique within this operation or set.",
"type": "string"
},
"instance": {
"description": "Installed native node instance on this endpoint; omit for primary.",
"type": "string"
},
"root": {
"description": "Absolute directory on that device, e.g. /srv/data or C:\\Data. Synchronizes its contents, without adding the root folder name. No tilde, relative paths or remote: prefix.",
"type": "string"
},
"server": {
"description": "Exact ssh_list_servers profile, or @local for this companion computer. A path always belongs to this named device.",
"type": "string"
}
},
"required": [
"id",
"server",
"root"
],
"type": "object"
},
"maxItems": 7,
"minItems": 1,
"type": "array"
}
},
"type": "object"
}ssh_deploy上传文件并执行部署命令
Run a deployment command, or install an explicit list of local files on a POSIX catalog server. Use upload_batch when no deployment ownership/permissions/restart is needed.
输入参数
Only a server in unrestricted mode accepts either mode. Command mode: command and optional remote cwd/timeout in milliseconds. File mode: files:[{local,remote}] and options; local is on this computer, remote on the server. File mode ignores command. backup defaults true; owner/permissions/restart may require passwordless sudo. With restart, sha256sum verifies each installed file before the service is restarted once.
返回结果与后续处理
Read code or per-file results. Files are applied sequentially with no automatic rollback; prior files may already be installed after a failure. Verify config and the real service outcome before claiming deployment or retrying.
调用示例
{
"command": "systemctl is-active app",
"server": "web-a",
"timeout": 10000
}参数说明
| 字段 | 类型与默认值 | 说明 |
|---|---|---|
| command | string | Command mode only, when files is absent. Ignored when files is supplied. A missing command defaults to a no-op, not a deployment. |
| cwd | string | Working directory on the target server; omitted uses its configured default directory or SSH login directory. |
| files | array | File mode: sequential local-to-remote installs; command is ignored. Uses fixed 120000 ms per privileged install step, not the command-mode timeout. |
| maxOutputBytes | integer默认 65536 | Bytes of each output stream returned in the result, split evenly between its start and its end. Default 65536, range 4096 to 1048576; values outside the range are clamped. Longer output is saved whole on this MCP computer and the result names the file. |
| options | object | File-mode options. owner, permissions or restart uses sudo; backups do not provide automatic rollback. |
| server必填 | string | Exact server name returned by ssh_list_servers. Do not pass a host/IP unless it is the registered name. |
| timeout | integer默认 120000 | Timeout in milliseconds, not seconds. Use 10000 for 10 seconds or 30000 for 30 seconds. Default 120000 ms; capped at 300000 ms. 0 disables the command deadline and remote timeout wrapper; connection-establishment limits still apply. Prefer omission for the normal bounded default. A timeout does not prove a remote write had no effect. |
查看完整 JSON Schema
{
"additionalProperties": true,
"examples": [
{
"command": "systemctl is-active app",
"server": "web-a",
"timeout": 10000
}
],
"properties": {
"command": {
"description": "Command mode only, when files is absent. Ignored when files is supplied. A missing command defaults to a no-op, not a deployment.",
"type": "string"
},
"cwd": {
"description": "Working directory on the target server; omitted uses its configured default directory or SSH login directory.",
"type": "string"
},
"files": {
"description": "File mode: sequential local-to-remote installs; command is ignored. Uses fixed 120000 ms per privileged install step, not the command-mode timeout.",
"items": {
"additionalProperties": false,
"properties": {
"local": {
"description": "Complete file path on the computer running this MCP companion. Prefer an absolute path; Windows example C:/Users/me/file.txt. Not a path on the center or target server.",
"type": "string"
},
"remote": {
"description": "Complete path on the selected remote server, not this MCP computer. Prefer an absolute path.",
"type": "string"
}
},
"required": [
"local",
"remote"
],
"type": "object"
},
"type": "array"
},
"maxOutputBytes": {
"default": 65536,
"description": "Bytes of each output stream returned in the result, split evenly between its start and its end. Default 65536, range 4096 to 1048576; values outside the range are clamped. Longer output is saved whole on this MCP computer and the result names the file.",
"maximum": 1048576,
"minimum": 4096,
"type": "integer"
},
"options": {
"additionalProperties": false,
"description": "File-mode options. owner, permissions or restart uses sudo; backups do not provide automatic rollback.",
"properties": {
"backup": {
"default": true,
"description": "Copy an existing destination to a uniquely named .bak file before replacing it.",
"type": "boolean"
},
"owner": {
"description": "Remote chown owner[:group]; requires sudo permission.",
"type": "string"
},
"permissions": {
"description": "Remote chmod mode, for example 0644; requires sudo permission.",
"type": "string"
},
"restart": {
"description": "Exact systemd service to restart once after every listed file has been installed successfully.",
"type": "string"
},
"sudoPassword": {
"description": "Optional sudo credential; avoid model-visible secrets. Omit when passwordless sudo is available.",
"type": "string"
}
},
"type": "object"
},
"server": {
"description": "Exact server name returned by ssh_list_servers. Do not pass a host/IP unless it is the registered name.",
"type": "string"
},
"timeout": {
"default": 120000,
"description": "Timeout in milliseconds, not seconds. Use 10000 for 10 seconds or 30000 for 30 seconds. Default 120000 ms; capped at 300000 ms. 0 disables the command deadline and remote timeout wrapper; connection-establishment limits still apply. Prefer omission for the normal bounded default. A timeout does not prove a remote write had no effect.",
"maximum": 300000,
"minimum": 0,
"type": "integer"
}
},
"required": [
"server"
],
"type": "object"
}节点组网、路由与隧道
ssh_node_manage安装与管理节点
Manage a SummerSSH native node or the local companion lifecycle. Start with inspect/discover; remote control follows the catalog's independent SSH management route.
输入参数
server is a catalog name or @local; action is required. install accepts nodeMode=auto|managed|legacy. auto selects managed on an enrolled device's remote Windows node and requires an effective administrator token plus SCM install access before mutation. Managed installation initializes, registers, starts, binds to the device's verified center and confirms zero-permission activation; legacy installation keeps its stopped behavior. Existing identities are never converted. configure needs update.expectedRevision and complete replacements for supplied arrays; managed connectivity accepts public references and update.stun intentions, never private STUN keys. queueIfStopped=true explicitly queues a pending unopened Grant without starting the node. maintain performs one managed relay exchange. pair needs peer, optional coordinator/protocol/forwards and explicit public stun intentions; new STUN material requires both managed endpoints in one batch. revoke needs an inspected peer grant name; scope=identity removes its identity, outbound links, reverse connections, forwards and probes, while inbound clears its connect/listen/files/introduce permissions. @local startup and upgrade retain the companion behavior.
返回结果与后续处理
Compare saved and loaded revisions and per-node receipts; pair/configure never implicitly starts services. Managed inspect shows configured binds under node and actual listener addresses under state.runtimeListeners when available. A revoke reports the saved configuration and the loaded runtime as separate fields, and the peer is revoked only when the loaded-runtime field is true. Check connectivity.links for actual QUIC/TCP/NAT success. Remote upgrade preserves identity and started/stopped state. Stop/revoke can close affected streams; uninstall requires retired dependencies. Queued update is not installed: inspect ssh_connection_status.
调用示例
{
"action": "inspect",
"server": "@local"
}参数说明
| 字段 | 类型与默认值 | 说明 |
|---|---|---|
| action必填 | stringinstall · inspect · configure · maintain · start · stop · pair · upgrade · startup · revoke · uninstall · discover | inspect/discover reads identity/state. install uses nodeMode=auto|managed|legacy. Managed installation initializes, registers, starts, binds and confirms a zero-permission activation; legacy installation retains its stopped behavior. configure needs update.expectedRevision; maintain performs one managed relay exchange. pair needs peer; revoke needs an inspected peer grant name. start/stop/upgrade/uninstall affect the owned node. @local startup and upgrade control the companion. |
| bind | string默认 "127.0.0.1:0" | install only: numeric listener address:port. Port 0 allocates and saves a port. Explicit 0.0.0.0 exposes the authenticated node to the network. |
| coordinator | string | pair only: optional third installed node with coordinate=true and advertised reachable addresses. |
| coordinatorInstance | string / null | Pair only, with coordinator. Required whenever both coordinator and instance are present. Pass null for the coordinator's default node. |
| expectedInstallation | object | Remote Legacy uninstall only. Reuse this object from the original uninstall's retry receipt to continue cleanup of that exact installation after unregistration. |
| forwards | array | pair only. Source listeners and exact TCP destinations on peer. Explicit non-loopback listen exposes this forward to the network. |
| instance | string / null | Node instance on server. Omit or pass null for its default node. For pair, select the other endpoints separately with peerInstance and coordinatorInstance. |
| nodeMode | string默认 "auto"auto · managed · legacy | install only. auto selects managed for an enrolled device's remote Windows node, requiring an effective administrator token and SCM install access before any mutation. Other supported targets retain legacy behavior. Modes never convert an existing identity; select legacy explicitly when appropriate. |
| operationId | string | Optional UUID. Managed configure uses a stable original Grant operation ID across retries and requires update.expectedRevision. Install, upgrade, uninstall, pair and revoke use this only to correlate the result; recovery reads original product and center facts. Pair/revoke issue an independent new inner Grant and report replaced pending operations. |
| peer | string | pair: other installed node server from ssh_list_servers. revoke: exact peer grant name from inspect.node.peers[].name, not a server name. |
| peerInstance | string / null | Pair only. Instance on peer. Required whenever the instance field is present. Pass null for the peer's default node. |
| protocol | stringauto · quic · tcp | pair only: auto negotiates supported QUIC/TCP connectivity; quic or tcp restricts the pair. Check loaded links for the actual transport and NAT reachability. |
| queueIfStopped | boolean默认 false | Managed configure only. Explicit true allows one unopened Grant to wait on a stopped node. queued is pending, configurationSaved=false and runtimeLoaded=false; this never starts the service. |
| scope | string默认 "identity"identity · inbound | revoke only; omitted means identity. identity removes the peer together with its outbound links, reverse connections, forwards and probes, and disconnects existing connections in both directions. inbound clears the peer's connect, listen, files and introduce grants and immediately drops its established inbound connections and in-flight streams, while keeping its authenticated identity and the authorized outbound links usable. The result reports the saved configuration and the loaded runtime as two separate fields; the peer is revoked only when the loaded-runtime field is true. |
| server必填 | string | SSH management profile from ssh_list_servers, or @local for the embedded device in this shared companion. @local uses this companion profile. action=startup with startup=login|boot|off|status manages its owned supervisor; omit instance. install initializes identity; start/stop control only the embedded node. |
| startup | stringauto · login · boot · off · status | Startup policy. @local action=startup accepts login|boot|off|status and no instance. Remote install uses auto/login/boot as supported by the OS account; boot needs appropriate permission. A saved startup policy is not a reboot test. |
| stun | array默认 [] | Managed public STUN intentions. New material needs explicit complementary intentions for two verified managed endpoints in the same pair operation. No private key or secret is accepted. |
| update | object | configure only. expectedRevision is required. Supplied fields are complete replacements; omitted fields remain unchanged. Non-empty update.stun requires explicit complete update.connectivity; empty stun permits omitted connectivity. Managed nodes use PublicNodeUpdate: public connectivity references and optional public stun intentions, never private STUN keys or secrets. Legacy nodes retain their existing credential-preservation rules. Identity, capabilities, receiving binding and resource limits are not input fields. |
查看完整 JSON Schema
{
"additionalProperties": true,
"examples": [
{
"action": "inspect",
"server": "@local"
}
],
"properties": {
"action": {
"description": "inspect/discover reads identity/state. install uses nodeMode=auto|managed|legacy. Managed installation initializes, registers, starts, binds and confirms a zero-permission activation; legacy installation retains its stopped behavior. configure needs update.expectedRevision; maintain performs one managed relay exchange. pair needs peer; revoke needs an inspected peer grant name. start/stop/upgrade/uninstall affect the owned node. @local startup and upgrade control the companion.",
"enum": [
"install",
"inspect",
"configure",
"maintain",
"start",
"stop",
"pair",
"upgrade",
"startup",
"revoke",
"uninstall",
"discover"
],
"type": "string"
},
"bind": {
"default": "127.0.0.1:0",
"description": "install only: numeric listener address:port. Port 0 allocates and saves a port. Explicit 0.0.0.0 exposes the authenticated node to the network.",
"type": "string"
},
"coordinator": {
"description": "pair only: optional third installed node with coordinate=true and advertised reachable addresses.",
"type": "string"
},
"coordinatorInstance": {
"description": "Pair only, with coordinator. Required whenever both coordinator and instance are present. Pass null for the coordinator's default node.",
"pattern": "^[a-z0-9-]{1,40}$",
"type": [
"string",
"null"
]
},
"expectedInstallation": {
"additionalProperties": false,
"description": "Remote Legacy uninstall only. Reuse this object from the original uninstall's retry receipt to continue cleanup of that exact installation after unregistration.",
"properties": {
"directoryDeviceId": {
"format": "uuid",
"type": "string"
},
"fingerprint": {
"type": "string"
},
"nodeId": {
"format": "uuid",
"type": "string"
},
"pointerSha256": {
"pattern": "^[0-9a-fA-F]{64}$",
"type": "string"
}
},
"required": [
"directoryDeviceId",
"nodeId",
"fingerprint",
"pointerSha256"
],
"type": "object"
},
"forwards": {
"description": "pair only. Source listeners and exact TCP destinations on peer. Explicit non-loopback listen exposes this forward to the network.",
"items": {
"additionalProperties": false,
"properties": {
"id": {
"description": "Unique forward ID on the initiating node.",
"type": "string"
},
"listen": {
"description": "Numeric bind IP:port with a nonzero port on the source node. Non-loopback makes this listener reachable by other computers.",
"type": "string"
},
"target": {
"description": "Exact numeric destination IP:port as reached by the peer node, e.g. 127.0.0.1:22 refers to that peer.",
"type": "string"
}
},
"required": [
"id",
"listen",
"target"
],
"type": "object"
},
"maxItems": 32,
"type": "array"
},
"instance": {
"description": "Node instance on server. Omit or pass null for its default node. For pair, select the other endpoints separately with peerInstance and coordinatorInstance.",
"pattern": "^[a-z0-9-]{1,40}$",
"type": [
"string",
"null"
]
},
"nodeMode": {
"default": "auto",
"description": "install only. auto selects managed for an enrolled device's remote Windows node, requiring an effective administrator token and SCM install access before any mutation. Other supported targets retain legacy behavior. Modes never convert an existing identity; select legacy explicitly when appropriate.",
"enum": [
"auto",
"managed",
"legacy"
],
"type": "string"
},
"operationId": {
"description": "Optional UUID. Managed configure uses a stable original Grant operation ID across retries and requires update.expectedRevision. Install, upgrade, uninstall, pair and revoke use this only to correlate the result; recovery reads original product and center facts. Pair/revoke issue an independent new inner Grant and report replaced pending operations.",
"format": "uuid",
"type": "string"
},
"peer": {
"description": "pair: other installed node server from ssh_list_servers. revoke: exact peer grant name from inspect.node.peers[].name, not a server name.",
"type": "string"
},
"peerInstance": {
"description": "Pair only. Instance on peer. Required whenever the instance field is present. Pass null for the peer's default node.",
"pattern": "^[a-z0-9-]{1,40}$",
"type": [
"string",
"null"
]
},
"protocol": {
"description": "pair only: auto negotiates supported QUIC/TCP connectivity; quic or tcp restricts the pair. Check loaded links for the actual transport and NAT reachability.",
"enum": [
"auto",
"quic",
"tcp"
],
"type": "string"
},
"queueIfStopped": {
"default": false,
"description": "Managed configure only. Explicit true allows one unopened Grant to wait on a stopped node. queued is pending, configurationSaved=false and runtimeLoaded=false; this never starts the service.",
"type": "boolean"
},
"scope": {
"default": "identity",
"description": "revoke only; omitted means identity. identity removes the peer together with its outbound links, reverse connections, forwards and probes, and disconnects existing connections in both directions. inbound clears the peer's connect, listen, files and introduce grants and immediately drops its established inbound connections and in-flight streams, while keeping its authenticated identity and the authorized outbound links usable. The result reports the saved configuration and the loaded runtime as two separate fields; the peer is revoked only when the loaded-runtime field is true.",
"enum": [
"identity",
"inbound"
],
"type": "string"
},
"server": {
"description": "SSH management profile from ssh_list_servers, or @local for the embedded device in this shared companion. @local uses this companion profile. action=startup with startup=login|boot|off|status manages its owned supervisor; omit instance. install initializes identity; start/stop control only the embedded node.",
"type": "string"
},
"startup": {
"description": "Startup policy. @local action=startup accepts login|boot|off|status and no instance. Remote install uses auto/login/boot as supported by the OS account; boot needs appropriate permission. A saved startup policy is not a reboot test.",
"enum": [
"auto",
"login",
"boot",
"off",
"status"
],
"type": "string"
},
"stun": {
"default": [],
"description": "Managed public STUN intentions. New material needs explicit complementary intentions for two verified managed endpoints in the same pair operation. No private key or secret is accepted.",
"items": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"action": {
"const": "keep"
},
"role": {
"enum": [
"responder",
"requester"
]
},
"secret": {
"additionalProperties": false,
"properties": {
"fingerprint": {
"pattern": "^[0-9a-f]{64}$",
"type": "string"
},
"generation": {
"minimum": 0,
"type": "integer"
},
"key_id": {
"pattern": "^[0-9a-f]{16}$",
"type": "string"
},
"purpose": {
"const": "mapped_address_discovery"
},
"requester": {
"format": "uuid",
"type": "string"
},
"responder": {
"format": "uuid",
"type": "string"
},
"vault": {
"additionalProperties": false,
"properties": {
"id": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
},
"version": {
"minimum": 0,
"type": "integer"
}
},
"required": [
"id",
"version"
],
"type": "object"
}
},
"required": [
"vault",
"responder",
"requester",
"key_id",
"generation",
"purpose",
"fingerprint"
],
"type": "object"
}
},
"required": [
"action",
"secret",
"role"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"action": {
"const": "install_retained"
},
"role": {
"enum": [
"responder",
"requester"
]
},
"secret": {
"additionalProperties": false,
"properties": {
"fingerprint": {
"pattern": "^[0-9a-f]{64}$",
"type": "string"
},
"generation": {
"minimum": 0,
"type": "integer"
},
"key_id": {
"pattern": "^[0-9a-f]{16}$",
"type": "string"
},
"purpose": {
"const": "mapped_address_discovery"
},
"requester": {
"format": "uuid",
"type": "string"
},
"responder": {
"format": "uuid",
"type": "string"
},
"vault": {
"additionalProperties": false,
"properties": {
"id": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
},
"version": {
"minimum": 0,
"type": "integer"
}
},
"required": [
"id",
"version"
],
"type": "object"
}
},
"required": [
"vault",
"responder",
"requester",
"key_id",
"generation",
"purpose",
"fingerprint"
],
"type": "object"
}
},
"required": [
"action",
"secret",
"role"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"action": {
"const": "revoke"
},
"role": {
"enum": [
"responder",
"requester"
]
},
"secret": {
"additionalProperties": false,
"properties": {
"fingerprint": {
"pattern": "^[0-9a-f]{64}$",
"type": "string"
},
"generation": {
"minimum": 0,
"type": "integer"
},
"key_id": {
"pattern": "^[0-9a-f]{16}$",
"type": "string"
},
"purpose": {
"const": "mapped_address_discovery"
},
"requester": {
"format": "uuid",
"type": "string"
},
"responder": {
"format": "uuid",
"type": "string"
},
"vault": {
"additionalProperties": false,
"properties": {
"id": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
},
"version": {
"minimum": 0,
"type": "integer"
}
},
"required": [
"id",
"version"
],
"type": "object"
}
},
"required": [
"vault",
"responder",
"requester",
"key_id",
"generation",
"purpose",
"fingerprint"
],
"type": "object"
}
},
"required": [
"action",
"secret",
"role"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"action": {
"const": "install_new"
},
"address": {
"description": "Requester requires the explicit numeric discovery endpoint. Both endpoint intentions must share this operation and intentId.",
"type": [
"string",
"null"
]
},
"intentId": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
},
"purpose": {
"const": "mapped_address_discovery"
},
"requester": {
"format": "uuid",
"type": "string"
},
"responder": {
"format": "uuid",
"type": "string"
},
"role": {
"enum": [
"responder",
"requester"
]
}
},
"required": [
"action",
"intentId",
"responder",
"requester",
"role",
"purpose"
],
"type": "object"
}
]
},
"type": "array"
},
"update": {
"additionalProperties": false,
"description": "configure only. expectedRevision is required. Supplied fields are complete replacements; omitted fields remain unchanged. Non-empty update.stun requires explicit complete update.connectivity; empty stun permits omitted connectivity. Managed nodes use PublicNodeUpdate: public connectivity references and optional public stun intentions, never private STUN keys or secrets. Legacy nodes retain their existing credential-preservation rules. Identity, capabilities, receiving binding and resource limits are not input fields.",
"if": {
"properties": {
"stun": {
"minItems": 1,
"type": "array"
}
},
"required": [
"stun"
]
},
"properties": {
"connectivity": {
"anyOf": [
{
"additionalProperties": false,
"description": "Complete native P2P configuration; omitted STUN keys and server lists retain existing values. UDP/QUIC and optional TCP reuse each bound port for discovery, punching and authenticated connections. Set enabled=false to stop P2P. Initial enable is hot; changing bound ports of a running engine needs a scoped node restart.",
"properties": {
"advertised": {
"description": "Reachable UDP endpoints advertised for this node.",
"items": {
"description": "Numeric unicast IP:port with nonzero port.",
"type": "string"
},
"maxItems": 8,
"type": "array"
},
"bind": {
"description": "UDP bind, e.g. 0.0.0.0:0. Port 0 allocates and saves a persistent port.",
"type": "string"
},
"coordinate": {
"description": "Allow mutually granted peers to exchange candidates over authenticated connections.",
"type": "boolean"
},
"discovery": {
"description": "Answer bounded STUN discovery requests. Configured stun_keys require authenticated private STUN; an empty key list retains public discovery. This is not a traffic relay.",
"type": "boolean"
},
"enabled": {
"default": true,
"type": "boolean"
},
"forwards": {
"items": {
"additionalProperties": false,
"properties": {
"id": {
"type": "string"
},
"link": {
"type": "string"
},
"listen": {
"description": "Numeric bind IP:port with a nonzero port for a stable forwarding listener address.",
"type": "string"
},
"target": {
"type": "string"
}
},
"required": [
"id",
"link",
"listen",
"target"
],
"type": "object"
},
"maxItems": 32,
"type": "array"
},
"links": {
"items": {
"additionalProperties": false,
"properties": {
"candidates": {
"items": {
"description": "Numeric unicast IP:port with nonzero port.",
"type": "string"
},
"maxItems": 8,
"type": "array"
},
"certificate": {
"type": "string"
},
"coordinator": {
"additionalProperties": false,
"properties": {
"address": {
"type": [
"string",
"null"
]
},
"certificate": {
"type": "string"
},
"target_peer": {
"type": "string"
},
"tcp_address": {
"type": [
"string",
"null"
]
}
},
"required": [
"certificate",
"target_peer"
],
"type": [
"object",
"null"
]
},
"id": {
"type": "string"
},
"protocol": {
"default": "auto",
"description": "auto tries QUIC then TCP and retains a working path. tcp forces TCP. NAT success depends on the network.",
"enum": [
"auto",
"quic",
"tcp"
],
"type": "string"
},
"tcp_candidates": {
"items": {
"description": "Numeric unicast IP:port with nonzero port.",
"type": "string"
},
"maxItems": 8,
"type": "array"
}
},
"required": [
"id",
"certificate"
],
"type": "object"
},
"maxItems": 16,
"type": "array"
},
"stun_keys": {
"description": "Accepted private STUN keys with unique case-insensitive IDs. Omit to retain the complete list; null or [] clears it. Public output retains IDs and omits secrets. An existing ID may omit secret to retain it; a new ID requires the complete secret.",
"items": {
"additionalProperties": false,
"properties": {
"id": {
"description": "Eight-byte STUN key identifier, encoded as 16 hexadecimal characters.",
"pattern": "^[0-9a-fA-F]{16}$",
"type": "string"
},
"secret": {
"description": "32-byte secret encoded as 64 hexadecimal characters. Never returned in public output. Omit only to retain an existing matching key.",
"pattern": "^[0-9a-fA-F]{64}$",
"type": "string"
}
},
"required": [
"id"
],
"type": "object"
},
"maxItems": 256,
"type": [
"array",
"null"
],
"uniqueItems": true
},
"stun_servers": {
"description": "STUN discovery endpoints; they do not carry file payloads. Omit to retain the complete existing list; null or [] clears it. An explicit array replaces the address list. A retained address without stun_key keeps its key; stun_key:null explicitly clears it.",
"items": {
"oneOf": [
{
"description": "Numeric unicast IP:port. Retains any existing key for the same numeric address.",
"type": "string"
},
{
"additionalProperties": false,
"properties": {
"address": {
"description": "Numeric unicast IP:port with a nonzero port.",
"type": "string"
},
"stun_key": {
"description": "Omit to retain this address's existing key; null clears it. An ID without secret retains a key only when both its address and case-insensitive ID match.",
"oneOf": [
{
"type": "null"
},
{
"additionalProperties": false,
"properties": {
"id": {
"description": "Eight-byte STUN key identifier, encoded as 16 hexadecimal characters.",
"pattern": "^[0-9a-fA-F]{16}$",
"type": "string"
},
"secret": {
"description": "32-byte secret encoded as 64 hexadecimal characters. Never returned in public output. Omit only to retain an existing matching key.",
"pattern": "^[0-9a-fA-F]{64}$",
"type": "string"
}
},
"required": [
"id"
],
"type": "object"
}
]
}
},
"required": [
"address"
],
"type": "object"
}
]
},
"maxItems": 4,
"type": [
"array",
"null"
]
},
"tcp_advertised": {
"description": "Reachable TCP endpoints advertised for this node; separate from UDP advertised addresses.",
"items": {
"description": "Numeric unicast IP:port with nonzero port.",
"type": "string"
},
"maxItems": 8,
"type": "array"
},
"tcp_bind": {
"description": "Enable TCP punching with e.g. 0.0.0.0:0; null disables TCP.",
"type": [
"string",
"null"
]
}
},
"required": [
"bind"
],
"type": "object"
},
{
"additionalProperties": false,
"description": "Managed nodes: complete public connectivity configuration. Use public STUN references and update.stun intentions; private keys and secrets are rejected. Omitted fields inside this supplied object use their defaults.",
"properties": {
"advertised": {
"description": "Reachable UDP endpoints advertised for this node.",
"items": {
"description": "Numeric unicast IP:port with nonzero port.",
"type": "string"
},
"maxItems": 8,
"type": "array"
},
"bind": {
"description": "UDP bind, e.g. 0.0.0.0:0. Port 0 allocates and saves a persistent port.",
"type": "string"
},
"coordinate": {
"description": "Allow mutually granted peers to exchange candidates over authenticated connections.",
"type": "boolean"
},
"discovery": {
"description": "Answer bounded STUN discovery requests. Configured stun_keys require authenticated private STUN; an empty key list retains public discovery. This is not a traffic relay.",
"type": "boolean"
},
"enabled": {
"default": true,
"type": "boolean"
},
"forwards": {
"items": {
"additionalProperties": false,
"properties": {
"id": {
"type": "string"
},
"link": {
"type": "string"
},
"listen": {
"description": "Numeric bind IP:port with a nonzero port for a stable forwarding listener address.",
"type": "string"
},
"target": {
"type": "string"
}
},
"required": [
"id",
"link",
"listen",
"target"
],
"type": "object"
},
"maxItems": 32,
"type": "array"
},
"links": {
"items": {
"additionalProperties": false,
"properties": {
"candidates": {
"items": {
"description": "Numeric unicast IP:port with nonzero port.",
"type": "string"
},
"maxItems": 8,
"type": "array"
},
"certificate": {
"type": "string"
},
"coordinator": {
"additionalProperties": false,
"properties": {
"address": {
"type": [
"string",
"null"
]
},
"certificate": {
"type": "string"
},
"target_peer": {
"type": "string"
},
"tcp_address": {
"type": [
"string",
"null"
]
}
},
"required": [
"certificate",
"target_peer"
],
"type": [
"object",
"null"
]
},
"id": {
"type": "string"
},
"protocol": {
"default": "auto",
"description": "auto tries QUIC then TCP and retains a working path. tcp forces TCP. NAT success depends on the network.",
"enum": [
"auto",
"quic",
"tcp"
],
"type": "string"
},
"tcp_candidates": {
"items": {
"description": "Numeric unicast IP:port with nonzero port.",
"type": "string"
},
"maxItems": 8,
"type": "array"
}
},
"required": [
"id",
"certificate"
],
"type": "object"
},
"maxItems": 16,
"type": "array"
},
"stun_keys": {
"items": {
"additionalProperties": false,
"properties": {
"fingerprint": {
"pattern": "^[0-9a-f]{64}$",
"type": "string"
},
"generation": {
"minimum": 0,
"type": "integer"
},
"key_id": {
"pattern": "^[0-9a-f]{16}$",
"type": "string"
},
"purpose": {
"const": "mapped_address_discovery"
},
"requester": {
"format": "uuid",
"type": "string"
},
"responder": {
"format": "uuid",
"type": "string"
},
"vault": {
"additionalProperties": false,
"properties": {
"id": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
},
"version": {
"minimum": 0,
"type": "integer"
}
},
"required": [
"id",
"version"
],
"type": "object"
}
},
"required": [
"vault",
"responder",
"requester",
"key_id",
"generation",
"purpose",
"fingerprint"
],
"type": "object"
},
"maxItems": 256,
"type": "array"
},
"stun_servers": {
"items": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"address": {
"type": "string"
},
"kind": {
"const": "public"
}
},
"required": [
"kind",
"address"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"address": {
"type": "string"
},
"kind": {
"const": "managed"
},
"secret": {
"additionalProperties": false,
"properties": {
"fingerprint": {
"pattern": "^[0-9a-f]{64}$",
"type": "string"
},
"generation": {
"minimum": 0,
"type": "integer"
},
"key_id": {
"pattern": "^[0-9a-f]{16}$",
"type": "string"
},
"purpose": {
"const": "mapped_address_discovery"
},
"requester": {
"format": "uuid",
"type": "string"
},
"responder": {
"format": "uuid",
"type": "string"
},
"vault": {
"additionalProperties": false,
"properties": {
"id": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
},
"version": {
"minimum": 0,
"type": "integer"
}
},
"required": [
"id",
"version"
],
"type": "object"
}
},
"required": [
"vault",
"responder",
"requester",
"key_id",
"generation",
"purpose",
"fingerprint"
],
"type": "object"
}
},
"required": [
"kind",
"address",
"secret"
],
"type": "object"
}
]
},
"maxItems": 4,
"type": "array"
},
"tcp_advertised": {
"description": "Reachable TCP endpoints advertised for this node; separate from UDP advertised addresses.",
"items": {
"description": "Numeric unicast IP:port with nonzero port.",
"type": "string"
},
"maxItems": 8,
"type": "array"
},
"tcp_bind": {
"description": "Enable TCP punching with e.g. 0.0.0.0:0; null disables TCP.",
"type": [
"string",
"null"
]
}
},
"required": [
"bind"
],
"type": "object"
}
]
},
"expectedRevision": {
"description": "Required configure revision from the most recent node inspect. Do not use a cluster or route revision.",
"minimum": 0,
"type": "integer"
},
"peers": {
"description": "Complete peer grant list when supplied. Preserve unrelated entries; [] revokes all peers and their loaded streams.",
"items": {
"additionalProperties": false,
"properties": {
"certificate": {
"description": "Peer public TLS certificate from node inspect; required for P2P.",
"type": [
"string",
"null"
]
},
"connect": {
"description": "Exact numeric IP:port targets this identity may connect to.",
"items": {
"type": "string"
},
"maxItems": 64,
"type": "array"
},
"files": {
"description": "Limited file tasks for this authenticated peer; 64 tasks total per node. New grants are pinned by the receiving node. Empty array revokes file access and active streams. Native identity directories cannot be granted.",
"items": {
"additionalProperties": false,
"properties": {
"delete": {
"description": "Deletion requires write=true and exact expected content versions.",
"type": "boolean"
},
"expiresAt": {
"description": "Unix timestamp in seconds, at most 24 hours ahead. Expiry cancels file operations; it is not a millisecond timeout.",
"type": "integer"
},
"pin": {
"description": "Omit for a new grant; preserve the returned pin when retaining a grant. A changed anchor identity is rejected.",
"oneOf": [
{
"type": "null"
},
{
"additionalProperties": false,
"properties": {
"anchor": {
"type": "string"
},
"identity": {
"type": "string"
},
"relative": {
"type": "string"
}
},
"required": [
"anchor",
"relative",
"identity"
],
"type": "object"
}
]
},
"read": {
"const": true,
"description": "Required for content and version checks."
},
"root": {
"description": "Absolute directory on this receiving node. Relative protocol paths stay inside it; symlinks, hardlinks and Windows reserved names are rejected.",
"type": "string"
},
"sources": {
"description": "Exact source link/task pairs this receiver may pull. Empty prevents delegated source reads.",
"items": {
"additionalProperties": false,
"properties": {
"link": {
"type": "string"
},
"task": {
"type": "string"
}
},
"required": [
"link",
"task"
],
"type": "object"
},
"maxItems": 32,
"type": "array"
},
"task": {
"description": "Unpredictable task ID shared only with its participants; letters, digits, - and _.",
"maxLength": 128,
"minLength": 8,
"type": "string"
},
"write": {
"type": "boolean"
}
},
"required": [
"task",
"root",
"read",
"write",
"delete",
"expiresAt"
],
"type": "object"
},
"maxItems": 64,
"type": "array"
},
"introduce": {
"description": "On a coordinator, other registered peer names this identity may discover. Both sides must grant each other. Gives no business forwarding permission.",
"items": {
"type": "string"
},
"maxItems": 64,
"type": "array"
},
"listen": {
"description": "Exact numeric IP:port reverse listeners this identity may create.",
"items": {
"type": "string"
},
"maxItems": 64,
"type": "array"
},
"name": {
"description": "Stable local grant name for this peer; revoke uses this exact name, not necessarily a server name.",
"type": "string"
},
"public_key": {
"description": "Peer OpenSSH public key from node inspect.",
"type": "string"
}
},
"required": [
"name",
"public_key"
],
"type": "object"
},
"maxItems": 256,
"type": "array"
},
"probes": {
"description": "Complete periodic probe list on this node; empty disables probes. Two concurrent probes maximum. Targets are explicit; no subnet scan. Preserve other owners when editing. RTT is endpoint-specific; failure rate is probe failure, not physical packet loss.",
"items": {
"additionalProperties": false,
"properties": {
"id": {
"maxLength": 96,
"type": "string"
},
"intervalMs": {
"default": 10000,
"description": "Probe interval in milliseconds; 10000 = 10 seconds. Must be at least timeoutMs.",
"maximum": 300000,
"minimum": 1000,
"type": "integer"
},
"owner": {
"maxLength": 64,
"type": [
"string",
"null"
]
},
"target": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"address": {
"description": "Exact numeric endpoint this device actively connects to; measures TCP connection establishment.",
"type": "string"
},
"kind": {
"const": "tcp"
}
},
"required": [
"kind",
"address"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"kind": {
"const": "p2p"
},
"link": {
"description": "Configured authenticated peer link; measures application ping over its actual QUIC/TCP connection.",
"type": "string"
}
},
"required": [
"kind",
"link"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"kind": {
"const": "forward"
},
"link": {
"type": "string"
},
"target": {
"description": "Exact TCP destination granted by that peer; measures the complete native open and target connection.",
"type": "string"
}
},
"required": [
"kind",
"link",
"target"
],
"type": "object"
}
]
},
"timeoutMs": {
"default": 2000,
"description": "Milliseconds; 1000 = 1 second. Must not exceed intervalMs.",
"maximum": 10000,
"minimum": 100,
"type": "integer"
},
"window": {
"default": 30,
"description": "Number of recent probe samples retained, not seconds.",
"maximum": 60,
"minimum": 2,
"type": "integer"
}
},
"required": [
"id",
"target"
],
"type": "object"
},
"maxItems": 16,
"type": "array"
},
"reverse": {
"items": {
"additionalProperties": false,
"properties": {
"gateway": {
"type": "string"
},
"gateway_public_key": {
"type": "string"
},
"generation": {
"description": "Increment to reconnect this reverse link.",
"minimum": 0,
"type": "integer"
},
"id": {
"type": "string"
},
"listen": {
"type": "string"
},
"target": {
"type": "string"
}
},
"required": [
"id",
"gateway",
"gateway_public_key",
"listen",
"target"
],
"type": "object"
},
"maxItems": 64,
"type": "array"
},
"stun": {
"default": [],
"description": "configure only: public STUN intentions. A non-empty update.stun requires an explicit complete update.connectivity object; omitted or null connectivity is rejected before center or SSH access. Inspect before retrying the original request; do not merge later saved references into it. Empty stun permits omitted connectivity.",
"items": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"action": {
"const": "keep"
},
"role": {
"enum": [
"responder",
"requester"
]
},
"secret": {
"additionalProperties": false,
"properties": {
"fingerprint": {
"pattern": "^[0-9a-f]{64}$",
"type": "string"
},
"generation": {
"minimum": 0,
"type": "integer"
},
"key_id": {
"pattern": "^[0-9a-f]{16}$",
"type": "string"
},
"purpose": {
"const": "mapped_address_discovery"
},
"requester": {
"format": "uuid",
"type": "string"
},
"responder": {
"format": "uuid",
"type": "string"
},
"vault": {
"additionalProperties": false,
"properties": {
"id": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
},
"version": {
"minimum": 0,
"type": "integer"
}
},
"required": [
"id",
"version"
],
"type": "object"
}
},
"required": [
"vault",
"responder",
"requester",
"key_id",
"generation",
"purpose",
"fingerprint"
],
"type": "object"
}
},
"required": [
"action",
"secret",
"role"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"action": {
"const": "install_retained"
},
"role": {
"enum": [
"responder",
"requester"
]
},
"secret": {
"additionalProperties": false,
"properties": {
"fingerprint": {
"pattern": "^[0-9a-f]{64}$",
"type": "string"
},
"generation": {
"minimum": 0,
"type": "integer"
},
"key_id": {
"pattern": "^[0-9a-f]{16}$",
"type": "string"
},
"purpose": {
"const": "mapped_address_discovery"
},
"requester": {
"format": "uuid",
"type": "string"
},
"responder": {
"format": "uuid",
"type": "string"
},
"vault": {
"additionalProperties": false,
"properties": {
"id": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
},
"version": {
"minimum": 0,
"type": "integer"
}
},
"required": [
"id",
"version"
],
"type": "object"
}
},
"required": [
"vault",
"responder",
"requester",
"key_id",
"generation",
"purpose",
"fingerprint"
],
"type": "object"
}
},
"required": [
"action",
"secret",
"role"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"action": {
"const": "revoke"
},
"role": {
"enum": [
"responder",
"requester"
]
},
"secret": {
"additionalProperties": false,
"properties": {
"fingerprint": {
"pattern": "^[0-9a-f]{64}$",
"type": "string"
},
"generation": {
"minimum": 0,
"type": "integer"
},
"key_id": {
"pattern": "^[0-9a-f]{16}$",
"type": "string"
},
"purpose": {
"const": "mapped_address_discovery"
},
"requester": {
"format": "uuid",
"type": "string"
},
"responder": {
"format": "uuid",
"type": "string"
},
"vault": {
"additionalProperties": false,
"properties": {
"id": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
},
"version": {
"minimum": 0,
"type": "integer"
}
},
"required": [
"id",
"version"
],
"type": "object"
}
},
"required": [
"vault",
"responder",
"requester",
"key_id",
"generation",
"purpose",
"fingerprint"
],
"type": "object"
}
},
"required": [
"action",
"secret",
"role"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"action": {
"const": "install_new"
},
"address": {
"description": "Requester requires the explicit numeric discovery endpoint. Both endpoint intentions must share this operation and intentId.",
"type": [
"string",
"null"
]
},
"intentId": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
},
"purpose": {
"const": "mapped_address_discovery"
},
"requester": {
"format": "uuid",
"type": "string"
},
"responder": {
"format": "uuid",
"type": "string"
},
"role": {
"enum": [
"responder",
"requester"
]
}
},
"required": [
"action",
"intentId",
"responder",
"requester",
"role",
"purpose"
],
"type": "object"
}
]
},
"type": "array"
}
},
"required": [
"expectedRevision"
],
"then": {
"properties": {
"connectivity": {
"type": "object"
}
},
"required": [
"connectivity"
]
},
"type": "object"
}
},
"required": [
"action",
"server"
],
"type": "object"
}ssh_route_inspect只读查看路由与连接状态
Inspect configured SSH routes, native devices, owned resources and observations before changing a route or repairing connectivity.
输入参数
server is optional and comes from ssh_list_servers. probe=true makes fresh SSH and read-only resource checks; omit for a snapshot. resourceIds narrows probes. planId instead reads a prior apply receipt without probing.
返回结果与后续处理
Distinguish desired config from timestamped observations; cached/stale is not live proof. With probe=true, recorded lists for each probed resource whether its observation was saved, with code and message when not; an observation that was not saved is still returned and does not fail the call. Use returned device/resource IDs and current revisions in ssh_route_plan. After an interrupted apply, query its planId before retrying.
调用示例
{
"probe": true,
"server": "web-a"
}参数说明
| 字段 | 类型与默认值 | 说明 |
|---|---|---|
| planId | string | Read the durable receipt of an apply operation, including partial failure or rollback. Omit server/probe when supplied. |
| probe | boolean默认 false | Perform fresh SSH authentication and read-only native/service/listener probes for selected resources. Resource observations are timestamped and saved without changing desired topology; recorded reports each save. |
| resourceIds | array | Optional resource IDs from previous inspect. With probe=true, refresh only these resources. Otherwise server selects its route resources; omitted server selects the graph, capped at 64 probes. |
| server | string | Optional target name from ssh_list_servers. Omit to inspect all registered targets. |
查看完整 JSON Schema
{
"additionalProperties": true,
"examples": [
{
"probe": true,
"server": "web-a"
}
],
"properties": {
"planId": {
"description": "Read the durable receipt of an apply operation, including partial failure or rollback. Omit server/probe when supplied.",
"type": "string"
},
"probe": {
"default": false,
"description": "Perform fresh SSH authentication and read-only native/service/listener probes for selected resources. Resource observations are timestamped and saved without changing desired topology; recorded reports each save.",
"type": "boolean"
},
"resourceIds": {
"description": "Optional resource IDs from previous inspect. With probe=true, refresh only these resources. Otherwise server selects its route resources; omitted server selects the graph, capped at 64 probes.",
"items": {
"type": "string"
},
"maxItems": 64,
"type": "array"
},
"server": {
"description": "Optional target name from ssh_list_servers. Omit to inspect all registered targets.",
"type": "string"
}
},
"required": [],
"type": "object"
}ssh_route_plan生成改路方案
Prepare a five-minute route/resource change plan. This saves a plan but does not apply live route or service changes. Inspect the existing route first.
输入参数
operation and server are required. via is the entire ordered SSH hop list; [] means direct, never an implicit fallback. Native ingress also needs inspected sourceDevice/receiving device UUIDs. resources replace exact owned definitions; resourceIds references dependencies. rollback needs rollbackPlanId.
返回结果与后续处理
Review the returned changes, then pass its exact planId and expectedRevision to ssh_route_apply. Shared dependencies and self-severing management paths are protected. Expired/stale plans require fresh inspection and a new plan.
调用示例
{
"operation": "create",
"server": "web-a",
"via": [
"bastion"
]
}参数说明
| 字段 | 类型与默认值 | 说明 |
|---|---|---|
| description | string | Optional route note; does not define the route or replace structured resource fields. |
| ingress | 多种形式 | Transport to the first SSH hop (or final server when via=[]). It preserves SSH login, target host-key and command permissions. null removes an ingress. target is a numeric socket address as seen on device. Existing explicit SSH hops are still honored. |
| operation必填 | stringcreate · update · adopt · repair · disable · remove · rollback · set | Desired plan operation. Creates a saved plan only; inspect and apply its returned planId/revision separately. remove omits via; rollback needs rollbackPlanId. |
| removeResources | array | Owned resource IDs to retire. Refused while another route or resource still needs them. |
| resourceIds | array | Existing or planned resource IDs this route depends on. Required when adopt supplies a nonempty resources array. Shared dependencies prevent implicit removal. |
| resources | array | Exact resource replacements in this plan. Native node identities must already be installed and inspected. Changes preserve unmentioned resources and peer permissions. |
| rollbackPlanId | string | rollback only: exact prior applied plan ID whose previous route will be restored. |
| server必填 | string | Target SSH profile from ssh_list_servers. |
| sourceDevice | string | Stable ID of the initiating companion from ssh_node_manage @local. Required for native/P2P ingress. Omit only for an unscoped SSH override. |
| sourceInstance | string | Named local instance, if used when installing sourceDevice. |
| via | array | Entire ordered path from this device to target. [] means direct; omitted only for remove. |
查看完整 JSON Schema
{
"additionalProperties": true,
"examples": [
{
"operation": "create",
"server": "web-a",
"via": [
"bastion"
]
}
],
"properties": {
"description": {
"description": "Optional route note; does not define the route or replace structured resource fields.",
"type": "string"
},
"ingress": {
"description": "Transport to the first SSH hop (or final server when via=[]). It preserves SSH login, target host-key and command permissions. null removes an ingress. target is a numeric socket address as seen on device. Existing explicit SSH hops are still honored.",
"oneOf": [
{
"type": "null"
},
{
"additionalProperties": false,
"properties": {
"coordinator": {
"description": "Optional registered introduction node ID. Never carries application bytes unless independently selected as a gateway.",
"type": [
"string",
"null"
]
},
"device": {
"description": "Registered receiving node ID.",
"format": "uuid",
"type": "string"
},
"fallback": {
"default": false,
"description": "Explicitly allow the configured SSH route if P2P cannot connect; actual fallback is reported.",
"type": "boolean"
},
"kind": {
"const": "p2p"
},
"protocol": {
"default": "auto",
"enum": [
"auto",
"quic",
"tcp"
]
},
"target": {
"description": "Authorized SSH service endpoint on the receiving device, e.g. 127.0.0.1:22.",
"type": "string"
},
"timeout_ms": {
"default": 8000,
"description": "P2P connect timeout in milliseconds; 10000 = 10 seconds.",
"maximum": 120000,
"minimum": 100,
"type": "integer"
}
},
"required": [
"kind",
"device",
"target"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"device": {
"format": "uuid",
"type": "string"
},
"gateway": {
"description": "Native gateway numeric SSH listener reachable from this companion.",
"type": "string"
},
"kind": {
"const": "native"
},
"target": {
"description": "Numeric endpoint reached by the gateway; may be its loopback reverse listener.",
"type": "string"
}
},
"required": [
"kind",
"device",
"gateway",
"target"
],
"type": "object"
}
]
},
"operation": {
"description": "Desired plan operation. Creates a saved plan only; inspect and apply its returned planId/revision separately. remove omits via; rollback needs rollbackPlanId.",
"enum": [
"create",
"update",
"adopt",
"repair",
"disable",
"remove",
"rollback",
"set"
],
"type": "string"
},
"removeResources": {
"description": "Owned resource IDs to retire. Refused while another route or resource still needs them.",
"items": {
"type": "string"
},
"maxItems": 32,
"type": "array"
},
"resourceIds": {
"description": "Existing or planned resource IDs this route depends on. Required when adopt supplies a nonempty resources array. Shared dependencies prevent implicit removal.",
"items": {
"type": "string"
},
"maxItems": 32,
"type": "array"
},
"resources": {
"description": "Exact resource replacements in this plan. Native node identities must already be installed and inspected. Changes preserve unmentioned resources and peer permissions.",
"items": {
"additionalProperties": false,
"properties": {
"dependencies": {
"items": {
"type": "string"
},
"type": "array"
},
"enabled": {
"type": "boolean"
},
"evidence": {
"type": "null"
},
"id": {
"description": "Stable resource ID, unique in this authority.",
"type": "string"
},
"owner": {
"description": "Registered node device ID, from ssh_node_manage or ssh_route_inspect.",
"format": "uuid",
"type": "string"
},
"persistent": {
"description": "Whether the node supervisor must survive client exit; startup scope is visible in the node installation.",
"type": "boolean"
},
"revision": {
"description": "Resource generation; increment when replacing a native reverse link.",
"minimum": 0,
"type": "integer"
},
"spec": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"device": {
"description": "Registered node device ID, from ssh_node_manage or ssh_route_inspect.",
"format": "uuid",
"type": "string"
},
"kind": {
"const": "node"
}
},
"required": [
"kind",
"device"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"client": {
"description": "Registered node device ID, from ssh_node_manage or ssh_route_inspect.",
"format": "uuid",
"type": "string"
},
"gateway": {
"description": "Registered node device ID, from ssh_node_manage or ssh_route_inspect.",
"format": "uuid",
"type": "string"
},
"gateway_address": {
"description": "Numeric IP:port interpreted on the named device; IPv6 must use [address]:port.",
"type": "string"
},
"kind": {
"const": "reverse"
},
"link_id": {
"description": "Owned native reverse link ID on client.",
"type": "string"
},
"listen": {
"description": "Numeric IP:port interpreted on the named device; IPv6 must use [address]:port.",
"type": "string"
},
"target": {
"description": "Numeric IP:port interpreted on the named device; IPv6 must use [address]:port.",
"type": "string"
}
},
"required": [
"kind",
"client",
"gateway",
"gateway_address",
"listen",
"target",
"link_id"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"kind": {
"const": "forward"
},
"link_id": {
"description": "Owned P2P forward ID on source.",
"type": "string"
},
"listen": {
"description": "Numeric IP:port interpreted on the named device; IPv6 must use [address]:port.",
"type": "string"
},
"peer": {
"description": "Registered node device ID, from ssh_node_manage or ssh_route_inspect.",
"format": "uuid",
"type": "string"
},
"source": {
"description": "Registered node device ID, from ssh_node_manage or ssh_route_inspect.",
"format": "uuid",
"type": "string"
},
"target": {
"description": "Numeric IP:port interpreted on the named device; IPv6 must use [address]:port.",
"type": "string"
}
},
"required": [
"kind",
"source",
"peer",
"listen",
"target",
"link_id"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"backend": {
"enum": [
"systemd",
"windows-service",
"windows-task",
"process"
]
},
"configuration_files": {
"description": "Absolute service script/config paths whose hashes and declared mapping must be verified, e.g. a scheduled task's PowerShell script. Content is never returned.",
"items": {
"type": "string"
},
"maxItems": 8,
"type": "array"
},
"executable": {
"description": "Executable recorded in the service or its configuration script.",
"type": "string"
},
"kind": {
"const": "external"
},
"listener": {
"additionalProperties": false,
"properties": {
"address": {
"description": "Numeric IP:port interpreted on the named device; IPv6 must use [address]:port.",
"type": "string"
},
"device": {
"description": "Registered node device ID, from ssh_node_manage or ssh_route_inspect.",
"format": "uuid",
"type": "string"
}
},
"required": [
"device",
"address"
],
"type": "object"
},
"manager": {
"description": "Catalog SSH profile controlling this service; may differ from the target SSH server.",
"type": "string"
},
"mappings": {
"description": "Additional listeners owned by this same service. Their presence protects the shared service from stop/removal.",
"items": {
"additionalProperties": false,
"properties": {
"address": {
"description": "Numeric IP:port interpreted on the named device; IPv6 must use [address]:port.",
"type": "string"
},
"device": {
"description": "Registered node device ID, from ssh_node_manage or ssh_route_inspect.",
"format": "uuid",
"type": "string"
}
},
"required": [
"device",
"address"
],
"type": "object"
},
"maxItems": 64,
"type": "array"
},
"service": {
"description": "Exact supervisor name; for backend=process, a descriptive observation label. Process observations require persistent=false and are read-only: no start, stop or repair; removal forgets only the record.",
"type": "string"
},
"target": {
"additionalProperties": false,
"properties": {
"address": {
"description": "Numeric IP:port interpreted on the named device; IPv6 must use [address]:port.",
"type": "string"
},
"device": {
"description": "Registered node device ID, from ssh_node_manage or ssh_route_inspect.",
"format": "uuid",
"type": "string"
}
},
"required": [
"device",
"address"
],
"type": "object"
}
},
"required": [
"kind",
"manager",
"service",
"backend",
"executable",
"listener",
"target"
],
"type": "object"
}
]
}
},
"required": [
"id",
"owner",
"spec",
"persistent",
"enabled",
"revision"
],
"type": "object"
},
"maxItems": 32,
"type": "array"
},
"rollbackPlanId": {
"description": "rollback only: exact prior applied plan ID whose previous route will be restored.",
"type": "string"
},
"server": {
"description": "Target SSH profile from ssh_list_servers.",
"type": "string"
},
"sourceDevice": {
"description": "Stable ID of the initiating companion from ssh_node_manage @local. Required for native/P2P ingress. Omit only for an unscoped SSH override.",
"format": "uuid",
"type": "string"
},
"sourceInstance": {
"description": "Named local instance, if used when installing sourceDevice.",
"type": "string"
},
"via": {
"description": "Entire ordered path from this device to target. [] means direct; omitted only for remove.",
"items": {
"type": "string"
},
"maxItems": 8,
"type": "array"
}
},
"required": [
"operation",
"server"
],
"type": "object"
}ssh_route_apply执行改路方案
Apply a reviewed ssh_route_plan and verify target SSH authentication before committing the authority revision.
输入参数
Use the exact planId and expectedRevision returned together by ssh_route_plan; never guess a revision or rebuild a plan from an error message. Existing SSH permissions and mandatory hops remain in force.
返回结果与后续处理
Returns verified, rolled_back or recovery_required with step evidence. A repeat of a verified plan returns its receipt. Failure can leave partial runtime effects: inspect this planId before any repair; active commands are never replayed.
调用示例
{
"expectedRevision": 3,
"planId": "plan_id_from_route_plan"
}参数说明
| 字段 | 类型与默认值 | 说明 |
|---|---|---|
| expectedRevision必填 | integer | Exact expectedRevision returned with that plan. |
| planId必填 | string | Exact planId returned by ssh_route_plan; never invent it. |
查看完整 JSON Schema
{
"additionalProperties": true,
"examples": [
{
"expectedRevision": 3,
"planId": "plan_id_from_route_plan"
}
],
"properties": {
"expectedRevision": {
"description": "Exact expectedRevision returned with that plan.",
"minimum": 0,
"type": "integer"
},
"planId": {
"description": "Exact planId returned by ssh_route_plan; never invent it.",
"type": "string"
}
},
"required": [
"planId",
"expectedRevision"
],
"type": "object"
}ssh_tunnel_create建立临时端口转发
Open a temporary SSH TCP tunnel owned by this MCP client. Use native node/routes for persistent managed forwarding.
输入参数
server from ssh_list_servers, type and localPort. local: listener on this computer -> remoteHost:remotePort reached by server. remote: listener on server -> localHost:localPort reached by this computer. dynamic: SOCKS listener on this computer. Every listener binds loopback by default; a non-loopback listener host is refused unless allowNonLoopbackBind=true. Port 0 allocates the listening side. A readonly or restricted server refuses tunnels.
返回结果与后续处理
Use the returned id; listen is the address actually listening and listen_side says whether that is this computer or the server. Keep this client attached and test the intended traffic; a listener alone does not prove destination reachability. Close with ssh_tunnel_close when done.
调用示例
{
"localHost": "127.0.0.1",
"localPort": 0,
"remoteHost": "127.0.0.1",
"remotePort": 8080,
"server": "web-a",
"type": "local"
}参数说明
| 字段 | 类型与默认值 | 说明 |
|---|---|---|
| allowNonLoopbackBind | boolean默认 false | Permit the listener to bind an address other than loopback, which exposes the tunnel to other hosts. The result names the listening address. |
| localHost | string | local/dynamic: listener bind on this computer. remote: destination host reached from this computer. Default 127.0.0.1; a listener bind other than loopback needs allowNonLoopbackBind=true. |
| localPort必填 | integer | local/dynamic: listener port here, 0 allocates one. remote: destination port reached from this computer (use the actual destination port). |
| remoteHost | string | local: destination reached from the SSH server. remote: listener bind on that server; default 127.0.0.1, and any other bind needs allowNonLoopbackBind=true. The remote SSH daemon must permit the requested forwarding/bind. |
| remotePort | integer | local: required destination port on the server side. remote: listener port on server, 0 allocates one and returns remote_port. Not used for dynamic. |
| server必填 | string | Exact server name returned by ssh_list_servers. Do not pass a host/IP unless it is the registered name. |
| type必填 | stringlocal · remote · dynamic | local listens here and connects from server; remote listens on server and connects from here; dynamic is a local SOCKS listener. |
查看完整 JSON Schema
{
"additionalProperties": true,
"examples": [
{
"localHost": "127.0.0.1",
"localPort": 0,
"remoteHost": "127.0.0.1",
"remotePort": 8080,
"server": "web-a",
"type": "local"
}
],
"properties": {
"allowNonLoopbackBind": {
"default": false,
"description": "Permit the listener to bind an address other than loopback, which exposes the tunnel to other hosts. The result names the listening address.",
"type": "boolean"
},
"localHost": {
"description": "local/dynamic: listener bind on this computer. remote: destination host reached from this computer. Default 127.0.0.1; a listener bind other than loopback needs allowNonLoopbackBind=true.",
"type": "string"
},
"localPort": {
"description": "local/dynamic: listener port here, 0 allocates one. remote: destination port reached from this computer (use the actual destination port).",
"maximum": 65535,
"minimum": 0,
"type": "integer"
},
"remoteHost": {
"description": "local: destination reached from the SSH server. remote: listener bind on that server; default 127.0.0.1, and any other bind needs allowNonLoopbackBind=true. The remote SSH daemon must permit the requested forwarding/bind.",
"type": "string"
},
"remotePort": {
"description": "local: required destination port on the server side. remote: listener port on server, 0 allocates one and returns remote_port. Not used for dynamic.",
"maximum": 65535,
"minimum": 0,
"type": "integer"
},
"server": {
"description": "Exact server name returned by ssh_list_servers. Do not pass a host/IP unless it is the registered name.",
"type": "string"
},
"type": {
"description": "local listens here and connects from server; remote listens on server and connects from here; dynamic is a local SOCKS listener.",
"enum": [
"local",
"remote",
"dynamic"
],
"type": "string"
}
},
"required": [
"server",
"type",
"localPort"
],
"type": "object"
}ssh_tunnel_list只读查看临时端口转发
List temporary SSH tunnels owned by this MCP client; this does not list native persistent forwards or other clients' tunnels.
输入参数
No arguments, or optional server filter from ssh_list_servers.
返回结果与后续处理
Returns id, server, type, local address, remote_port, state and detail. active is listening; disconnected resumes when its SSH connection is next established; closing is still finishing cleanup; broken reports a failure. Use the exact id with ssh_tunnel_close; retry it when cleanup is pending. Inspect native resources with ssh_route_inspect.
调用示例
{}参数说明
| 字段 | 类型与默认值 | 说明 |
|---|---|---|
| server | string | Optional server-name filter for resources owned by this MCP client. |
查看完整 JSON Schema
{
"additionalProperties": true,
"examples": [
{}
],
"properties": {
"server": {
"description": "Optional server-name filter for resources owned by this MCP client.",
"type": "string"
}
},
"required": [],
"type": "object"
}ssh_tunnel_close关闭临时端口转发
Close temporary SSH tunnels owned by this MCP client. Closing a tunnel disconnects traffic using it.
输入参数
Prefer id from ssh_tunnel_create/list. tunnelId is an alias. Supplying server instead closes this client's tunnels for that server, so use it only when the broader scope is intended.
返回结果与后续处理
Waits up to five seconds for the selected listeners and active flows to stop. Counts only clean completion as closed. Errors include the completed count and separate pending and failed ids with reasons. Pending tunnels stay closing; retry the same close to wait again. Ended failures are removed and reported once as failed. Persistent native routes and peer grants are unchanged.
调用示例
{
"id": "tunnel_id_from_create"
}参数说明
| 字段 | 类型与默认值 | 说明 |
|---|---|---|
| id | string | Exact tunnel id from create/list; preferred for closing one tunnel. |
| server | string | Use only without id/tunnelId: closes this client's tunnels for this server. Broader than closing one id. |
| tunnelId | string | Compatibility alias for id. Supply only one ID field. |
查看完整 JSON Schema
{
"additionalProperties": true,
"examples": [
{
"id": "tunnel_id_from_create"
}
],
"properties": {
"id": {
"description": "Exact tunnel id from create/list; preferred for closing one tunnel.",
"type": "string"
},
"server": {
"description": "Use only without id/tunnelId: closes this client's tunnels for this server. Broader than closing one id.",
"type": "string"
},
"tunnelId": {
"description": "Compatibility alias for id. Supply only one ID field.",
"type": "string"
}
},
"required": [],
"type": "object"
}集群与流量配额
ssh_cluster_manage管理服务器集群
Save, disable or retire a hierarchy of native device clusters for background collection. This is separate from ssh_group_manage command groups.
输入参数
First inspect registered devices and existing clusters. action=save needs spec and expectedRevision (0 creates a new ID). spec.members uses device UUIDs; executors must be reachable companion devices, not node-only devices. To retire, save enabled=false, wait for probe retirement, then delete with id/current revision.
返回结果与后续处理
Saving is not proof that jobs ran: inspect cluster appliedRevision, member timestamps and executor heartbeats. Enabled jobs can keep companions alive; OS boot persistence still needs a startup policy. Deletion refuses children and policy references.
调用示例
{
"action": "save",
"expectedRevision": 0,
"spec": {
"enabled": false,
"executors": [
"11111111-1111-4111-8111-111111111111"
],
"id": "lab",
"members": []
}
}参数说明
| 字段 | 类型与默认值 | 说明 |
|---|---|---|
| action必填 | stringsave · delete | save requires spec; expectedRevision=0 creates a new ID, otherwise use the inspected current revision. delete requires id after disabling/retiring dependencies. |
| expectedRevision必填 | integer | Current configuration revision from ssh_cluster_inspect; 0 creates a new ID. State observations do not increment this revision. |
| id | string | delete only: ID from ssh_cluster_inspect. Disable first and wait for active jobs and probe retirement. |
| spec | object | Complete cluster configuration for save; use inspected device UUIDs and explicitly assigned companion executors. Saving replaces this configuration, not just one member. |
查看完整 JSON Schema
{
"additionalProperties": true,
"examples": [
{
"action": "save",
"expectedRevision": 0,
"spec": {
"enabled": false,
"executors": [
"11111111-1111-4111-8111-111111111111"
],
"id": "lab",
"members": []
}
}
],
"properties": {
"action": {
"description": "save requires spec; expectedRevision=0 creates a new ID, otherwise use the inspected current revision. delete requires id after disabling/retiring dependencies.",
"enum": [
"save",
"delete"
],
"type": "string"
},
"expectedRevision": {
"description": "Current configuration revision from ssh_cluster_inspect; 0 creates a new ID. State observations do not increment this revision.",
"minimum": 0,
"type": "integer"
},
"id": {
"description": "delete only: ID from ssh_cluster_inspect. Disable first and wait for active jobs and probe retirement.",
"type": "string"
},
"spec": {
"additionalProperties": false,
"description": "Complete cluster configuration for save; use inspected device UUIDs and explicitly assigned companion executors. Saving replaces this configuration, not just one member.",
"properties": {
"enabled": {
"default": true,
"description": "False retires this cluster's probes after existing jobs finish. Disable referencing policies first. Other node configuration and services remain owned independently.",
"type": "boolean"
},
"executors": {
"description": "Primary device IDs of companion daemons allowed to collect/manage these members. Their SSH management paths must be reachable. A native node alone cannot act as an executor; it never receives center credentials.",
"items": {
"description": "Stable device ID from ssh_node_manage/ssh_route_inspect. A server display name is not a device ID.",
"format": "uuid",
"type": "string"
},
"maxItems": 8,
"minItems": 1,
"type": "array",
"uniqueItems": true
},
"gateways": {
"description": "Members (including descendants) allowed as policy gateway choices. Does not itself grant forwarding privileges.",
"items": {
"description": "Stable device ID from ssh_node_manage/ssh_route_inspect. A server display name is not a device ID.",
"format": "uuid",
"type": "string"
},
"maxItems": 64,
"type": "array",
"uniqueItems": true
},
"id": {
"pattern": "^[a-z0-9_-]{1,24}$",
"type": "string"
},
"intervalMs": {
"default": 10000,
"description": "Member collection interval in milliseconds; 10000 = 10 seconds. Native probe intervals are configured per probe. Slow jobs skip overlapping runs.",
"maximum": 300000,
"minimum": 10000,
"type": "integer"
},
"members": {
"description": "Direct members; each device belongs to one direct cluster only. Remove members only after disabling the old cluster and waiting for appliedRevision to match revision.",
"items": {
"additionalProperties": false,
"properties": {
"device": {
"description": "Stable device ID from ssh_node_manage/ssh_route_inspect. A server display name is not a device ID.",
"format": "uuid",
"type": "string"
},
"probes": {
"description": "Probes run continuously on this member's native node, even without MCP calls. IDs must be unique within the member and <=32 bytes. owner is assigned automatically; omit it. Disable the cluster to retire only its probes.",
"items": {
"additionalProperties": false,
"properties": {
"id": {
"maxLength": 32,
"type": "string"
},
"intervalMs": {
"default": 10000,
"description": "Probe interval in milliseconds; 10000 = 10 seconds. Must be at least timeoutMs.",
"maximum": 300000,
"minimum": 1000,
"type": "integer"
},
"target": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"address": {
"description": "Exact numeric endpoint this device actively connects to; measures TCP connection establishment.",
"type": "string"
},
"kind": {
"const": "tcp"
}
},
"required": [
"kind",
"address"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"kind": {
"const": "p2p"
},
"link": {
"description": "Configured authenticated peer link; measures application ping over its actual QUIC/TCP connection.",
"type": "string"
}
},
"required": [
"kind",
"link"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"kind": {
"const": "forward"
},
"link": {
"type": "string"
},
"target": {
"description": "Exact TCP destination granted by that peer; measures the complete native open and target connection.",
"type": "string"
}
},
"required": [
"kind",
"link",
"target"
],
"type": "object"
}
]
},
"timeoutMs": {
"default": 2000,
"description": "Milliseconds; 1000 = 1 second. Must not exceed intervalMs.",
"maximum": 10000,
"minimum": 100,
"type": "integer"
},
"window": {
"default": 30,
"description": "Number of recent probe samples retained, not seconds.",
"maximum": 60,
"minimum": 2,
"type": "integer"
}
},
"required": [
"id",
"target"
],
"type": "object"
},
"maxItems": 16,
"type": "array"
}
},
"required": [
"device"
],
"type": "object"
},
"maxItems": 64,
"type": "array"
},
"parent": {
"description": "Existing parent cluster ID. At most 8 levels; cycles are rejected. Parent views include descendants.",
"type": [
"string",
"null"
]
},
"staleAfterMs": {
"default": 60000,
"description": "Observations older than this are stale, excluded from gateway selection. Must be >=3 * intervalMs. Milliseconds; 60000 = 1 minute.",
"maximum": 3600000,
"minimum": 30000,
"type": "integer"
}
},
"required": [
"id",
"members",
"executors"
],
"type": "object"
}
},
"required": [
"action",
"expectedRevision"
],
"type": "object"
}ssh_cluster_policy设置自动选路规则
Configure source-device route measurements and optional automatic switching/repair among preauthorized paths. Inspect devices/clusters and apply a matching device-scoped route first.
输入参数
save requires spec and expectedRevision (0 for a new ID). spec identifies sourceDevice/sourceCluster/targetCluster and 2–8 candidates. autoSwitch and autoRepair default false; enabling them grants ongoing changes within those paths and budgets. delete uses id/current revision after disabling.
返回结果与后续处理
Read fresh source-side measurements, proposals and job receipts with ssh_cluster_inspect. Saved policy alone is not running acceptance. Stale data is excluded; external route edits pause the policy. No new permissions, arbitrary shell jobs, hidden fallback or command replay.
调用示例
{
"action": "delete",
"expectedRevision": 3,
"id": "policy-from-inspect"
}参数说明
| 字段 | 类型与默认值 | 说明 |
|---|---|---|
| action必填 | stringsave · delete | save requires spec; expectedRevision=0 creates a new ID, otherwise use the inspected current revision. delete requires id after disabling/retiring dependencies. |
| expectedRevision必填 | integer | Current configuration revision from ssh_cluster_inspect; 0 creates a new ID. State observations do not increment this revision. |
| id | string | delete only: ID from ssh_cluster_inspect. Disable first and wait for active jobs and probe retirement. |
| spec | object | Complete route policy for save. Register clusters and apply a matching source-device route first. autoSwitch/autoRepair authorize ongoing changes only when explicitly enabled. |
查看完整 JSON Schema
{
"additionalProperties": true,
"examples": [
{
"action": "delete",
"expectedRevision": 3,
"id": "policy-from-inspect"
}
],
"properties": {
"action": {
"description": "save requires spec; expectedRevision=0 creates a new ID, otherwise use the inspected current revision. delete requires id after disabling/retiring dependencies.",
"enum": [
"save",
"delete"
],
"type": "string"
},
"expectedRevision": {
"description": "Current configuration revision from ssh_cluster_inspect; 0 creates a new ID. State observations do not increment this revision.",
"minimum": 0,
"type": "integer"
},
"id": {
"description": "delete only: ID from ssh_cluster_inspect. Disable first and wait for active jobs and probe retirement.",
"type": "string"
},
"spec": {
"additionalProperties": false,
"description": "Complete route policy for save. Register clusters and apply a matching source-device route first. autoSwitch/autoRepair authorize ongoing changes only when explicitly enabled.",
"properties": {
"autoRepair": {
"default": false,
"description": "Authorizes bounded repair of the current route's existing resources if all candidates fail. Node permission/configuration changes require a separate reviewed route plan.",
"type": "boolean"
},
"autoSwitch": {
"default": false,
"description": "Authorizes automatic route replacement after fresh source-side SSH authentication, confirmations and cooldown. False still measures candidates and shows proposals.",
"type": "boolean"
},
"candidates": {
"description": "Preauthorized alternatives from the primary source companion. Apply an explicit device-scoped route matching one complete candidate before enabling this policy. Automatic switch changes the route only; it cannot invent grants, skip hops or replay active commands.",
"items": {
"additionalProperties": false,
"properties": {
"gatewayDevice": {
"description": "Optional gateway device declared in sourceCluster or targetCluster. Requires fresh native load telemetry below maxGatewayLoadPercent before this candidate is selected.",
"type": [
"string",
"null"
]
},
"id": {
"pattern": "^[a-z0-9_-]{1,24}$",
"type": "string"
},
"route": {
"additionalProperties": false,
"properties": {
"description": {
"default": "",
"type": "string"
},
"enabled": {
"const": true,
"default": true,
"type": "boolean"
},
"ingress": {
"description": "Transport to the first SSH hop (or final server when via=[]). It preserves SSH login, target host-key and command permissions. null removes an ingress. target is a numeric socket address as seen on device. Existing explicit SSH hops are still honored.",
"oneOf": [
{
"type": "null"
},
{
"additionalProperties": false,
"properties": {
"coordinator": {
"description": "Optional registered introduction node ID. Never carries application bytes unless independently selected as a gateway.",
"type": [
"string",
"null"
]
},
"device": {
"description": "Registered receiving node ID.",
"format": "uuid",
"type": "string"
},
"fallback": {
"default": false,
"description": "Explicitly allow the configured SSH route if P2P cannot connect; actual fallback is reported.",
"type": "boolean"
},
"kind": {
"const": "p2p"
},
"protocol": {
"default": "auto",
"enum": [
"auto",
"quic",
"tcp"
]
},
"target": {
"description": "Authorized SSH service endpoint on the receiving device, e.g. 127.0.0.1:22.",
"type": "string"
},
"timeout_ms": {
"default": 8000,
"description": "P2P connect timeout in milliseconds; 10000 = 10 seconds.",
"maximum": 120000,
"minimum": 100,
"type": "integer"
}
},
"required": [
"kind",
"device",
"target"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"device": {
"format": "uuid",
"type": "string"
},
"gateway": {
"description": "Native gateway numeric SSH listener reachable from this companion.",
"type": "string"
},
"kind": {
"const": "native"
},
"target": {
"description": "Numeric endpoint reached by the gateway; may be its loopback reverse listener.",
"type": "string"
}
},
"required": [
"kind",
"device",
"gateway",
"target"
],
"type": "object"
}
]
},
"resources": {
"description": "Already registered, enabled, owned resource IDs. Automatic repair can only start these existing resources, with its per-hour budget.",
"items": {
"type": "string"
},
"maxItems": 32,
"type": "array"
},
"server": {
"description": "One exact target from ssh_list_servers; identical for all candidates.",
"type": "string"
},
"sourceDevice": {
"description": "Stable device ID from ssh_node_manage/ssh_route_inspect. A server display name is not a device ID.",
"format": "uuid",
"type": "string"
},
"sourceInstance": {
"description": "Policies run from the primary companion device; omit or use null when copying an inspected route.",
"type": "null"
},
"via": {
"description": "Entire ordered SSH hop path. [] means direct SSH; all mandatoryVia hops must remain in order.",
"items": {
"type": "string"
},
"maxItems": 8,
"type": "array"
}
},
"required": [
"server",
"via",
"sourceDevice"
],
"type": "object"
}
},
"required": [
"id",
"route"
],
"type": "object"
},
"maxItems": 8,
"minItems": 2,
"type": "array"
},
"confirmations": {
"default": 3,
"description": "Distinct completed measurement rounds required before switching. Re-reading a sample never increases confirmations.",
"maximum": 10,
"minimum": 2,
"type": "integer"
},
"cooldownMs": {
"default": 60000,
"description": "Minimum milliseconds between switch/repair attempts; 60000 = 1 minute.",
"maximum": 86400000,
"minimum": 30000,
"type": "integer"
},
"enabled": {
"default": true,
"type": "boolean"
},
"failureThreshold": {
"default": 2,
"description": "Consecutive fresh failures needed to treat the current route as unavailable.",
"maximum": 10,
"minimum": 1,
"type": "integer"
},
"id": {
"pattern": "^[a-z0-9_-]{1,24}$",
"type": "string"
},
"intervalMs": {
"default": 30000,
"description": "Period between source-side route measurements in milliseconds. 30000 = 30 seconds; no overlapping runs.",
"maximum": 3600000,
"minimum": 30000,
"type": "integer"
},
"mandatoryVia": {
"description": "Required ordered SSH hop names present in every candidate. No implicit direct fallback.",
"items": {
"type": "string"
},
"maxItems": 8,
"type": "array",
"uniqueItems": true
},
"maxGatewayLoadPercent": {
"default": 90,
"description": "Exclude a candidate when its declared gateway's connection or stream slot usage reaches this percentage. This measures native capacity, not CPU usage.",
"maximum": 100,
"minimum": 1,
"type": "integer"
},
"maxRepairsPerHour": {
"default": 3,
"description": "Maximum scheduled repair attempts in a sliding hour, including failed attempts.",
"maximum": 10,
"minimum": 1,
"type": "integer"
},
"minImprovementPercent": {
"default": 20,
"description": "Required median latency reduction while the current route works. An authenticated alternative may replace a failed current route after the same confirmation rule.",
"maximum": 90,
"minimum": 1,
"type": "integer"
},
"sourceCluster": {
"pattern": "^[a-z0-9_-]{1,24}$",
"type": "string"
},
"sourceDevice": {
"description": "Stable device ID from ssh_node_manage/ssh_route_inspect. A server display name is not a device ID.",
"format": "uuid",
"type": "string"
},
"targetCluster": {
"pattern": "^[a-z0-9_-]{1,24}$",
"type": "string"
},
"timeoutMs": {
"default": 5000,
"description": "Per-candidate fresh SSH authentication deadline, milliseconds; 5000 = 5 seconds. RTT reports use microseconds and include authentication, not just packet transit.",
"maximum": 30000,
"minimum": 1000,
"type": "integer"
}
},
"required": [
"id",
"sourceDevice",
"sourceCluster",
"targetCluster",
"candidates"
],
"type": "object"
}
},
"required": [
"action",
"expectedRevision"
],
"type": "object"
}ssh_cluster_inspect只读查看集群状态与记录
Read native cluster/policy state, member observations, executor heartbeats, jobs and events. This is a snapshot; it does not trigger a probe.
输入参数
section defaults clusters; also policies/jobs/events/history. id optionally filters that section. limit defaults 30, maximum 256. IDs and revisions from this response are inputs to cluster save/task operations.
返回结果与后续处理
Use timestamps and states: unknown/stale differs from failed. Native RTT and fresh SSH-auth duration are separate, both reported in microseconds; timestamp/interval fields use milliseconds. Probe failure rate is not measured physical packet loss.
调用示例
{
"limit": 20,
"section": "jobs"
}参数说明
| 字段 | 类型与默认值 | 说明 |
|---|---|---|
| id | string | Optional filter: cluster/policy ID; jobs also accepts a job ID, history also accepts a member device ID. |
| limit | integer默认 30 | Maximum recent jobs/events/history records, newest first. Bounded history is retained at the authority. |
| section | string默认 "clusters"clusters · policies · jobs · events · history | Snapshot section: clusters (default), policies, jobs, events or history. Does not trigger measurements. |
查看完整 JSON Schema
{
"additionalProperties": true,
"examples": [
{
"limit": 20,
"section": "jobs"
}
],
"properties": {
"id": {
"description": "Optional filter: cluster/policy ID; jobs also accepts a job ID, history also accepts a member device ID.",
"type": "string"
},
"limit": {
"default": 30,
"description": "Maximum recent jobs/events/history records, newest first. Bounded history is retained at the authority.",
"maximum": 256,
"minimum": 1,
"type": "integer"
},
"section": {
"default": "clusters",
"description": "Snapshot section: clusters (default), policies, jobs, events or history. Does not trigger measurements.",
"enum": [
"clusters",
"policies",
"jobs",
"events",
"history"
],
"type": "string"
}
},
"required": [],
"type": "object"
}ssh_cluster_task触发集群探测与核对结果
Queue one collection or route-probe job, cancel pending work, or reconcile an unknown write against its receipt. It is not a generic remote shell scheduler.
输入参数
enqueue needs kind=observe with a cluster id, or kind=probe_routes with a policy id; use its current expectedRevision. cancel/resolve need jobId from enqueue/inspect. cancel affects pending jobs only; resolve never reapplies a plan.
返回结果与后续处理
jobId means queued, not executed. Follow ssh_cluster_inspect section=jobs to finished/failed/unknown and inspect evidence. Running writes are never blindly retried.
调用示例
{
"action": "enqueue",
"expectedRevision": 3,
"id": "cluster-from-inspect",
"kind": "observe"
}参数说明
| 字段 | 类型与默认值 | 说明 |
|---|---|---|
| action必填 | stringenqueue · cancel · resolve | enqueue schedules one bounded observation/route-probe job. cancel affects pending jobs only. resolve reads the saved route receipt for an unknown write; it never reapplies the plan. |
| expectedRevision | integer | Current configuration revision from ssh_cluster_inspect; 0 creates a new ID. State observations do not increment this revision. |
| id | string | enqueue only: cluster ID for observe or policy ID for probe_routes. |
| jobId | string | cancel/resolve only: saved job ID from ssh_cluster_inspect section=jobs. |
| kind | stringobserve · probe_routes | enqueue only: collect/reconcile a cluster or measure a policy's candidates. |
查看完整 JSON Schema
{
"additionalProperties": true,
"examples": [
{
"action": "enqueue",
"expectedRevision": 3,
"id": "cluster-from-inspect",
"kind": "observe"
}
],
"properties": {
"action": {
"description": "enqueue schedules one bounded observation/route-probe job. cancel affects pending jobs only. resolve reads the saved route receipt for an unknown write; it never reapplies the plan.",
"enum": [
"enqueue",
"cancel",
"resolve"
],
"type": "string"
},
"expectedRevision": {
"description": "Current configuration revision from ssh_cluster_inspect; 0 creates a new ID. State observations do not increment this revision.",
"minimum": 0,
"type": "integer"
},
"id": {
"description": "enqueue only: cluster ID for observe or policy ID for probe_routes.",
"type": "string"
},
"jobId": {
"description": "cancel/resolve only: saved job ID from ssh_cluster_inspect section=jobs.",
"format": "uuid",
"type": "string"
},
"kind": {
"description": "enqueue only: collect/reconcile a cluster or measure a policy's candidates.",
"enum": [
"observe",
"probe_routes"
],
"type": "string"
}
},
"required": [
"action"
],
"type": "object"
}ssh_traffic查看流量统计与设置配额
Inspect server payload usage and path throughput, or manage quota policy and accounting adjustments.
输入参数
usage/samples optionally take servers. set requires server and limitBytes; periods use UTC days, weeks or months, with monthly resetDay 1–28. clear requires server. adjust takes an adjustment with action, reason and reservation or scope.
返回结果与后续处理
Read actions show only visible servers. Center policy changes and adjustments require Ops. Clearing a policy preserves measured usage; unresolved transfers retain their reserved allowance.
调用示例
{
"action": "usage",
"servers": [
"web-a"
]
}参数说明
| 字段 | 类型与默认值 | 说明 |
|---|---|---|
| action | string默认 "usage"usage · set · clear · samples · adjust | 详见下方 JSON Schema。 |
| adjustment | object | 详见下方 JSON Schema。 |
| limitBytes | integer | 详见下方 JSON Schema。 |
| pathKey | string | 详见下方 JSON Schema。 |
| period | string默认 "monthly"daily · weekly · monthly | 详见下方 JSON Schema。 |
| resetDay | integer默认 1 | 详见下方 JSON Schema。 |
| server | string | Catalog server for set or clear. |
| servers | array | Visible catalog servers; samples matches this exact set when supplied. |
| softLimitBytes | integer | 详见下方 JSON Schema。 |
查看完整 JSON Schema
{
"additionalProperties": false,
"examples": [
{
"action": "usage",
"servers": [
"web-a"
]
}
],
"properties": {
"action": {
"default": "usage",
"enum": [
"usage",
"set",
"clear",
"samples",
"adjust"
],
"type": "string"
},
"adjustment": {
"properties": {
"action": {
"enum": [
"settle",
"release",
"delta"
],
"type": "string"
},
"actual": {
"items": {
"properties": {
"bytes": {
"minimum": 0,
"type": "integer"
},
"scope": {
"type": "string"
}
},
"required": [
"scope",
"bytes"
],
"type": "object"
},
"type": "array"
},
"delta_bytes": {
"type": "integer"
},
"reason": {
"minLength": 1,
"type": "string"
},
"reservation": {
"type": "string"
},
"scope": {
"description": "Canonical server:<catalog name> for delta.",
"type": "string"
}
},
"required": [
"action",
"reason"
],
"type": "object"
},
"limitBytes": {
"minimum": 0,
"type": "integer"
},
"pathKey": {
"type": "string"
},
"period": {
"default": "monthly",
"enum": [
"daily",
"weekly",
"monthly"
],
"type": "string"
},
"resetDay": {
"default": 1,
"maximum": 28,
"minimum": 1,
"type": "integer"
},
"server": {
"description": "Catalog server for set or clear.",
"type": "string"
},
"servers": {
"description": "Visible catalog servers; samples matches this exact set when supplied.",
"items": {
"type": "string"
},
"type": "array"
},
"softLimitBytes": {
"minimum": 0,
"type": "integer"
}
},
"type": "object"
}主机状态与日志
ssh_health_check只读检查主机基本健康状态
Take one CPU, memory and filesystem health snapshot on a POSIX catalog server. Use ssh_service_status for a specific service.
输入参数
server from ssh_list_servers; mountPoint defaults /. Requires the server's usual POSIX monitoring commands. For Windows use ssh_execute with native PowerShell commands.
返回结果与后续处理
Returns metrics, timestamp and healthy/warning/critical thresholds. A healthy host does not prove that an application or network path works. This does not install a monitor.
调用示例
{
"mountPoint": "/",
"server": "web-a"
}参数说明
| 字段 | 类型与默认值 | 说明 |
|---|---|---|
| mountPoint | string | Remote filesystem path to inspect, default /. One snapshot; no background monitor is installed. |
| server必填 | string | Exact server name returned by ssh_list_servers. Do not pass a host/IP unless it is the registered name. |
查看完整 JSON Schema
{
"additionalProperties": true,
"examples": [
{
"mountPoint": "/",
"server": "web-a"
}
],
"properties": {
"mountPoint": {
"description": "Remote filesystem path to inspect, default /. One snapshot; no background monitor is installed.",
"type": "string"
},
"server": {
"description": "Exact server name returned by ssh_list_servers. Do not pass a host/IP unless it is the registered name.",
"type": "string"
}
},
"required": [
"server"
],
"type": "object"
}ssh_monitor只读查看 CPU、内存与磁盘占用
Take one CPU, memory and disk metrics snapshot on a POSIX catalog server. This call does not stream, schedule or keep monitoring.
输入参数
server from ssh_list_servers; optional mountPoint (default /). interval/duration/type from legacy clients do not control native sampling; do not use them for continuous monitoring.
返回结果与后续处理
Returns cpu, memory and disk measurements from this call. For continuous native device observations use cluster/node probe configuration and inspect timestamped results.
调用示例
{
"server": "web-a"
}参数说明
| 字段 | 类型与默认值 | 说明 |
|---|---|---|
| mountPoint | string | Remote filesystem path to inspect, default /. One snapshot; no background monitor is installed. |
| server必填 | string | Exact server name returned by ssh_list_servers. Do not pass a host/IP unless it is the registered name. |
查看完整 JSON Schema
{
"additionalProperties": true,
"examples": [
{
"server": "web-a"
}
],
"properties": {
"mountPoint": {
"description": "Remote filesystem path to inspect, default /. One snapshot; no background monitor is installed.",
"type": "string"
},
"server": {
"description": "Exact server name returned by ssh_list_servers. Do not pass a host/IP unless it is the registered name.",
"type": "string"
}
},
"required": [
"server"
],
"type": "object"
}ssh_service_status只读查看系统服务状态
Inspect systemd/service status on a POSIX catalog server without starting or restarting it. For Windows use ssh_execute with Get-Service.
输入参数
server plus either service or a nonempty services list. If both are given, services wins. Names are OS service names, not SSH server names: letters, digits and @ _ . : -, not starting with -.
返回结果与后续处理
Read each service's output: active/enabled/MainPID when systemd is present. The wrapper's success only means inspection ran; output=inactive/failed is not a healthy service.
调用示例
{
"server": "web-a",
"service": "nginx"
}参数说明
| 字段 | 类型与默认值 | 说明 |
|---|---|---|
| server必填 | string | Exact server name returned by ssh_list_servers. Do not pass a host/IP unless it is the registered name. |
| service | string | One remote OS service name; required unless services is a nonempty list. Letters, digits and @ _ . : - only, not starting with -. |
| services | array | Remote OS service names under the same naming rule. A nonempty list takes precedence over service. |
查看完整 JSON Schema
{
"additionalProperties": true,
"examples": [
{
"server": "web-a",
"service": "nginx"
}
],
"properties": {
"server": {
"description": "Exact server name returned by ssh_list_servers. Do not pass a host/IP unless it is the registered name.",
"type": "string"
},
"service": {
"description": "One remote OS service name; required unless services is a nonempty list. Letters, digits and @ _ . : - only, not starting with -.",
"type": "string"
},
"services": {
"description": "Remote OS service names under the same naming rule. A nonempty list takes precedence over service.",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"server"
],
"type": "object"
}ssh_process_manager查看或结束进程
List, inspect or signal processes on a POSIX catalog server. Inspect the PID and command before an authorized kill action.
输入参数
server; action defaults list. list uses limit (default 20, cap 200), sortBy=cpu|memory and optional literal filter applied to that bounded list. info/kill require pid. kill signal defaults TERM; KILL cannot allow graceful cleanup. list/info work in every mode; kill is refused on a readonly server and on a restricted server needs an allow pattern matching the line kill -SIGNAL PID.
返回结果与后续处理
Read code/stdout/stderr. A signal can affect other users or services and does not prove the process stopped; verify the exact PID/state afterward. Windows uses ssh_execute native commands.
调用示例
{
"action": "list",
"limit": 10,
"server": "web-a"
}参数说明
| 字段 | 类型与默认值 | 说明 |
|---|---|---|
| action | stringlist · info · kill | Default list. info/kill need pid; kill sends a signal and changes the remote process state. |
| filter | string | Literal text applied after selecting the top limit rows; not a complete search across all processes. |
| limit | integer默认 20 | Maximum rows selected by ps/head before applying filter. |
| pid | integer | Exact remote PID from a fresh process inspection; required by info/kill. Verify command/owner before signalling. |
| server必填 | string | Exact server name returned by ssh_list_servers. Do not pass a host/IP unless it is the registered name. |
| signal | stringTERM · KILL · HUP · INT · QUIT | kill only; default TERM. KILL prevents graceful process cleanup. |
| sortBy | stringcpu · memory | list ordering, default cpu. |
查看完整 JSON Schema
{
"additionalProperties": true,
"examples": [
{
"action": "list",
"limit": 10,
"server": "web-a"
}
],
"properties": {
"action": {
"description": "Default list. info/kill need pid; kill sends a signal and changes the remote process state.",
"enum": [
"list",
"info",
"kill"
],
"type": "string"
},
"filter": {
"description": "Literal text applied after selecting the top limit rows; not a complete search across all processes.",
"type": "string"
},
"limit": {
"default": 20,
"description": "Maximum rows selected by ps/head before applying filter.",
"maximum": 200,
"minimum": 0,
"type": "integer"
},
"pid": {
"description": "Exact remote PID from a fresh process inspection; required by info/kill. Verify command/owner before signalling.",
"minimum": 1,
"type": "integer"
},
"server": {
"description": "Exact server name returned by ssh_list_servers. Do not pass a host/IP unless it is the registered name.",
"type": "string"
},
"signal": {
"description": "kill only; default TERM. KILL prevents graceful process cleanup.",
"enum": [
"TERM",
"KILL",
"HUP",
"INT",
"QUIT"
],
"type": "string"
},
"sortBy": {
"description": "list ordering, default cpu.",
"enum": [
"cpu",
"memory"
],
"type": "string"
}
},
"required": [
"server"
],
"type": "object"
}ssh_tail只读查看或实时跟踪日志末尾
Read the latest lines of a remote log file, optionally following new lines for a bounded time. Use ssh_read for line-numbered paging.
输入参数
server and file; lines defaults to 10, range 1–10000. grep and until use Rust regex syntax. follow needs the 7.0 helper; durationMs defaults to 30000 (maximum 300000), maxBytes to 8388608. Readonly servers may use an already installed helper.
返回结果与后续处理
Returns bounded log output and follow completion information. Progress reports appended lines. Without a helper, snapshot mode uses POSIX tail or Windows Get-Content; follow returns follow_requires_helper.
调用示例
{
"file": "/var/log/app.log",
"lines": 50,
"server": "web-a"
}参数说明
| 字段 | 类型与默认值 | 说明 |
|---|---|---|
| durationMs | integer默认 30000 | Maximum follow duration in milliseconds. |
| file必填 | string | Complete path on the selected remote server, not this MCP computer. Prefer an absolute path. |
| follow | boolean默认 false | Follow appended lines within durationMs/maxBytes. Requires the 7.0 file helper. |
| grep | string | Rust regex applied to each selected line; no look-around or back-references. Omit for all lines. |
| lines | integer默认 10 | Number of trailing lines read before applying the pattern. |
| maxBytes | integer默认 8388608 | Maximum bytes sent by follow after filtering. |
| server必填 | string | Exact server name returned by ssh_list_servers. Do not pass a host/IP unless it is the registered name. |
| until | string | Optional Rust regex that ends follow after a matching line. |
查看完整 JSON Schema
{
"additionalProperties": true,
"examples": [
{
"file": "/var/log/app.log",
"lines": 50,
"server": "web-a"
}
],
"properties": {
"durationMs": {
"default": 30000,
"description": "Maximum follow duration in milliseconds.",
"maximum": 300000,
"minimum": 0,
"type": "integer"
},
"file": {
"description": "Complete path on the selected remote server, not this MCP computer. Prefer an absolute path.",
"type": "string"
},
"follow": {
"default": false,
"description": "Follow appended lines within durationMs/maxBytes. Requires the 7.0 file helper.",
"type": "boolean"
},
"grep": {
"description": "Rust regex applied to each selected line; no look-around or back-references. Omit for all lines.",
"type": "string"
},
"lines": {
"default": 10,
"description": "Number of trailing lines read before applying the pattern.",
"maximum": 10000,
"minimum": 1,
"type": "integer"
},
"maxBytes": {
"default": 8388608,
"description": "Maximum bytes sent by follow after filtering.",
"maximum": 8388608,
"minimum": 0,
"type": "integer"
},
"server": {
"description": "Exact server name returned by ssh_list_servers. Do not pass a host/IP unless it is the registered name.",
"type": "string"
},
"until": {
"description": "Optional Rust regex that ends follow after a matching line.",
"type": "string"
}
},
"required": [
"server",
"file"
],
"type": "object"
}