# sshmcp

Gives AI coding agents direct SSH terminal and SFTP access to manage remote machines, run shell jobs, and transfer files without consuming context tokens.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 11
- Author: NikolaNddTesla
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/NikolaNddTesla/ssh-mcp-server
- Updated: 2026-05-27
- HTML: https://affpapa.org/en/nevibecode/mcp/sshmcp

## What it does

The server equips your assistant with 21 remote administration tools. Connection pooling organizes multiple machines under custom IDs, letting the model switch between hosts without repeating the handshake. SFTP handles file transfers purely on disk, ensuring file payloads stay out of the prompt window. Folders are bundled into `tar.gz` archives automatically before transfer.

Supported authentication includes private keys, passwords, `ssh-agent`, and interactive OTP prompts. It also handles bastions via jump host parameters as well as SOCKS4 and SOCKS5 proxies. Background transfers report size and speed for larger payloads.

Configuration is written directly to `~/.ssh-mcp/config.json`. Passwords stay unencrypted on disk, making private keys the safer option on production infrastructure. Running this package requires Node.js 18 or newer.

## Requirements
- Needs: Node.js (commands run via npx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add sshmcp -- npx -y @nl4ever/sshmcp
```

### Codex

**Platform CLI**
```bash
codex mcp add sshmcp -- npx -y @nl4ever/sshmcp
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "sshmcp": {
            "command": "npx",
            "args": [
                "-y",
                "@nl4ever/sshmcp"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "sshmcp": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@nl4ever/sshmcp"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add sshmcp npx -y @nl4ever/sshmcp
```

## When to use it
- Run terminal commands on remote infrastructure from conversation
- Upload source directories with automatic compression and remote extraction
- Reach private subnets via SSH jump hosts and SOCKS tunnels
- Sync large files in the background without loading contents into token context

## Example prompts
- Check nginx systemd service status on prod server
- Upload the ./dist folder to dev server at /var/www/site
- Connect to 192.168.1.50 as root via quick connect and inspect disk space

## Similar
- [termcp](https://affpapa.org/en/nevibecode/mcp/termcp.md) — MCP server · ★ 59
- [agent-tool](https://affpapa.org/en/nevibecode/mcp/agent-tool.md) — MCP server · ★ 24
- [Octofs](https://affpapa.org/en/nevibecode/mcp/octofs.md) — MCP server · ★ 18
- [ssh](https://affpapa.org/en/nevibecode/mcp/ssh.md) — MCP server · ★ 81
- [tunnel-doctor](https://affpapa.org/en/nevibecode/skills/tunnel-doctor.md) — skill · 678 installs
- [omni-version-manager](https://affpapa.org/en/nevibecode/skills/omni-version-manager.md) — skill · 975 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
