remote-ssh
This server provides a remote SSH toolset for MCP clients, enabling file operations, searching, command execution, and background job management on multiple Linux hosts.
Target Management: List, add, update, remove, connect, disconnect, and check status of SSH targets; validates remote roots and supports config-based SSH aliases.
File Reading: Read UTF-8 text files from remote hosts with line-numbered pagination.
File Writing: Create or overwrite files on remote hosts (parent directories auto-created).
File Editing: Apply literal text replacements on remote files with optional replace-all and conflict checks (mtime/size).
Path Searching: Find files by glob pattern (skips .git/node_modules; max 100 results).
Content Searching: Grep file contents using POSIX ERE (skips binary files and .git; max 250 matches).
Command Execution: Run bash commands on remote hosts with configurable foreground timeouts (default 120s, max 600s) or as persistent background jobs.
Background Job Management: Query job status/output with pagination, and kill job process groups (TERM then KILL).
Authentication: Uses user-in-terminal OpenSSH authentication; supports password, key passphrase, keyboard-interactive, and agent-based auth.
Connection Reuse: Leverages OpenSSH ControlMaster for multiplexing (default 12h), configurable per target.
Persistence: Background jobs and logs survive MCP restarts and can be cleaned up on demand.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@remote-sshShow me the first 50 lines of /var/log/nginx/error.log on target web"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
remote-ssh MCP
基于 OpenSSH 的 MCP 服务,通过 stdio 向 AI 客户端提供远程文件读写、搜索、命令执行和后台任务管理。支持多个 SSH 目标,并通过终端交互完成认证。
每次调用显式指定 target;相对路径基于该目标的 root,绝对路径指向远端。root 是默认工作目录,不是访问沙箱;命令具有 SSH 账户的权限。
结构图
flowchart TB
Client["Codex / 其他 MCP 客户端"]
User["用户"]
subgraph Local["本机"]
CLI["cli.js · stdio 入口"]
Server["server.js · 注册 9 个工具<br/>参数校验、显式 target 路由、错误与取消处理"]
Manage["manage.js · 目标管理与连接准备"]
Store["store.js / target.js<br/>配置校验、跨进程锁、原子保存"]
Targets[("targets.json · 目标配置")]
Tools["tools/files.js · read / write / edit<br/>tools/search.js · glob / grep<br/>tools/bash.js · bash / 任务操作"]
SSH["ssh.js · 调用本机 OpenSSH<br/>连接预热、命令执行、超时与输出处理"]
Terminal["新终端窗口 · 标准 ssh 认证"]
Master["ControlMaster · 本地 socket / 连接复用"]
CLI --> Server
Server --> Manage
Manage --> Store
Store <--> Targets
Server --> Tools
Manage --> SSH
Tools --> SSH
SSH -. "需要交互认证时打开" .-> Terminal
Terminal -->|认证后建立连接| Master
SSH <-->|默认复用| Master
end
subgraph Remote["远端 Linux 主机"]
SSHD["SSH 服务"]
Commands["bash / Python 3 / GNU 工具"]
Files[("远端文件与工作目录")]
Jobs["jobs.py · 经 SSH 传入 Python 执行<br/>启动、查询、终止后台任务进程组"]
Logs[("~/.cache/remote-ssh/jobs/UUID/<br/>任务状态、退出码与输出")]
SSHD --> Commands
Commands --> Files
Commands --> Jobs
Jobs --> Logs
end
Client <-->|MCP 请求与结果 / stdio| CLI
User -->|直接输入密码或私钥口令| Terminal
SSH <-->|SSH 命令与结果| SSHD普通工具先查找目标并准备连接,再执行远端操作;目标增删改通过配置锁和原子保存生效。密码和私钥口令只交给新终端中的 OpenSSH,不经过 MCP 参数或目标配置。
图中展示默认连接复用模式;controlPersist: 0 时每次调用独立连接,仅支持免交互认证。远端无需安装 MCP 服务,后台任务和日志保存在远端,独立于本机 MCP 进程的生命周期。
Related MCP server: remote-admin-mcp
安装与接入
本机需要 Node.js 20+、OpenSSH,以及可打开窗口的终端环境。推荐 Linux 桌面;也支持 macOS Terminal。Windows 请在 WSL 中运行并配置可用的终端启动命令。远端需要 Linux、bash、Python 3.9+ 和 GNU 常用工具(包括 stat、base64、grep)。
cd remote-ssh
npm ci
node src/cli.js --help在支持 stdio 的 MCP 客户端中,设置启动命令为 node,参数为本项目 src/cli.js 的绝对路径。通用 JSON 示例:
{
"mcpServers": {
"remote-ssh": {
"command": "node",
"args": ["/absolute/path/to/remote-ssh/src/cli.js"]
}
}
}自定义配置文件可追加 --targets /absolute/path/to/targets.json。服务没有构建步骤,stdout 仅用于 MCP 协议,错误输出到 stderr。SDK 接入方式参考官方 stdio 文档。
Linux SSH 兼容范围
能用 ssh 登录,不等于能运行全部 MCP 工具。 本服务使用 SSH 的非交互命令通道;远端必须允许执行命令,并提供 sh、base64 和目标目录访问权限。完整功能还需要安装说明中的 bash、Python 和 GNU 工具,后台任务依赖 Linux /proc。只有 SFTP、仅允许交互式 TTY、强制菜单或受限命令的账户,不能当作通用远程工作区使用;本服务不会绕过服务器权限限制。原生 Windows、macOS 远端不在当前支持范围内。
连接复用本机 OpenSSH 配置,包括 Host 别名、HostName、User、端口、IdentityFile、证书、IdentityAgent、ProxyJump、ProxyCommand 和认证方式。若平时通过 ssh -i ... -J ... -p ... 登录,将这些设置写入 ~/.ssh/config 的独立别名,再把别名作为目标的 ssh 字段;该字段不接受整条 shell 命令,也不接受密码。
MCP 命令通道会关闭 RemoteCommand、TTY、标准输入丢弃和自动后台化,避免登录时自动运行 tmux 等命令或 StdinNull 破坏文件传输;也会清除本次连接的端口转发,避免与已有 SSH 会话争用端口,但保留 ProxyJump / ProxyCommand 路由。不会修改你的 SSH 配置文件或已有转发。若 RemoteCommand 原本用于进入容器或另一台机器,请为 MCP 配置直接到达目标环境的 SSH 别名。
远端脚本编码为单行后由 POSIX sh 解码执行,避免依赖默认登录 shell 的多行语法、引号或历史展开规则;文件内容仍走标准输入。非交互 shell 的启动脚本不要向 stdout 打印欢迎语等额外内容,以免污染结构化结果。
密码、私钥口令及 keyboard-interactive/二次认证由新终端中的 OpenSSH 处理,需要本机有可用桌面会话。自动探测的终端若启动后立即失败,会尝试下一个;显式指定 REMOTE_SSH_TERMINAL 时直接报告启动错误。禁用连接复用或没有桌面终端时,需要先配置可用的免交互密钥/Agent 认证。
SSH 配置项的原生语义参见 OpenSSH 官方手册。主机指纹验证保持开启,不自动接受未知或变化的主机密钥,也不自动启用旧的加密算法。
认证:用户在新终端输入
检查该目标是否已有可复用的 ControlMaster。
尝试已配置的密钥或 ssh-agent。主机密钥必须已知,否则进入下一步。
需要确认主机指纹、输入密码或解锁私钥时,新开终端运行标准
ssh。用户直接回答 OpenSSH 的提示;MCP 不接收、不保存这些输入。认证成功后 SSH 转入后台,终端中的命令结束,后续调用复用连接。连接默认保留 12 小时。
目标管理的 add、update、connect 和普通远程工具都使用此流程。并发调用共享一次预热,取消某个调用不会破坏其他调用正在等待的认证。主机密钥变化仍由 OpenSSH 拒绝;请在终端按实际情况处理。
终端在 MCP 进程所在的本机 打开,需要桌面会话及相应环境变量(例如 DISPLAY / WAYLAND_DISPLAY / DBUS_SESSION_BUS_ADDRESS)。支持常见 Linux 终端自动探测。可以明确指定:
{
"mcpServers": {
"remote-ssh": {
"command": "node",
"args": ["/absolute/path/to/remote-ssh/src/cli.js"],
"env": {
"REMOTE_SSH_TERMINAL": "gnome-terminal --window -- bash -lc"
}
}
}
}REMOTE_SSH_TERMINAL 是终端可执行文件及参数;服务将完整 SSH 命令作为最后一个参数追加。不要填密码。默认等待输入 150 秒;客户端工具超时应至少设为 180 秒。前台长命令的客户端超时还需覆盖命令执行时间,或使用后台模式。
controlPersist: 0 / null 禁用连接复用,只适合已完成主机指纹确认的免交互密钥/Agent 认证;密码或需输入口令的私钥请保留默认复用设置。
目标配置
默认文件为 ~/.config/remote-ssh/targets.json,初始不存在时目标列表为空。可手写 JSON,也可由工具增删改。每次调用重新读取,配置损坏会报错并保留文件。工具写入使用跨进程锁和原子替换,文件权限为 0600。
[
{
"name": "gpu",
"ssh": "user@gpu.example.com",
"port": 22,
"root": "/home/user/project",
"controlPersist": 43200
}
]ssh 也可以是 ~/.ssh/config 中的别名;IdentityFile、ProxyJump 等由 OpenSSH 配置。支持 user@host:2222、user@[::1]:2222;裸 IPv6 的端口用 port 指定。name 唯一,不填时默认使用规范化后的 SSH 目标;port 和 controlPersist 可省略。配置严格接受上述五个字段。
工具
工具 | 作用 |
|
|
| 分页读取远端 UTF-8 文本并显示行号 |
| 创建或完整覆盖文本文件,使用原子替换 |
| 字面量替换;拒绝超过 4 MiB 的文件,写回前检查 mtime/size |
| 文件路径匹配,最多 100 项 |
| POSIX 扩展正则搜索,最多 250 条 |
| 前台命令或后台任务;前台默认 120 秒,最长 600 秒 |
| 任务状态、输出分页,以及结束后的清理 |
| 向任务进程组发送 TERM,必要时 3 秒后发送 KILL |
添加目标时验证连通性和目录;只有 create: true 才创建缺失的远端目录:
{"action":"add","name":"gpu","ssh":"gpu-alias","root":"/data/project","create":true}更新和连接使用 target 指定现有名称;更新时 name 可改名,port: null 清除端口覆盖。删除配置不会删除远程文件,也不会终止正在运行的任务。相同 SSH 目的地的多个目标共享连接,disconnect 会影响它们的连接复用。
{"action":"connect","target":"gpu"}读取文件:
{"target":"gpu","file_path":"README.md","offset":1,"limit":100}启动后台命令(bash):
{"target":"gpu","command":"python3 train.py","run_in_background":true}返回 job_id,通过 job_output 查询:
{"target":"gpu","job_id":"返回的 UUID","offset":0,"limit":65536}结果包含 status、exit_code、output、next_offset、has_more。将 next_offset 传回继续读取;running 时暂时没有输出不代表结束。可用 job_kill 传入同一 target 与 job_id 终止任务。
任务和日志默认保存在远端 ~/.cache/remote-ssh/jobs/<job_id>/,MCP 退出后仍运行,重启后凭相同目标和 ID 可查询。改名后用新目标名;改变 SSH 主机后旧任务仍在原主机。日志不会自动删除或限制磁盘占用:任务结束且读完输出后,用 job_output 的 cleanup: true 删除该任务记录。查询返回的 completed 表示进程结束,成功与否请检查 exit_code。
前台超时或取消会杀死本机 SSH 进程,远端命令可能继续运行;需要可靠终止时使用后台任务。任务主动创建新会话/守护进程的子进程可能脱离任务进程组。编辑通过 mtime/size 检查尽力检测冲突,不能替代远端文件锁。
环境变量
变量 | 默认值 / 用途 |
|
|
|
|
| 自动探测;指定终端启动命令 |
|
|
SSH socket 路径过长时,可将 REMOTE_SSH_CONTROL_DIR 设置为属于自己的较短路径。远端可通过其环境变量 REMOTE_SSH_JOB_DIR 自定义任务记录位置。
验证
npm test使用 Node 自带测试运行器。覆盖 MCP 新旧协议握手、工具参数、显式目标路由、配置增删改、终端认证复用、取消传递、文件读写、配置锁和后台任务生命周期。兼容性回归额外使用本机 ssh -G 检查登录配置隔离、身份与跳板路由保留,并验证单行脚本传输和终端启动失败处理。测试通过模拟 SSH 执行临时目录中的命令,不连接实际远端;真实桌面弹窗和真实服务器认证仍需在使用环境验证。
许可证
本项目采用 MIT 许可证。
Available Tools
9 toolsbashADestructive
Execute bash on the selected remote host. Each call starts a fresh shell. Commands have the SSH account permissions. Background jobs return a job_id; use job_output/job_kill with the same target. Remote Linux requires bash and python3.
| Name | Required | Description | Default |
|---|---|---|---|
| target | Yes | Exact target name from remote_ssh_targets list. Always select the intended host explicitly. | |
| command | Yes | Bash command to run on the remote host. | |
| workdir | No | Remote working directory; relative to target root by default. | |
| timeoutMs | No | Foreground timeout in milliseconds; default 120000, cap 600000. The remote process may survive a timeout. | |
| description | No | Short description of the command. | |
| run_in_background | No | Start a persistent remote job with no command timeout. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare destructiveHint=true and openWorldHint=true, so the safety profile is covered. The description adds non-obvious behavior beyond that: no shell state persists between calls, commands run with SSH account permissions, and background jobs must be tracked via job_output/job_kill on the same target. Missing detail on what a call returns (stdout/exit status).
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Four short sentences, front-loaded with the core action and scope. Every sentence carries distinct information: execution model, permission context, background workflow, and dependency requirement. No filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a destructive, open-world tool with 6 parameters and no output schema, the description covers execution model, permissions, async workflow, and dependencies. It is nearly complete, with only the return shape (output/exit code) left implicit.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the baseline is 3. The description goes further by explaining the run_in_background flow (job_id, same target) and the constraint that the shell is fresh per call, adding semantics the schema alone does not convey about how parameters interact across invocations.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('Execute bash on the selected remote host') and immediately scopes behavior with 'Each call starts a fresh shell.' This clearly separates it from local file siblings like read/write/edit/grep/glob, which operate on the workspace rather than a remote host.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explains the background-job branch explicitly: 'Background jobs return a job_id; use job_output/job_kill with the same target,' which routes the agent to the correct siblings. It also states the prerequisite (remote Linux requires bash and python3). It does not, however, tell the agent when to prefer remote bash over the local read/grep/edit tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
editADestructive
Edit an existing UTF-8 text file by replacing literal text. REMOTE: paths live on selected target (ssh target.ssh); the edit is applied on the remote host. Read the file first (the read-before-edit policy still applies by convention).
| Name | Required | Description | Default |
|---|---|---|---|
| target | Yes | Exact target name from remote_ssh_targets list. Always select the intended host explicitly. | |
| file_path | Yes | Path to edit, on the remote host selected target. A relative path resolves against the target root. | |
| new_string | Yes | Literal replacement text. Use an empty string to delete the match. | |
| old_string | Yes | Literal text to replace. Must match exactly. | |
| replace_all | No | Replace all matches. Defaults to false; when false, old_string must appear exactly once. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already flag destructive=true and openWorld=true, so the safety profile is covered. The description adds genuinely new behavioral context: paths resolve against a selected ssh target and the edit executes on the remote host rather than locally. It does not describe failure behavior when old_string is absent or non-unique.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three compact sentences, front-loaded with the core purpose before the remote caveat and the read-first convention. No redundant restatement of the name or schema fields.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With annotations covering the destructive/write profile and a fully described schema, the description supplies the missing environmental context (remote host, target selection, read-first convention). Only edge-case behavior on failed matches is unaddressed, which is a minor gap for this tool's complexity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so all five parameters are already documented, including the exact-match and single-occurrence rules for old_string. The description reinforces the remote-target meaning of file_path but adds no syntax or format detail beyond the schema, so baseline 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('Edit an existing UTF-8 text file') and narrows the mechanism to 'replacing literal text', which distinguishes it from the whole-file sibling write. It stops short of explicitly naming write as the alternative for full-file changes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives one useful procedural rule (read the file first; read-before-edit policy applies by convention) and clarifies the remote context. It never says when to prefer write over edit, nor when not to use this tool, so routing guidance is only implied.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
globARead-only
Find files whose paths match a glob pattern. Returns matching file paths — never directories — in modification-time order, up to 100 paths. REMOTE: the search runs on selected target (ssh target.ssh); .git/node_modules directories are skipped.
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Directory to search in, on the remote host selected target. Defaults to the target root; a relative path resolves against it. | |
| target | Yes | Exact target name from remote_ssh_targets list. Always select the intended host explicitly. | |
| pattern | Yes | Glob pattern to match file paths against (e.g. "**/*.ts"). A pattern with no "/" matches the basename at any depth; include a separator to anchor the depth. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Goes well beyond the readOnly/openWorld/non-destructive annotations: it discloses the result cap (100 paths), the sort order (modification time), that directories are excluded, that execution happens remotely over ssh, and that .git/node_modules are skipped. These are the facts an agent needs to reason about result truncation and coverage.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three compact sentences, front-loaded with the purpose, then return semantics, then the REMOTE qualifier. No filler; every clause carries a distinct fact.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
There is no output schema, and the description compensates by specifying return type, ordering, limit, and remote execution target. Combined with 100% schema coverage, an agent has everything needed to call it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description reinforces the remote/ssh and target framing but adds no syntax or format detail beyond what the pattern and target schema descriptions already supply.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource: "Find files whose paths match a glob pattern." It also pins scope by declaring what is returned (file paths, never directories), separating it from content-oriented siblings like grep and from read/write which operate on named files.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied (path-based file discovery on a remote target) but no explicit when-to-use or when-not, and it never names grep as the alternative for content search. An agent must infer the routing from the sibling names.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
grepARead-only
Search file contents with a regular expression (POSIX ERE on the remote grep; ripgrep-only syntax like \p{...} is unsupported). Returns matching lines with line numbers, grouped by file, capped at 250 matches. REMOTE: the search runs on selected target (ssh target.ssh); binary files and .git are skipped.
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | File or directory to search, on the remote host selected target. Defaults to the target root; a relative path resolves against it. | |
| target | Yes | Exact target name from remote_ssh_targets list. Always select the intended host explicitly. | |
| include | No | One glob filter for which files to search (e.g. "*.ts"). Not a list; negation is not supported. | |
| pattern | Yes | Regular expression to search for (extended regex). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations declare readOnlyHint=true, openWorldHint=true, destructiveHint=false, so safety is covered. The description adds valuable behavior: POSIX ERE limits, remote execution, binary/.git skipping, and a 250-match cap. These are concrete operational details not in annotations. Missing why the cap exists or what happens on overflow, but strong overall.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three short sentences, front-loaded with the core action and regex syntax note, then output behavior, then remote execution constraints. No wasted words; every clause is informative.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Covers regex flavor, output format (grouped, line numbers, cap), remote execution, and file exclusions. With no output schema, it explains the return structure well. Could mention error handling or performance implications, but it's complete enough for correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so all parameters are documented in the schema. The description mentions regex syntax (POSIX ERE) and implies the search runs remotely, which aligns with the 'target' parameter, but adds no new details about 'path', 'include', or parameter interactions. Baseline 3 for high coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Specific verb+resource: 'Search file contents with a regular expression.' It distinguishes itself from the sibling 'glob' by implying content search rather than filename search, and from 'read' by its search semantics. An agent can immediately tell what this tool does.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
States the search operates on a remote target and requires explicit target selection, which differentiates it from a local search. However, it doesn't explicitly say when to use this over 'glob' (filename matching) or 'read' (full file reading), leaving some inference to the agent.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
job_killADestructive
Terminate a remote background job process group (TERM, then KILL after 3 seconds). Output remains available through job_output.
| Name | Required | Description | Default |
|---|---|---|---|
| job_id | Yes | ||
| target | Yes | Exact target name from remote_ssh_targets list. Always select the intended host explicitly. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already cover the safety profile (destructiveHint=true, readOnlyHint=false, openWorldHint=true), so credit goes to what is added: the two-stage TERM/KILL escalation with a 3-second grace period, and the fact that output survives the kill and stays retrievable via job_output. That last point meaningfully changes calling behavior but is limited to one clause; no mention of what happens if the PID/target is gone or permission failures.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two tight sentences, zero filler, and the destructive action is front-loaded ahead of the surviving-output detail. Every clause earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a kill tool with no output schema, the description supplies the essentials: what is terminated, how forcefully, and where the output goes afterward. It stops short of failure modes or idempotency behavior, but nothing required to invoke it correctly is missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Coverage is exactly 50% (target is documented in-schema, job_id is only a uuid pattern). The phrase 'job process group' hints that the job_id scopes to a process group rather than a single PID, but neither parameter is explained in the description, so it does not compensate for the undocumented half.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb (Terminate) and resource (remote background job process group), and the escalation mechanism (TERM then KILL) makes the scope unambiguous. It also names the sibling it complements (job_output), so an agent can distinguish it from read-side tools without opening either schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied: kill a background job you previously started. There is no explicit when-to-use statement, no guidance on when to prefer this over alternatives like bash or waiting on job_output, and no preconditions. Adequate but leaves the agent to infer the trigger conditions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
job_outputADestructive
Read a remote background job status and output. Reuse next_offset to paginate without duplicates. IDs survive MCP restarts. cleanup:true deletes a finished job after its last output chunk.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| job_id | Yes | ||
| offset | No | ||
| target | Yes | Exact target name from remote_ssh_targets list. Always select the intended host explicitly. | |
| cleanup | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare destructiveHint=true and openWorldHint=true; the description corroborates this by explaining exactly what is destroyed (a finished job, after its last output chunk) and adds non-obvious traits the annotations cannot convey, e.g. IDs surviving MCP restarts and duplicate-free pagination.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three sentences, no filler, and the primary purpose is front-loaded ahead of pagination and cleanup details. Every clause carries distinct operational information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, the description should say more about the returned status/output shape, and it omits auth or target-selection prerequisites for a destructive, open-world tool. It covers the main quirks (ID persistence, dedup pagination, cleanup) but is not fully complete for a 5-parameter mutation-capable tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is only 20%, so the description carries real weight. It explains cleanup and offset/pagination semantics, but it refers to 'next_offset' while the actual schema parameter is 'offset', a naming mismatch, and leaves job_id, limit and the required target unexplained (target's meaning comes from the schema, not the description).
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb+resource: reading remote background job status and output. It is clearly distinguishable from job_kill (which terminates) and from local read/bash siblings. It stops short of explicitly naming those siblings, so a 4 rather than a 5.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives concrete operating guidance: reuse next_offset to paginate without duplicates, and cleanup:true deletes a finished job after the last chunk. It implies when to use cleanup and how to resume, but never states when not to use this tool or what alternative exists for running/completed jobs.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
readARead-only
Read a UTF-8 text file and return line-numbered content. REMOTE: paths live on selected target (ssh target.ssh); reads run on the remote host.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of lines to return. Defaults to 2000. | |
| offset | No | 1-based first line to return. Defaults to 1. | |
| target | Yes | Exact target name from remote_ssh_targets list. Always select the intended host explicitly. | |
| file_path | Yes | Path to read, on the remote host selected target. A relative path resolves against the target root. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=true, so the safety profile is covered. The description adds genuinely new context: that paths live on a remote ssh target and that the read executes on the remote host, which an agent could not infer from the annotations alone.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two compact sentences, with the core purpose front-loaded before the remote-host caveat. The 'REMOTE:' prefix is slightly awkward but nothing is wasted.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema exists, so the description carries the burden of stating the return value, which it does ('line-numbered content'). Combined with the remote-execution note and fully documented parameters, an agent has what it needs, though pagination interaction with limit/offset is left entirely to the schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so file_path, target, limit and offset are all documented in the schema, establishing the baseline of 3. The description reinforces that file_path is remote and relative paths resolve against the target root, but adds no syntax or format detail beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('Read a UTF-8 text file') plus the return shape ('line-numbered content'), which is enough to separate it from write/edit. It does not explicitly distinguish itself from grep or glob for content search, so it falls short of the top tier.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explains the operating context (reads run on the selected remote target) but gives no guidance on when to pick read over grep, glob, or bash for inspecting file contents. Usage is implied by the verb rather than stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
remote_ssh_targetsADestructive
List/add/update/remove SSH targets or connect/disconnect/check a ControlMaster. add/update verify the remote root and may open a terminal for authentication. Changes apply to the next call. No passwords are accepted or stored.
| Name | Required | Description | Default |
|---|---|---|---|
| ssh | No | SSH alias or user@host; host:port and [IPv6]:port are accepted. Uses ~/.ssh/config. | |
| name | No | Unique target name; defaults to the SSH destination. | |
| port | No | SSH port; null clears an override on update. | |
| root | No | Default remote working directory, not a filesystem sandbox. | |
| action | Yes | ||
| create | No | Create the remote root if missing. Default false. | |
| target | No | Existing target name for update/remove/connect/disconnect/status. | |
| controlPersist | No | Connection reuse in seconds; default 43200. 0/null disables reuse and requires noninteractive key/agent authentication. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Beyond the annotations (destructiveHint=true, openWorldHint=true), the description adds real behavioral context: add/update verify the remote root, may open a terminal for authentication, changes apply only to the next call, and no passwords are accepted or stored. It stops short of describing what a remove destroys or connection-state side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three dense sentences with no filler, and the action inventory is front-loaded. Each sentence carries distinct information (actions, auth behavior, persistence semantics).
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For an 8-parameter, mutation-capable tool with no output schema, the description covers the key behavioral facts an agent needs (auth flow, next-call application, no stored credentials). It does not describe return shapes for list/status, which is a minor gap given no output schema exists.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 88%, so the schema already documents ssh, root, port, create, target, and controlPersist well. The description adds only the no-password/auth constraint and does not clarify parameter interactions (e.g., which params apply to which action), so the baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description names specific verbs (list/add/update/remove/connect/disconnect/check) and their resources (SSH targets, ControlMaster), so the tool's scope is immediately legible. It is a bundled multi-action tool, which slightly blurs a single purpose, and it never explicitly differentiates itself from the bash/read/write siblings.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied through action-level notes (add/update verify the remote root, connect/disconnect/check a ControlMaster) but there is no explicit 'use this when' guidance or comparison to alternatives such as invoking ssh through bash. The agent must infer which action to pick from the enum.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
writeADestructive
Create or fully replace a UTF-8 text file. REMOTE: paths live on selected target (ssh target.ssh); the file is written on the remote host (parent directories are created).
| Name | Required | Description | Default |
|---|---|---|---|
| target | Yes | Exact target name from remote_ssh_targets list. Always select the intended host explicitly. | |
| content | Yes | Full UTF-8 text content to write. | |
| file_path | Yes | Path to write, on the remote host selected target. A relative path resolves against the target root. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare destructiveHint=true and openWorldHint=true, so the overwrite semantics are partly covered structurally. The description still adds value beyond them: it clarifies that replacement is total, that paths resolve on the selected remote host, and that parent directories are created automatically. It does not disclose permissions/auth needs or failure behavior, keeping it short of a 5.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two tight sentences, zero waste. The core action is front-loaded and the remote/target constraint follows immediately after.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a destructive remote write with destructiveness and open-world behavior already declared in annotations, the description covers location, path resolution, and parent-directory creation. It stops short of describing what a successful call returns or how failures/partial writes surface, though no output schema exists to cover that.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% and all three parameters are documented in the schema itself (target, content, file_path with relative-path resolution). The description reinforces the target-selection constraint but adds no syntax or format detail beyond the schema. Baseline 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb pair and resource ('Create or fully replace a UTF-8 text file'), and the word 'fully replace' implicitly carves out its scope against the sibling `edit` (partial modification) and `read`. An agent can tell what this does and how it differs from the other file tools without opening the schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives real context ('REMOTE: paths live on selected target') and the requirement to pick the intended host, which is genuine usage guidance for a remote tool. However, it never explicitly says when to choose `write` over `edit` or `read`, nor does it state exclusions. Usage is implied rather than stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
9 tool updates
v1.0.0- First observed
bash - First observed
edit - First observed
glob - First observed
grep - First observed
job_kill - First observed
job_output - First observed
read - First observed
remote_ssh_targets - First observed
write
TDQS
Scored across 9 tools
Every tool targets a distinct operation: file read/write/edit, path search (glob), content search (grep), shell execution, background job handling, and target management. The only multi-action tool is remote_ssh_targets, but no other tool overlaps with it, so misselection risk is low.
Names are all lowercase and multiword ones use snake_case, but there is no consistent verb_noun pattern: some are bare verbs (read, write, edit), some are nouns (glob, grep, bash), and others use noun_noun (job_output, job_kill) or a domain prefix (remote_ssh_targets). Readable but not predictable.
9 tools cover the domain's main surfaces—file I/O, search, shell execution, job control, and target management—without redundant entries. The count is well within the typical 3-15 range and each tool earns its place.
Core file operations (read/write/edit), search (glob/grep), and remote execution (bash, job output/kill) are present, but there is no dedicated delete or directory-listing tool. Since bash is available, agents can work around these gaps with shell commands, making it a minor rather than blocking omission.
Maintenance
Related MCP Connectors
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
Securely control computers you explicitly pair through files, terminals, processes, screenshots, desktop UI/input, clipboard, browser automation, diagnostics, and document tools.
- emisarOAuthdev.emisar
Let AI operate servers without SSH. Choose actions, approve risky changes, and audit every step.
Scoped, audited SSH exec, sessions, and SFTP on your saved servers without exposing credentials
Related MCP Servers
AlicenseBqualityBmaintenanceEnables AI assistants to manage remote servers via SSH with 43 specialized tools for command execution, file editing, directory operations, and background tasks across Linux, macOS, and Windows.4442 PyPI5GPL 3.0- AlicenseAqualityCmaintenanceEnables AI assistants to manage remote servers via SSH with agentless command execution, file operations, and service management.9MIT
- FlicenseNot gradedqualityDmaintenanceEnables secure remote workspace management over SSH, supporting file operations, shell commands, and profile configuration for agent-safe remote code environments.-
- AlicenseNot gradedqualityDmaintenanceEnables MCP-compatible AI clients to remotely manage a Linux server via SSH, supporting file operations, Docker control, Git pulls, and arbitrary command execution.6,728 npmMIT