# Agentic SSH [Health: Active]

**Category:** 🖥️ Command Line  
**Repository:** https://github.com/sandbanks/agentic_ssh  
**GitHub Stars:** 6  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/agentic-ssh

## Description
High-performance (Rust), token-efficient, and asynchronous SSH orchestrations for AI agents.

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/sandbanks/agentic_ssh), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Install:

```sh
brew install sandbanks/tap/agentic_ssh
```

2. Install:

```sh
cargo binstall agentic_ssh
```

3. Install:

```sh
agentic_ssh install
```

## Documentation

## What Agentic SSH does

Agentic SSH exposes selected SSH operations through the Model Context Protocol for AI coding assistants. It is designed for environments where an agent needs to inspect or operate several remote machines, including homelabs, development servers, and clusters.

Access is restricted by an explicit host policy. The `allow_hosts` setting determines which hosts an agent may contact; when it is not configured, hosts are blocked by default. This prevents the MCP connection from automatically granting access to every alias in the local SSH configuration.

The project also includes a command-line interface for human operators. Its commands can watch concurrent activity across hosts, return diagnostic results as JSON, or display the state of the SSH connection pool in a terminal interface.

## How it works

The server uses Rust-native SSH connections with pooling and 30-second keepalives. Reusing connections avoids establishing a new SSH handshake for each command. Commands can run across multiple hosts concurrently, which suits fleet checks and comparative health investigations.

Long-running operations can be detached with `background: true`. The agent can continue working while the remote task runs, with output tracked in a local session log under `~/.agentic_ssh/sessions/`. Verbose output is summarized instead of being returned as an unfiltered terminal stream, reducing the amount of command output placed in the model context.

Arguments are passed in structured form and escaped by the server, rather than requiring the model to construct nested shell- and JSON-quoting manually.

## Setup and configuration

Install on macOS or Linux with Homebrew:

```bash
brew install sandbanks/tap/agentic_ssh
```

Precompiled binaries can also be installed with `cargo binstall agentic_ssh`, or the program can be run through Nix:

```bash
nix run github:sandbanks/agentic_ssh -- doctor
```

Run `agentic_ssh install` to detect supported AI tools and register the MCP server. Use `agentic_ssh doctor` to check its health. Configure `allow_hosts` before granting an agent access to remote machines.

## Tools and capabilities

The MCP tool catalog includes:

- `list_hosts` to return authorized SSH host aliases from `~/.ssh/config`.
- `list_groups` to return configured multi-host groups.
- `run_command` to execute commands concurrently, either synchronously or in detached background mode.
- `get_system_stats` to retrieve CPU load, memory usage, and disk partition statistics.
- `list_ports` to inspect listening TCP and UDP ports with process details.
- Docker status checks and container-log tailing for container diagnostics.

The CLI adds `watch` for live multi-host command output, `json` for parseable diagnostic results, and `tui` for connection-pool and running-command monitoring.

## Limitations and notes

The allowlist is central to the security model: without `allow_hosts`, hosts are blocked. The server operates against SSH hosts and groups defined in the local SSH configuration, so those aliases and group definitions need to exist for discovery and multi-host operations. The local session directory stores output from detached work.

_Full upstream README: https://allmcps.com/mcp/agentic-ssh/readme_

