Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

Enables SSH command execution, file uploads/downloads, and multi-server management with zero-config inline credentials, supporting async jobs and AI-readable output.

README.md

ssh-mcp-server

![npm](https://www.npmjs.com/package/@thesashadev/ssh-mcp-server) ![License: AGPL-3.0](https://www.gnu.org/licenses/agpl-3.0)

MCP server for executing commands, uploading and downloading files on remote servers via SSH. Zero-config for single servers — just pass credentials inline.

English

ssh-mcp-server is an MCP server for controlled SSH automation from AI tools. It supports command execution, file uploads/downloads, multi-server configs, async jobs, and clean AI-readable output.

Русский

ssh-mcp-server — MCP-сервер для контролируемой SSH-автоматизации из AI-инструментов. Он поддерживает выполнение команд, загрузку/скачивание файлов, конфигурации нескольких серверов, фоновые задачи и чистый вывод, удобный для AI.

Українська

ssh-mcp-server — MCP-сервер для контрольованої SSH-автоматизації з AI-інструментів. Він підтримує виконання команд, завантаження/скачування файлів, конфігурації кількох серверів, фонові задачі та чистий вивід, зручний для AI.

Features

  • Command execution — sync/async modes, timeout, background polling
  • Reliable file transfers — 5 automatic fallback strategies
  • Multi-server — easy switching with workspace-based auto-selection
  • AI-Native output — ANSI stripped, binary detected, control chars removed
  • Zero-config mode — pass server credentials directly in MCP config, no extra files needed
  • Fast — SFTP session caching, connection pooling, 64-stream parallel transfers

Tools

| Tool | Description | |------|-------------| | ssh_servers | List configured servers and their workspace bindings | | ssh_execute | Run a shell command (sync or async with polling) | | ssh_upload | Upload a local file to remote server | | ssh_download | Download a remote file to local machine |

Quick Start

Zero-Config (Inline)

No files needed — pass server credentials directly in your AI tool's MCP config: ``json { "ssh": { "command": "npx", "args": [ "-y", "@thesashadev/ssh-mcp-server", "--host", "1.2.3.4", "--username", "ubuntu", "--password", "your-password" ] } } ``

With Config File

For multi-server setups, create ssh-servers.json in your working directory: ``json { "servers": [ { "id": "dev", "name": "Dev Server", "host": "1.2.3.4", "username": "ubuntu", "password": "your-password", "workspaces": ["D:\\projects\\my-app"] } ] } ` Then run: `bash npx -y @thesashadev/ssh-mcp-server ``

🔌 Client Integration

<details> <summary><b>Claude Code (CLI)</b></summary>

Single server: ``bash claude mcp add ssh -- npx -y @thesashadev/ssh-mcp-server --host 1.2.3.4 --username ubuntu --password secret ``

Two servers: ``bash claude mcp add ssh -- npx -y @thesashadev/ssh-mcp-server \ --host 1.2.3.4 --username ubuntu --password secret --id dev \ --host 5.6.7.8 --username deploy --key ~/.ssh/id_rsa --id prod ``

Or with config file: ``bash claude mcp add ssh -- npx -y @thesashadev/ssh-mcp-server ` (Place ssh-servers.json` in your project root) </details>

<details> <summary><b>Claude Desktop</b></summary>

Edit claude_desktop_config.json:

  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Single server: ``json { "mcpServers": { "ssh": { "command": "npx", "args": [ "-y", "@thesashadev/ssh-mcp-server", "--host", "1.2.3.4", "--username", "ubuntu", "--password", "secret" ] } } } ``

Two servers: ``json { "mcpServers": { "ssh": { "command": "npx", "args": [ "-y", "@thesashadev/ssh-mcp-server", "--host", "1.2.3.4", "--username", "ubuntu", "--password", "secret", "--id", "dev", "--host", "5.6.7.8", "--username", "deploy", "--key", "~/.ssh/id_rsa", "--id", "prod" ] } } } `` </details>

<details> <summary><b>Cursor</b></summary>

Open SettingsCursor SettingsMCP+ Add New MCP Server.

Or add to ~/.cursor/mcp.json:

Single server: ``json { "mcpServers": { "ssh": { "command": "npx", "args": [ "-y", "@thesashadev/ssh-mcp-server", "--host", "1.2.3.4", "--username", "ubuntu", "--password", "secret" ] } } } ``

Two servers: ``json { "mcpServers": { "ssh": { "command": "npx", "args": [ "-y", "@thesashadev/ssh-mcp-server", "--host", "1.2.3.4", "--username", "ubuntu", "--password", "secret", "--id", "dev", "--host", "5.6.7.8", "--username", "deploy", "--key", "~/.ssh/id_rsa", "--id", "prod" ] } } } `` </details>

<details> <summary><b>Windsurf</b></summary>

Edit ~/.codeium/windsurf/mcp_config.json (macOS/Linux) or %USERPROFILE%\.codeium\windsurf\mcp_config.json (Windows):

Single server: ``json { "mcpServers": { "ssh": { "command": "npx", "args": [ "-y", "@thesashadev/ssh-mcp-server", "--host", "1.2.3.4", "--username", "ubuntu", "--password", "secret" ] } } } ``

