Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add instructions/gelse/ssh-mcp/agents-mdgit clone --depth 1 https://github.com/gelse/ssh-mcpWhat 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 | $0.03265 | $0.03265 |
| Opus 5 | $0.01632 | $0.01632 |
| Sonnet 5 | $0.00653 | $0.00653 |
| Haiku 4.5 | $0.00327 | $0.00327 |
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 2d 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 — 217 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.
- 2d 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 (4 stars, last pushed 2d ago), licensed MIT. It adds 3,265 tokens to every session, about $0.0163 per session on Opus 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.
Other instructions, from other repositories
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
buildNext
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
next.js AGENTS.md
Instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
spec-kit AGENTS.md
Instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.
langchain AGENTS.md
Instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.