SSH MCP Server

by MCP-Mirror

372 downloads Not rated yet
GitHub

About

SSH MCP Server is a local Model Context Protocol (MCP) server that exposes SSH control for Linux and Windows systems, enabling LLMs and other MCP clients to execute shell commands securely via SSH. It provides tools for managing SSH connections and running commands, with support…

Explore

MCP-compliant server exposing SSH capabilities
Execute shell commands on remote Linux and Windows systems
Secure authentication via password or SSH key
Read-only mode with built-in security checks

  • Built with TypeScript and the official MCP SDK

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name SSH MCP Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Create a machines.json file with the following structure:

[
   {
    "machine_id": "todo-server-01",
    "label": "Todo server",
    "os": "ubuntu",
    "source": "digitalocean",
    "ssh": {
      "host": "192.168.1.11",
      "port": 22,
      "username": "user",
      "password": "your_password_here"
    }
  },
  {
    "machine_id": "build-agent-01",
    "label": "CI Build Agent (Key Auth)",
    "os": "ubuntu",
    "source": "aws",
    "ssh": {
      "host": "192.168.1.12",
      "port": 22,
      "username": "ubuntu",
      "keyPath": "/home/ubuntu/.ssh/id_rsa"
    }
  }

]

---

To integrate this MCP server into Claude Desktop, add both the server command and the required environment variable:

{
  "mcpServers": {
    "ssh-mcp": {
      "command": "node",
      "args": [
        "/path/to/ssh-mcp-server/dist/index.js"
      ],
      "env": {
        "MACHINES_PATH": "/path/to/your/machines.json"
      }
    }
  }
}

Now you can interact with your server using natural language, e.g., "Run uptime on Todo VM."

---

get_available_connections

Lists machines available to connect via SSH

create_connection

Opens a new SSH session and tracks it by `connection_id`

get_connections

Lists all active SSH sessions

execute_command

Runs a shell command (unrestricted)

secure_execute_command

Safer command execution; blocks destructive actions

close_connection

Closes an active SSH session

| Tool | Description |
| --------------------------- | -------------------------------------------------------- |
| get_available_connections | Lists machines available to connect via SSH |
| create_connection | Opens a new SSH session and tracks it by connection_id |
| get_connections | Lists all active SSH sessions |
| execute_command | Runs a shell command (unrestricted) |
| secure_execute_command | Safer command execution; blocks destructive actions |
| close_connection | Closes an active SSH session |

---

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "ssh mcp server": {
            "ssh-mcp": {
                "command": "node",
                "args": [
                    "/path/to/ssh-mcp-server/dist/index.js"
                ],
                "env": {
                    "MACHINES_PATH": ""
                }
            }
        }
    }
}

McpServers

{
    "ssh-mcp": {
        "command": "node",
        "args": [
            "/path/to/ssh-mcp-server/dist/index.js"
        ],
        "env": {
            "MACHINES_PATH": ""
        }
    }
}

SSH MCP Server is a local Model Context Protocol (MCP) server that exposes SSH control for Linux and Windows systems, enabling LLMs and other MCP clients to execute shell commands securely via SSH.

---

Features

MCP-compliant server exposing SSH capabilities
Execute shell commands on remote Linux and Windows systems
Secure authentication via password or SSH key
Read-only mode with built-in security checks

  • Built with TypeScript and the official MCP SDK


Available Tools

| Tool | Description |
| --------------------------- | -------------------------------------------------------- |
| get_available_connections | Lists machines available to connect via SSH |
| create_connection | Opens a new SSH session and tracks it by connection_id |
| get_connections | Lists all active SSH sessions |
| execute_command | Runs a shell command (unrestricted) |
| secure_execute_command | Safer command execution; blocks destructive actions |
| close_connection | Closes an active SSH session |

---

Quick Start

1. Clone the repository

$ git clone https://github.com/vilasone455/ssh-mcp-server.git

2. Create machine config

Create a machines.json file with the following structure:

[
   {
    "machine_id": "todo-server-01",
    "label": "Todo server",
    "os": "ubuntu",
    "source": "digitalocean",
    "ssh": {
      "host": "192.168.1.11",
      "port": 22,
      "username": "user",
      "password": "your_password_here"
    }
  },
  {
    "machine_id": "build-agent-01",
    "label": "CI Build Agent (Key Auth)",
    "os": "ubuntu",
    "source": "aws",
    "ssh": {
      "host": "192.168.1.12",
      "port": 22,
      "username": "ubuntu",
      "keyPath": "/home/ubuntu/.ssh/id_rsa"
    }
  }

]

---

Client Setup (Claude Desktop Example)

To integrate this MCP server into Claude Desktop, add both the server command and the required environment variable:

{
  "mcpServers": {
    "ssh-mcp": {
      "command": "node",
      "args": [
        "/path/to/ssh-mcp-server/dist/index.js"
      ],
      "env": {
        "MACHINES_PATH": "/path/to/your/machines.json"
      }
    }
  }
}

Now you can interact with your server using natural language, e.g., "Run uptime on Todo VM."

---

Disclaimer

Use at your own risk. This server grants shell-level access via MCP. Review commands carefully and run in a secure environment.

---

Contributing

Star the repo, open issues, and submit pull requests! Feedback is welcome.

---

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.