sshmcp
Provides persistent shell sessions over SSH backed by tmux, enabling stateful command execution across calls with preserved working directory and environment.
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., "@sshmcpconnect to myserver.com and run 'df -h'"
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.
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")This server cannot be installed
Maintenance
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
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/icryo/sshmcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server