ssh-mcp-server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ssh-mcp-serverrun 'df -h' on production"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ssh-mcp-server
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.
Related MCP server: sshops
Русский
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 |
| List configured servers and their workspace bindings |
| Run a shell command (sync or async with polling) |
| Upload a local file to remote server |
| 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:
{
"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:
{
"servers": [
{
"id": "dev",
"name": "Dev Server",
"host": "1.2.3.4",
"username": "ubuntu",
"password": "your-password",
"workspaces": ["D:\\projects\\my-app"]
}
]
}Then run:
npx -y @thesashadev/ssh-mcp-server🔌 Client Integration
Single server:
claude mcp add ssh -- npx -y @thesashadev/ssh-mcp-server --host 1.2.3.4 --username ubuntu --password secretTwo servers:
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 prodOr with config file:
claude mcp add ssh -- npx -y @thesashadev/ssh-mcp-server(Place ssh-servers.json in your project root)
Edit claude_desktop_config.json:
Windows:
%APPDATA%\Claude\claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.json
Single server:
{
"mcpServers": {
"ssh": {
"command": "npx",
"args": [
"-y", "@thesashadev/ssh-mcp-server",
"--host", "1.2.3.4",
"--username", "ubuntu",
"--password", "secret"
]
}
}
}Two servers:
{
"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"
]
}
}
}Open Settings → Cursor Settings → MCP → + Add New MCP Server.
Or add to ~/.cursor/mcp.json:
Single server:
{
"mcpServers": {
"ssh": {
"command": "npx",
"args": [
"-y", "@thesashadev/ssh-mcp-server",
"--host", "1.2.3.4",
"--username", "ubuntu",
"--password", "secret"
]
}
}
}Two servers:
{
"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"
]
}
}
}Edit ~/.codeium/windsurf/mcp_config.json (macOS/Linux) or %USERPROFILE%\.codeium\windsurf\mcp_config.json (Windows):
Single server:
{
"mcpServers": {
"ssh": {
"command": "npx",
"args": [
"-y", "@thesashadev/ssh-mcp-server",
"--host", "1.2.3.4",
"--username", "ubuntu",
"--password", "secret"
]
}
}
}Two servers:
{
"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"
]
}
}
}Add to mcp_config.json:
Single server:
{
"mcpServers": {
"ssh": {
"command": "npx",
"args": [
"-y", "@thesashadev/ssh-mcp-server",
"--host", "1.2.3.4",
"--username", "ubuntu",
"--password", "secret"
]
}
}
}Two servers:
{
"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"
]
}
}
}Add to codex.toml:
Single server:
[mcp_servers."ssh"]
command = "npx"
args = [
"-y", "@thesashadev/ssh-mcp-server",
"--host", "1.2.3.4",
"--username", "ubuntu",
"--password", "secret"
]
enabled = trueTwo servers:
[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 = trueEdit ~/.config/cody/mcp_servers.json:
Single server:
{
"mcpServers": {
"ssh": {
"command": "npx",
"args": [
"-y", "@thesashadev/ssh-mcp-server",
"--host", "1.2.3.4",
"--username", "ubuntu",
"--password", "secret"
]
}
}
}Two servers:
{
"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"
]
}
}
}Add to .continue/config.json:
Single server:
{
"mcpServers": [
{
"name": "ssh",
"command": "npx",
"args": [
"-y", "@thesashadev/ssh-mcp-server",
"--host", "1.2.3.4",
"--username", "ubuntu",
"--password", "secret"
]
}
]
}Two servers:
{
"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"
]
}
]
}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_rsaArg | Description |
| SSH host (starts a new server block) |
| SSH port (default: 22) |
| SSH user |
| Password auth |
| Path to private key |
| Key passphrase |
| Server ID (default: "default") |
| Display name |
| Default remote directory |
| 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 prod2. Environment Variables
For single-server setups via env:
SSH_HOST=1.2.3.4 SSH_USER=ubuntu SSH_PASSWORD=secretEnv Var | Description |
| SSH host |
| SSH port |
| Username |
| Password |
| Private key path |
| Key passphrase |
| Default remote dir |
| 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
This server cannot be deployed
Maintenance
Related MCP Connectors
Scoped, audited SSH exec, sessions, and SFTP on your saved servers without exposing credentials
- emisarOAuthdev.emisar
Let AI operate servers without SSH. Choose actions, approve risky changes, and audit every step.
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
Remote shell and detached long-running jobs on your own machines — no SSH, open ports or VPN.
Related MCP Servers
- AlicenseAqualityBmaintenanceEnables AI assistants to manage remote servers via SSH with agentless command execution, file operations, and service management.9MIT
- AlicenseNot gradedqualityCmaintenanceA lightweight, zero-agent SSH operations tool that enables remote command execution, file transfer, and audit logging. It integrates as an MCP server for AI-driven infrastructure management.10 npmMIT
- AlicenseAqualityAmaintenanceEnables AI agents to establish and manage persistent SSH sessions, supporting smart command execution, async tasks, multi-host, sudo, and file operations through SFTP.15MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to manage remote servers via SSH, including command execution, multi-host batch operations, SFTP file transfer, background job handling, DevOps diagnostics, port tunneling, and safety guardrails like high-risk command blocking and read-only mode.MIT