Agentic SSH — Claude Code MCP server: what it does, how to install
Rust-powered SSH connection pool for AI agents. It restricts remote access with host whitelisting and trims terminal dumps down to compact JSON telemetry.
Open on GitHubWhat Agentic SSH does
Standard command-line SSH allows an assistant to inspect every machine declared in ~/.ssh/config, risking mistakes on production hosts. This server relies on russh to maintain reusable sockets with 30-second keepalives. It catches command output and writes bulky streams directly into local files under ~/.agentic_ssh/sessions/ instead of flooding context memory.
Without a defined allow_hosts entry, all connection requests are rejected immediately. The tool also wraps shell parameters safely so the model never trips over nested quotation marks. Long tasks execute via detached threads whenever background: true is supplied, keeping the agent responsive during lengthy builds.
What it helps with
- Restrict remote commands using an explicit
allow_hostslist - Collect CPU and memory metrics across remote machines simultaneously
- Audit listening network ports alongside corresponding process IDs
- Retrieve Docker container error logs without terminal noise
- Trigger detached compile jobs on remote nodes
Example prompts for the agent
- Inspect CPU load and available memory across cartman and stan
- List all open listening ports on staging and show the running binaries
- Check Docker container health on aruba and fetch recent auth-service logs
How to install Agentic SSH
Install
The MCP registry has no launch command for it: see the repository README
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Agentic SSH
How to install Agentic SSH in Claude Code?
Fetch the binary using brew install sandbanks/tap/agentic_ssh or run cargo binstall agentic_ssh. Afterward, execute agentic_ssh install in your terminal to automatically wire the MCP server into Claude Code.
What is the advantage of Agentic SSH over raw terminal commands?
Standard shell tools dump noisy terminal logs into the prompt window and let models wander across network hosts. Agentic SSH pools connections, cuts context overhead with structured JSON, and enforces strict host boundaries.
How does the server handle unauthorized hosts?
It defaults to blocking every connection until you list specific machines inside the allow_hosts setting.