sshcode-mcp: Instructions file for Codex

AGENTS.md

sshcode-mcp AGENTS.md is an instructions file for Codex, OpenCode from guanhxuan/sshcode-mcp. It costs 539 tokens per session, scanned C, original, MIT.

A project instruction file for sshcode-mcp, a tool that lets an AI work on a remote computer over SSH, the secure protocol commonly used to access servers.

In plain words
What is it for?
Use it to start sshcode-mcp, configure connection settings, run commands, read or edit remote files, search directories, and manage remote paths.
Why use it?
It documents how to connect with a password or SSH key and what remote file, directory, command, and system operations are available.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md.

This is guanhxuan/sshcode-mcp's own configuration. It tells Codex and OpenCode how to work on sshcode-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything sshcode-mcp configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/guanhxuan/sshcode-mcp/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/guanhxuan/sshcode-mcp

Made for: Codex, OpenCode.

Wrote 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.

agentmods badge for sshcode-mcp AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/guanhxuan/sshcode-mcp/agents-md/github.svg)](https://agentmods.dev/instructions/guanhxuan/sshcode-mcp/agents-md)
Your own site
<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.

agentmods 80×15 button for sshcode-mcp AGENTS.md

Your own site · 80×15
<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>
Per session 539 This file is loaded in full into every session.
When invoked 539 The same file — it is already loaded in full.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 2mo ago against content hash 0d833f7384be, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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
AGENTS.md · 58 lines

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
Changes

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.

  1. 2mo ago First seen · 58 lines · 539 tokens per session scan C 0d833f7384be

Subscribe to this mod's changes

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.

Related

sshcode-mcp AGENTS.md compared with instructions from other repositories

sshcode-mcp AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
sshcode-mcp AGENTS.mdguanhxuan/sshcode-mcpInstructions file13mo agoMITC539Codex, OpenCode
plan-forge naming.instructions.mdsrnichols/plan-forgeInstructions file62d agoMITA1,453GitHub Copilot
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot