Borrowing it
Nothing to install: this file belongs to guanhxuan/sshcode-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/guanhxuan/sshcode-mcp/main/AGENTS.mdgit clone --depth 1 https://github.com/guanhxuan/sshcode-mcpWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/guanhxuan/sshcode-mcp/agents-md)<a href="https://agentmods.dev/instructions/guanhxuan/sshcode-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/guanhxuan/sshcode-mcp/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/guanhxuan/sshcode-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/guanhxuan/sshcode-mcp/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00539 | $0.00539 |
| Opus 5.5 | $0.00216 | $0.00216 |
| Sonnet 5.5 | $0.00108 | $0.00108 |
| Haiku 4.5 | $0.00054 | $0.00054 |
Grade C, and why
sshcode-mcp AGENTS.md scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Reaches for credential fileshighPrivilege escalation
SSH keys, cloud credentials, git-credentials, .npmrc, /etc/shadow: reading these is how a config file becomes a credential leak.
node bin/sshcode.js [email protected] -i ~/.ssh/id_rsa What it actually says
sshcode-mcp
SSH Remote AI Development Tool - 通过 SSH 让 AI 在远程计算机上进行开发操作。
快速启动
# 密码认证
node bin/sshcode.js [email protected] -P 123
# 密钥认证
node bin/sshcode.js [email protected] -i ~/.ssh/id_rsa
# 自定义端口
node bin/sshcode.js [email protected] -p 2222 -P 123
MCP 工具列表
| 工具名 | 说明 |
|---|---|
execute_command |
在远程服务器执行 shell 命令 |
read_file |
读取远程文件内容 |
write_file |
写入/覆盖远程文件 |
edit_file |
编辑远程文件指定行(按行号) |
list_directory |
列出远程目录内容 |
create_directory |
创建远程目录 |
delete_path |
删除远程文件/目录 |
rename_path |
重命名/移动远程文件/目录 |
file_stat |
获取远程文件元数据 |
search_files |
在远程服务器搜索文件(glob 模式) |
get_system_info |
获取远程系统信息 |
get_pool_stats |
获取连接池/缓存统计 |
性能优化
- 连接池: 复用 SSH 连接 (最多 5 个),避免重复握手
- 文件缓存: LRU 缓存 (最多 50 个文件,TTL 60s)
- 命令超时: 默认 30s,防止长时间卡住
- 并发控制: 最多 10 个并发命令
- 输出截断: 超过 10MB 自动截断
- SFTP 复用: 在同一连接内复用 SFTP 通道
- ssh 压缩: 强制开启压缩减少带宽
配置
node bin/sshcode.js config
node bin/sshcode.js config set pool.maxSize 10
node bin/sshcode.js config set command.defaultTimeout 60000
架构
AI (MCP Client) <-> stdio JSON-RPC <-> sshcode-mcp <-> SSH <-> Remote Server
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago First seen · 58 lines · 539 tokens per session scan C 0d833f7384be
sshcode-mcp AGENTS.md is an instructions file published in the GitHub repository guanhxuan/sshcode-mcp (1 stars, last pushed 3mo ago), licensed MIT. It adds 539 tokens to every session, about $0.0022 per session on Opus 5.5. A static security scan graded it C with 1 finding (reaches for credential files). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
sshcode-mcp AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| sshcode-mcp AGENTS.mdguanhxuan/sshcode-mcp | Instructions file | 1 | 3mo ago | MIT | C | 539 | Codex, OpenCode |
| plan-forge naming.instructions.mdsrnichols/plan-forge | Instructions file | 6 | 2d ago | MIT | A | 1,453 | GitHub Copilot |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | yesterday | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | yesterday | MIT | A | 4,680 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 5,516 | GitHub Copilot |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 3,093 | GitHub Copilot |