High-performance (Rust), token-efficient, and asynchronous SSH orchestrations for AI agents.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent — or use 1-click editor setup below.
💡 Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
agentic_ssh 🛰️🛡️Stop your AI agent from nosing around your SSH connections without permission.
A secure-by-default SSH connection pool & MCP server for AI coding assistants (Claude Code, Cursor, Gemini, Antigravity, Copilot, Cline).
agentic_ssh gives your AI assistant fast, token-efficient, and asynchronous SSH access to your homelab, dev servers, and clusters—with strict zero-trust host guardrails so it can never touch unauthorized infrastructure.

agentic_ssh| Metric / Scenario | Raw SSH in Agent Prompt | With agentic_ssh MCP | The Difference |
|---|---|---|---|
| Security & Blast Radius | Full access to every host in ~/.ssh/config | Strict Whitelist Guardrail (allow_hosts) | Unauthorized hosts blocked 🛡️ |
| Context Window Consumption | 15,000+ tokens (raw stdout dump) | 185 tokens (structured JSON telemetry) | 98.8% token savings 📉 |
| API Cost per Query | ~$0.05 – $0.15 | ~$0.0004 | Fraction of a cent 💰 |
| Connection Latency | 800ms – 1.5s reconnect handshake | 0ms (pooled Keepalive socket) | Instant response ⚡️ |
| Long-Running Builds | Blocks agent reasoning / silent dropout | Detached async (background: true) | Parallel workflows 🚀 |
If you've ever let an autonomous agent run raw terminal ssh, you're exposing your machines to huge risks:
~/.ssh/config. If you ask an agent to inspect a local dev box, nothing stops it from querying your production database, jumping through client bastions, or running rogue commands where it shouldn't.apt upgrade or cargo build, and 15,000 lines of compiler noise dump straight into your context window—wiping out memory, blowing up rate limits, and wasting money.ssh host "bash -c \"echo 'hello'\"") invariably leads to broken quotes and syntax errors.agentic_ssh Fixes This| The Danger | agentic_ssh Zero-Trust Solution |
|---|---|
| Unchecked Server Access | Strict Host Whitelist (allow_hosts): If allow_hosts is not configured, all hosts are blocked by default. Your agent can only touch machines you have explicitly approved. |
| Bloated Context Windows | Automatically summarizes verbose outputs and redirects large streams to isolated local session logs (~/.agentic_ssh/sessions/). |
| Dropped Sockets & Lag | Rust-native connection pooling (russh) with automatic 30s keepalives and zero-latency session reuse. |
| Broken Quoting | Arguments are structured and escaped natively behind the scenes—zero escaping headaches for the model. |
| Blocking Long Tasks | Supports background: true—fires long builds or migrations into detached threads so the agent can keep working. |
One command detects your installed AI tools and registers the MCP server automatically:
(Supports Claude Code / Desktop, Cursor, Gemini, Antigravity, Copilot, Zed, Cline, and Roo-Code).
Once installed, just talk to your agent naturally. Here are real-world prompts you can copy & paste:
"Check the CPU load, RAM usage, and available disk space across stan, cartman, and aruba. Report any bottlenecks."
⚡️ Agent calls
get_system_statsconcurrently across all 3 nodes and gives you a structured comparison table in 2 seconds.
"Inspect all active listening TCP and UDP ports on our staging server. Flag anything open on 0.0.0.0 that shouldn't be."
⚡️ Agent calls
list_portswith process attribution (PID + binary name) for instant auditing.
"Check if any Docker containers crashed on cartman, and tail the last 50 lines of the auth-service logs."
⚡️ Agent calls
check_docker_statusandtail_container_logswithout flooding your context window.
"Deploy the latest git commit on stan in the background and notify me when it finishes."
⚡️ Agent runs
run_commandwithbackground: true, frees up your chat immediately, and tracks the output in a local session log.
agentic_ssh isn't just an MCP server for AI—it includes powerful CLI tools for human developers too:
💡 Tip: Add
alias ash="agentic_ssh"to your~/.zshrcor~/.bashrcto save keystrokes!
agentic_ssh watch: Multi-Host Live Streaming TUIWatch commands run concurrently across multiple servers with live streaming panes and post-run log inspection:

agentic_ssh json: Instant Multi-Host ScriptingCall any built-in MCP diagnostic tool directly from your terminal and get clean, parseable JSON:
agentic_ssh tui: Live Connection Pool DashboardInspect active SSH sockets, heartbeat metrics, and connection lifetimes:
| MCP Tool | Description |
|---|---|
list_hosts | Discovers and returns all authorized SSH host aliases from ~/.ssh/config. |
list_groups | Returns defined multi-host server groups (e.g., web-fleet, db-cluster). |
run_command | Executes commands concurrently across hosts (supports sync or detached async background mode). |
get_system_stats | Fetches CPU load, RAM utilization, and disk partition stats. |
list_ports | Scans active listening TCP/UDP sockets with process & PID attribution. |
search_processes | Evaluates and filters running processes with regex matching. |
tail_log | Safely tails standard system log files without loading multi-gigabyte files. |
tail_container_logs | Fetches real-time log frames from Docker containers. |
check_docker_status | Returns Docker daemon health, running containers, and image counts. |
check_service_status | Queries systemd / systemctl service states. |
list_upgradable | Lists pending OS package updates across remote machines. |
git_pull | Safely fetches and updates a remote Git repository. |
find_large_files | Scans for disk-hogging files exceeding a size threshold. |
grep_syslog | Searches remote syslog / journalctl streams for specific error patterns. |
list_cron_jobs | Inspects system and user crontabs. |
list_network_connections | Lists active network connections and remote endpoints. |
~/.config/agentic_ssh/config.toml)You can define host groups and security boundaries in an optional configuration file:
tokensave.No reviews yet — be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/agentic-ssh)<a href="https://allmcps.com/mcp/agentic-ssh"><img src="https://allmcps.com/api/badge/agentic-ssh?style=directory" alt="Agentic SSH on AllMCPs" /></a>