mcpHydroSSH
Enables executing Git commands on remote servers to automate workflows such as code updates and deployment tasks.
Allows for the management of Node.js projects on remote systems by running npm commands like install and ci during deployment processes.
Supports remote server management and command execution on Ubuntu-based systems through persistent SSH connections.
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., "@mcpHydroSSHconnect to the production server and show me the current disk usage"
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.
mcp-hydrocoder-ssh
中文 | English | Configuration Guide | 配置指南
MCP server that provides SSH remote connection capabilities for Claude Code. Connect to remote servers, execute commands, and automate deployments without needing a separate SSH terminal.
Part 1: Features
What is this?
mcp-hydrocoder-ssh is an MCP (Model Context Protocol) server that enables Claude Code to:
🔌 Connect to remote SSH servers directly (persistent background connections)
⚡ Execute commands and get complete output
🔄 Maintain connection state for multi-step operations
🚀 Run deployment scripts (git pull, npm install, systemctl restart, etc.)
Key Benefits
Benefit | Description |
No window switching | Complete all remote operations within Claude Code conversation |
Smart deployment | Claude can auto-determine next steps based on command output |
Multi-server management | Manage multiple server configs, switch quickly |
Secure authentication | Support SSH agent, key files |
Connection pooling | Maintain persistent connections, avoid re-authentication overhead |
Available Tools
SSH Connection Tools (5):
ssh_list_servers- List all configured serversssh_connect- Connect to a serverssh_exec- Execute commands (with working directory support)ssh_get_status- Get connection statusssh_disconnect- Disconnect from server
Configuration Management Tools (5):
ssh_add_server- Add new server configurationssh_remove_server- Remove server configurationssh_update_server- Update server configurationssh_view_config- View config (filters sensitive info)ssh_help- Show help information
Part 2: Installation
Option 1: Global Install + User-Level Config (Recommended)
npm install -g mcp-hydrocoder-ssh
claude mcp add -s user hydrossh mcp-hydrocoder-sshOption 2: Global Install + Project-Level Config
npm install -g mcp-hydrocoder-ssh
claude mcp add hydrossh mcp-hydrocoder-sshOption 3: npx Install + User-Level Config
claude mcp add -s user hydrossh npx mcp-hydrocoder-ssh@latestOption 4: npx Install + Project-Level Config
claude mcp add hydrossh npx mcp-hydrocoder-ssh@latestNotes:
-s userflag sets user-level MCP configuration, available to all projectsWithout
-s user, configuration is project-level, only available to current projectUsing
npxdoes not require pre-installing the npm package
Verify Installation
In Claude Code, enter:
List available SSH serversIf you see a server list (empty list means no servers configured yet), the installation was successful.
Part 3: Using from Source Code
1. Clone Repository
git clone https://github.com/hydroCoderClaud/mcpHydroSSH.git
cd mcpHydroSSH2. Install Dependencies
npm install3. Build
npm run buildBuild output goes to dist/ directory:
dist/index.js- MCP server entry pointdist/ssh-manager.js- SSH connection managementdist/config.js- Configuration management
4. Configure Claude Code
Edit ~/.claude.json:
{
"mcpServers": {
"hydrossh": {
"command": "node",
"args": ["<absolute-path>/dist/index.js"]
}
}
}Note: Replace
<absolute-path>with your actual source directory absolute path.
5. Restart Claude Code
Close and reopen Claude Code.
6. Development Mode (Optional)
For hot-reload development:
npm run devThen configure Claude Code with:
{
"mcpServers": {
"hydrossh": {
"command": "npx",
"args": ["tsx", "<absolute-path>/src/index.ts"]
}
}
}Appendix A: SSH Configuration
Configuration file location: ~/.hydrossh/config.json
Auto-created on first run: The ~/.hydrossh/ directory and config file are automatically created when the MCP server first starts.
Quick Add via Claude Code
After installation, you can add server configs using natural language commands.
Configuration Example
{
"servers": [
{
"id": "prod-server",
"name": "Production Server",
"host": "example.com",
"port": 22,
"username": "deploy",
"authMethod": "agent"
},
{
"id": "test-server",
"name": "Test Server",
"host": "test.example.com",
"username": "ubuntu",
"authMethod": "key",
"privateKeyPath": "~/.ssh/id_rsa"
}
],
"settings": {
"defaultConnectTimeout": 30000,
"defaultKeepaliveInterval": 60000,
"commandTimeout": 60000,
"maxConnections": 5,
"logCommands": true
}
}Authentication Methods
Method | Configuration | Description |
SSH Agent |
| Recommended, uses system SSH agent |
Key File |
| Default, reads private key file |
Password |
| Not recommended, password stored in plaintext |
See CONFIG-GUIDE_EN.md for details.
Appendix B: Usage Examples
Basic Usage
User: List available servers
Claude: Found 2 configured servers: prod-server, test-server
User: Connect to prod-server
Claude: [ssh_connect] Connected! connectionId: xxx
User: Execute command: uptime
Claude: [ssh_exec] Returns: up 30 days, 2 users, load average: 0.1, 0.2, 0.5
User: Disconnect
Claude: [ssh_disconnect] DisconnectedAutomated Deployment
User: Deploy latest code to production server
Claude: Okay, I'll execute the deployment flow...
1. Connect to prod-server
2. cd /opt/myapp && git pull
3. npm ci --production
4. sudo systemctl restart myapp
5. Check service status
6. Disconnect
Deployment complete!Appendix C: Security Notes
🔒 SSH Agent Recommended - Prefer
authMethod: "agent"🔒 Config File Permissions - Ensure
~/.hydrossh/config.jsonis readable only by you🔒 Config Viewing -
ssh_view_configtool automatically filters passwords and key paths
Appendix D: Troubleshooting
Issue | Solution |
SSH Agent not running | Windows: Start "OpenSSH Authentication Agent" service |
Connection timeout | Check server address, port, network connectivity |
Command not found | Verify npm global install or check PATH environment variable |
Config not loaded | Check if |
Config file not found | Auto-created on first run, or manually create |
Appendix E: Command Reference
Development Commands
npm run build # Build TypeScript
npm run dev # Development mode (hot reload)
npm test # Run tests
npm run lint # Code linting
npm run format # Code formattingMCP Tool Parameters
Tool | Parameters | Description |
| none | List all configured servers |
|
| Connect to server |
|
| Execute command |
|
| Get connection status (all if not specified) |
|
| Disconnect (most recent if not specified) |
|
| Add server config |
|
| Remove server config |
|
| Update server config |
| none | View config (filters sensitive info) |
|
| Show help information |
License
MIT
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/hydroCoderClaud/mcpHydroSSH'
If you have feedback or need assistance with the MCP directory API, please join our Discord server