Borrowing it
Nothing to install: this file belongs to gelse/ssh-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/gelse/ssh-mcp/main/AGENTS.mdgit clone --depth 1 https://github.com/gelse/ssh-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/gelse/ssh-mcp/agents-md)<a href="https://agentmods.dev/instructions/gelse/ssh-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/gelse/ssh-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/gelse/ssh-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/gelse/ssh-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.03377 | $0.03377 |
| Opus 5.5 | $0.01351 | $0.01351 |
| Sonnet 5.5 | $0.00675 | $0.00675 |
| Haiku 4.5 | $0.00338 | $0.00338 |
Grade B, and why
ssh-mcp AGENTS.md scanned grade B with 2 findings 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 1mo 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.
Asks for rootmediumPrivilege escalation
A mod that escalates privileges can change anything on the machine, not only the project.
│ ├── sudo.py # SudoHandler — validate, wrap sudo command, password injection Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
- Health: `wget --spider http://localhost:8080/health` How it starts
The opening of the file, as written. The whole thing — 222 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md — AI Development Guide for mcp-ssh
Contents:
- Project Overview · Project Layout · Plans & CI
- Testing · Development Workflow
- Coding Conventions · Authorization Model
- Definition of Done · Dependency Management
- Docker / Deployment · Security
- Adding a Tool · File-Touch Checklist
Project Overview
mcp-ssh is a Model Context Protocol server exposing SSH command execution and SFTP file transfer as MCP tools. Runs as Docker behind Traefik, speaking streamable HTTP on port 8080 at /mcp.
Stack: Python 3.13, FastMCP 3.4.x, paramiko 5.0, Starlette 1.4, Prometheus client, watchdog
Six tools: ssh_list_servers, ssh_list_allowed_commands, ssh_execute_command, ssh_check_connection, ssh_download_file, ssh_upload_file — see README.md.
Key patterns: App-factory (create_app(), zero I/O at import), closure DI for tools, thread-pool for SSH I/O, per-target connection pooling, layered auth chain, config hot-reload (15 s poll / 2 s debounce), circuit breaker + exponential-backoff, sliding-window rate limiter, JSONL logging with rotation/gzip.
Project Layout
mcp-ssh/
├── server.py # FastMCP app factory + CLI entry point
├── lib/ # 25 modules (plus __init__.py re-exports)
│ ├── auth.py # AuthorizationManager, layered allow-list chain
│ ├── circuit_breaker.py # Per-target failure threshold + recovery timeout
│ ├── command_security.py # Command segmentation, dangerous-pattern detection, redirector stripping
│ ├── config.py # ConfigManager — JSON load/validate/hot-reload
│ ├── config_migration.py # Config schema migration (v1→v2)
│ ├── config_watcher.py # Filesystem watcher (polling or watchdog)
│ ├── connection_pool.py # Per-target SSH connection pooling
│ ├── constants.py # ALL magic numbers, strings, defaults (single source of truth)
│ ├── crypto.py # PBKDF2-HMAC-SHA256 API-key hashing + constant-time verify
│ ├── exceptions.py # MCPSSHError hierarchy
│ ├── file_transfer.py # SFTP download/upload with 7-layer path validation
│ ├── health.py # GET /health endpoint
│ ├── log_handler.py # JSONLHandler — stdlib logging → FileLogger bridge
│ ├── loggers.py # FileLogger (JSONL rotation/truncation/gzip)
│ ├── metrics.py # Prometheus metrics + GET /metrics endpoint
│ ├── rate_limiter.py # Sliding-window per-IP rate limiter
│ ├── redos_protection.py # Safe regex compilation and ReDoS-resistant matching
│ ├── request_context.py # Starlette middleware: request_id, client IP, API key
│ ├── sanitize.py # Input sanitization helpers
│ ├── secrets.py # SecretsManager for secrets.json + env var merging
│ ├── size_utils.py # parse_size_bytes() for size-string settings
│ ├── ssh_client.py # SSHClientManager — connect, retry, circuit-break, pool
│ ├── ssh_operations.py # Standalone SSH functions (check, connect, execute)
│ ├── sudo.py # SudoHandler — validate, wrap sudo command, password injection
│ └── types.py # TypedDict models for tool results
├── config-api/ # Config API + Web Dashboard (GUI)
│ ├── config_api/app.py, auth.py, config_service.py, models.py, routes.py
│ └── config_api/ui/index.html # SPA dashboard (Tailwind CSS)
├── tests/
│ ├── test_*.py # 29 unit-test files
│ └── integration/test_mcp_ssh_integration.py # Real Docker containers
├── docs/SECURITY.md # Full security model
├── Dockerfile, compose.yaml, Makefile
├── requirements{,-build,-dev}.{in,txt}
├── default-config.json, config.schema.json
└── README.md
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.
- 1mo ago Changed · +4 lines · +83 tokens per session d903efaf019b
- 2mo ago Changed · +1 lines · +29 tokens per session 22fbf642d13d
- 2mo ago First seen · 217 lines · 3,265 tokens per session scan B 00cb4ba5f07e
ssh-mcp AGENTS.md is an instructions file published in the GitHub repository gelse/ssh-mcp (8 stars, last pushed 1mo ago), licensed MIT. It adds 3,377 tokens to every session, about $0.0135 per session on Opus 5.5. A static security scan graded it B with 2 findings (asks for root, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
ssh-mcp AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| ssh-mcp AGENTS.mdgelse/ssh-mcp | Instructions file | 8 | 1mo ago | MIT | B | 3,377 | Codex, OpenCode |
| 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 |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |