mcp-ssh
Click on "Install 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., "@mcp-sshexecute 'ls -la /home' 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.
✨ Features
🔐 SSH via env — register multiple servers with password or key auth in a single env var
📋 Config integration — use or auto-import
~/.ssh/confighosts ($config)💻 Remote exec — run commands with optional timeout, PTY, and sudo password support
📁 File transfer — upload/download via SFTP
📝 File editing — read, write, search/replace, line operations with automatic backup
🗑️ Trash protection — deleted files go to
~/.mcp-ssh/trash/(configurable threshold)🐞 Debug mode —
SSH_DEBUG=truefor connection/exec/SFTP diagnostics
Installation
npm install -g @caikiji/mcp-sshConfiguration
SSH_SERVICES
Register servers via environment variable. Separate multiple entries with ;.
SSH_SERVICES="web:root@192.168.1.100:22|/path/to/id_rsa;db:deploy@db.internal|db_password"Format: [name:]user@host[:port]|credential
Part | Description |
| Optional display name (defaults to host). Duplicates get a numeric suffix. |
| Optional, defaults to |
| File path → SSH key, otherwise treated as password. |
Using ~/.ssh/config
Reference any Host from ~/.ssh/config by name (no @ needed):
SSH_SERVICES="production|password;db:db-server|"Empty credential (
|at end) → usesIdentityFilefrom config[name:]config_host→ custom display name
Auto-import all config hosts ($config)
Import every config host that has both User and IdentityFile:
SSH_SERVICES="$config"
# Mixed with regular entries:
SSH_SERVICES="$config;extra:root@other.host|password"Config changes take effect on the next tool call — no MCP restart required.
Environment variables
Variable | Default | Description |
|
| Connection timeout (ms) |
|
| Files larger than this (MB) skip backup/trash |
| — | Set to |
MCP Client config
{
"mcpServers": {
"ssh": {
"command": "npx",
"args": ["-y", "@caikiji/mcp-ssh"],
"env": {
"SSH_SERVICES": "$config;web:root@192.168.1.100|/path/to/key"
}
}
}
}Tools
Server Management
Tool | Arguments | Description |
| — | List all configured servers with address and auth type |
Command Execution
Tool | Arguments | Description |
|
| Run any shell command. |
File Transfer
Tool | Arguments | Description |
|
| Upload a local file via SFTP |
|
| Download a remote file via SFTP |
File Operations
Tool | Arguments | Description |
|
| Read file. |
|
| Create/overwrite ( |
|
| Edit existing file: search/replace (all or first), or line operations (replace, insert before/after, delete range). Backup before modification. |
|
| Remove file/dir with trash protection (≤10MB → trash) |
|
| List dir entries or get single file details (name, type, size, mtime, permissions) |
Backup & Trash
~/.mcp-ssh/
├── backups/<server>/<path>.bak.1-3 ← auto-rotated before overwrite
└── trash/<server>/<path>.<timestamp> ← small files (≤10MB) on deleteCheck real usage via exec:
exec server, "du -sh ~/.mcp-ssh"This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/caikiji/mcp-ssh'
If you have feedback or need assistance with the MCP directory API, please join our Discord server