MCP server/cloud

mcpHydroSSH MCP Server

SSH remote connection capabilities for Claude Code

★ 2hydroCoderClaud/mcpHydroSSH ↗by hydroCoderClaudupdated
1

Add it to Claude Code

claude mcp add mcp-hydro-ssh -- npx -y mcp-hydrocoder-ssh@latest
2

Make your agent remember this setup

mcp-hydro-ssh's config, env vars, and the gotchas you hit — recalled in every future Claude Code, Cursor, and Codex session.

npx conare@latest

Free · one command · indexes the sessions already on disk. Set up in the browser instead →

What it does

  • Connect to remote SSH servers with persistent background connections
  • Execute remote commands and retrieve output directly in Claude Code
  • Maintain connection state for multi-step operations
  • Automate deployment scripts like git pull and systemctl restart
  • Manage multiple server configurations with secure authentication

Tools 10

ssh_list_serversList all configured servers
ssh_connectConnect to a server
ssh_execExecute commands (with working directory support)
ssh_get_statusGet connection status
ssh_disconnectDisconnect from server
ssh_add_serverAdd new server configuration
ssh_remove_serverRemove server configuration
ssh_update_serverUpdate server configuration
ssh_view_configView config (filters sensitive info)
ssh_helpShow help information

Try it

List all my configured SSH servers.
Connect to the production server and run 'git pull' in the web directory.
Check the connection status of my test server.
Add a new server configuration for my staging environment.
Execute 'npm install' on the production server.
Original README from hydroCoderClaud/mcpHydroSSH

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 servers
  • ssh_connect - Connect to a server
  • ssh_exec - Execute commands (with working directory support)
  • ssh_get_status - Get connection status
  • ssh_disconnect - Disconnect from server

Configuration Management Tools (5):

  • ssh_add_server - Add new server configuration
  • ssh_remove_server - Remove server configuration
  • ssh_update_server - Update server configuration
  • ssh_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-ssh

Option 2: Global Install + Project-Level Config

npm install -g mcp-hydrocoder-ssh
claude mcp add hydrossh mcp-hydrocoder-ssh

Option 3: npx Install + User-Level Config

claude mcp add -s user hydrossh npx mcp-hydrocoder-ssh@latest

Option 4: npx Install + Project-Level Config

claude mcp add hydrossh npx mcp-hydrocoder-ssh@latest

Notes:

  • -s user flag sets user-level MCP configuration, available to all projects
  • Without -s user, configuration is project-level, only available to current project
  • Using npx does not require pre-installing the npm package

Verify Installation

In Claude Code, enter:

List available SSH servers

If 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 mcpHydroSSH

2. Install Dependencies

npm install

3. Build

npm run build

Build output goes to dist/ directory:

  • dist/index.js - MCP server entry point
  • dist/ssh-manager.js - SSH connection management
  • dist/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 dev

Then 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"
    }

Frequently Asked Questions

What are the key features of mcpHydroSSH?

Connect to remote SSH servers with persistent background connections. Execute remote commands and retrieve output directly in Claude Code. Maintain connection state for multi-step operations. Automate deployment scripts like git pull and systemctl restart. Manage multiple server configurations with secure authentication.

What can I use mcpHydroSSH for?

Managing remote server deployments without leaving the Claude Code interface. Executing multi-step system administration tasks on remote Linux servers. Quickly switching between development, staging, and production server environments. Automating routine maintenance tasks using natural language commands.

How do I install mcpHydroSSH?

Install mcpHydroSSH by running: npm install -g mcp-hydrocoder-ssh

What MCP clients work with mcpHydroSSH?

mcpHydroSSH works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Conare · memory for coding agents

Turn this server into reusable context

Keep mcpHydroSSH docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Set up free$npx conare@latest