Two servers: ``json { "mcpServers": { "ssh": { "command": "npx", "args": [ "-y", "@thesashadev/ssh-mcp-server", "--host", "1.2.3.4", "--username", "ubuntu", "--password", "secret", "--id", "dev", "--host", "5.6.7.8", "--username", "deploy", "--key", "~/.ssh/id_rsa", "--id", "prod" ] } } } `` </details>

<details> <summary><b>Antigravity</b></summary>

Add to mcp_config.json:

Single server: ``json { "mcpServers": { "ssh": { "command": "npx", "args": [ "-y", "@thesashadev/ssh-mcp-server", "--host", "1.2.3.4", "--username", "ubuntu", "--password", "secret" ] } } } ``

Two servers: ``json { "mcpServers": { "ssh": { "command": "npx", "args": [ "-y", "@thesashadev/ssh-mcp-server", "--host", "1.2.3.4", "--username", "ubuntu", "--password", "secret", "--id", "dev", "--host", "5.6.7.8", "--username", "deploy", "--key", "~/.ssh/id_rsa", "--id", "prod" ] } } } `` </details>

<details> <summary><b>Codex</b></summary>

Add to codex.toml:

Single server: ``toml [mcp_servers."ssh"] command = "npx" args = [ "-y", "@thesashadev/ssh-mcp-server", "--host", "1.2.3.4", "--username", "ubuntu", "--password", "secret" ] enabled = true ``

Two servers: ``toml [mcp_servers."ssh"] command = "npx" args = [ "-y", "@thesashadev/ssh-mcp-server", "--host", "1.2.3.4", "--username", "ubuntu", "--password", "secret", "--id", "dev", "--host", "5.6.7.8", "--username", "deploy", "--key", "~/.ssh/id_rsa", "--id", "prod" ] enabled = true `` </details>

<details> <summary><b>Cody (Sourcegraph)</b></summary>

Edit ~/.config/cody/mcp_servers.json:

Single server: ``json { "mcpServers": { "ssh": { "command": "npx", "args": [ "-y", "@thesashadev/ssh-mcp-server", "--host", "1.2.3.4", "--username", "ubuntu", "--password", "secret" ] } } } ``

Two servers: ``json { "mcpServers": { "ssh": { "command": "npx", "args": [ "-y", "@thesashadev/ssh-mcp-server", "--host", "1.2.3.4", "--username", "ubuntu", "--password", "secret", "--id", "dev", "--host", "5.6.7.8", "--username", "deploy", "--key", "~/.ssh/id_rsa", "--id", "prod" ] } } } `` </details>

<details> <summary><b>Continue.dev</b></summary>

Add to .continue/config.json:

Single server: ``json { "mcpServers": [ { "name": "ssh", "command": "npx", "args": [ "-y", "@thesashadev/ssh-mcp-server", "--host", "1.2.3.4", "--username", "ubuntu", "--password", "secret" ] } ] } ``

Two servers: ``json { "mcpServers": [ { "name": "ssh", "command": "npx", "args": [ "-y", "@thesashadev/ssh-mcp-server", "--host", "1.2.3.4", "--username", "ubuntu", "--password", "secret", "--id", "dev", "--host", "5.6.7.8", "--username", "deploy", "--key", "~/.ssh/id_rsa", "--id", "prod" ] } ] } `` </details>

Configuration

Three ways to configure servers (in priority order):

1. CLI Arguments (Zero-Config)

Pass directly in your MCP config args: `` --host 1.2.3.4 --username ubuntu --password secret --host 1.2.3.4 --username deploy --key ~/.ssh/id_rsa ``

| Arg | Description | |-----|-------------| | --host | SSH host (starts a new server block) | | --port | SSH port (default: 22) | | --username | SSH user | | --password | Password auth | | --key | Path to private key | | --passphrase | Key passphrase | | --id | Server ID (default: "default") | | --name | Display name | | --remote-dir | Default remote directory | | --workspace | Local directory binding |

Multiple servers: repeat --host blocks: `` --host 1.2.3.4 --username dev --password pass1 --id dev --host 5.6.7.8 --username prod --key ~/.ssh/id_rsa --id prod ``

2. Environment Variables

For single-server setups via env: `` SSH_HOST=1.2.3.4 SSH_USER=ubuntu SSH_PASSWORD=secret ``

| Env Var | Description | |---------|-------------| | SSH_HOST | SSH host | | SSH_PORT | SSH port | | SSH_USER | Username | | SSH_PASSWORD | Password | | SSH_KEY | Private key path | | SSH_PASSPHRASE | Key passphrase | | SSH_REMOTE_DIR | Default remote dir | | SSH_WORKSPACE | Local workspace |

3. Config File (ssh-servers.json)

For complex multi-server setups. Looked up in: current directory → package directory.

{
  "servers": [
    {
      "id": "dev",
      "host": "1.2.3.4",
      "username": "ubuntu",
      "password": "secret",
      "workspaces": ["D:\\projects\\my-app"]
    },
    {
      "id": "prod",
      "host": "5.6.7.8",
      "username": "deploy",
      "privateKeyPath": "~/.ssh/id_rsa",
      "workspaces": ["D:\\projects\\production"]
    }
  ]
}

License

AGPL-3.0

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Files & Docs servers.