sshmcp
Provides persistent shell sessions over SSH backed by tmux, enabling stateful command execution across calls with preserved working directory and environment.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
sshmcp
A stateful SSH MCP server for Claude Code. Gives Claude persistent shell sessions over SSH — commands preserve working directory, environment variables, and state across calls.
Features
Stateful sessions: tmux-backed shells that persist cwd, env, shell state
Multiple sessions: connect to multiple hosts simultaneously, switch between them
File operations: upload, download, and write files via SFTP
Output management: automatic truncation with head/tail preservation
Background processes: supports
&for long-running commands
Related MCP server: mcp-ssh-tool
Install
pip install -e .Claude Code config
Add to ~/.claude/claude_desktop_config.json or your MCP settings:
{
"mcpServers": {
"ssh": {
"command": "sshmcp",
"args": []
}
}
}Tools
Tool | Description |
| Connect to a host via SSH (password, key, or agent) |
| Run a command in the persistent shell |
| Read recent terminal output |
| Upload a local file via SFTP |
| Download a remote file via SFTP |
| Write content to a remote file |
| List all active sessions |
| Switch active session |
| Close a session |
Usage
Once configured, Claude can:
ssh_connect(host="myserver.com", username="user", key_path="~/.ssh/id_ed25519")
ssh_exec(command="cd /opt/app && cat config.yaml")
ssh_exec(command="grep -r 'ERROR' /var/log/app/") # still in /opt/app context
ssh_upload(local_path="./exploit.py", remote_path="/tmp/exploit.py")Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Connect ChatGPT and Claude to your Mac, Windows or Linux with secure MCP remote access.
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
Work on your own computers from Claude or ChatGPT: run commands, edit and search files.
Hosted SQL Server MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Related MCP Servers
- AlicenseAqualityDmaintenanceAn SSH MCP server that enables users to connect to and manage remote servers directly from Claude Code. It provides tools to execute commands, monitor connection status, and dynamically manage server configurations through natural language.106MIT
- AlicenseAqualityAmaintenanceSSH automation MCP server that enables Claude and ChatGPT to execute commands, manage files, install packages, and control services on remote servers over SSH — supporting password, key, and agent authentication.331,267 npm4MIT
- AlicenseNot gradedqualityDmaintenanceA local MCP server that proxies file and shell tools (Read, Write, Edit, Bash, etc.) to a remote Linux host over SSH, enabling MCP clients like Claude Code to operate on remote codebases.2MIT
- AlicenseNot gradedqualityBmaintenanceAn MCP server enabling Claude to execute commands on multiple remote servers via SSH and transfer large files (40GB+) with resume support via SFTP.10 npm17MIT