ssh-mcp

MCP.Pizza Chef: tufantunc

ssh-mcp is an MCP server that exposes SSH control for Linux and Windows servers, allowing LLMs and MCP clients to execute shell commands securely via the Model Context Protocol. It facilitates remote command execution through natural language interfaces, supporting secure and compliant interactions with server environments.

Use This MCP server To

Execute remote shell commands on Linux servers via natural language Run administrative tasks on Windows servers through MCP clients Integrate SSH command execution into AI workflows securely Enable LLMs to manage server environments via SSH Automate server maintenance tasks using natural language commands Provide secure remote shell access for AI-powered tools

README

SSH MCP Server

License NPM Version

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.

Contents

Quick Start

  • Install SSH MCP Server
  • Configure SSH MCP Server
  • Set up your MCP Client (e.g. Claude Desktop, Cursor, etc)
  • Execute remote shell commands on your Linux or Windows server via natural language

Features

  • MCP-compliant server exposing SSH capabilities
  • Execute shell commands on remote Linux and Windows systems
  • Secure authentication via password or SSH key
  • Built with TypeScript and the official MCP SDK

Tools

  • exec: Execute a shell command on the remote server

Installation

  1. Clone the repository:
    git clone https://github.com/tufantunc/ssh-mcp.git
    cd ssh-mcp
  2. Install dependencies:
    npm install

Client Setup

You can configure Claude Desktop to use this MCP Server.

  • host: Hostname or IP of the Linux or Windows server
  • port: SSH port (default: 22)
  • user: SSH username
  • password: SSH password (or use key for key-based auth) (optional)
  • key: Path to private SSH key (optional)
{
    "mcpServers": {
        "ssh-mcp": {
            "command": "npx",
            "args": [
                "ssh-mcp",
                "-y",
                "--",
                "--host=1.2.3.4",
                "--port=22",
                "--user=root",
                "--password=pass",
                "--key=path/to/key"
            ]
        }
    }
}

Testing

You can use the MCP Inspector for visual debugging of this MCP Server.

npm run inspect

Disclaimer

SSH MCP Server is provided under the MIT License. Use at your own risk. This project is not affiliated with or endorsed by any SSH or MCP provider.

Support

If you find SSH MCP Server helpful, consider starring the repository or contributing! Pull requests and feedback are welcome.

ssh-mcp FAQ

How do I install ssh-mcp?
Install ssh-mcp via npm using 'npm install ssh-mcp' and follow the configuration guide.
Can ssh-mcp execute commands on both Linux and Windows?
Yes, ssh-mcp supports executing shell commands on both Linux and Windows systems securely.
How does ssh-mcp ensure secure SSH connections?
ssh-mcp uses standard SSH protocols with secure authentication methods to protect command execution.
Which MCP clients are compatible with ssh-mcp?
ssh-mcp works with MCP clients like Claude Desktop, Cursor, and others supporting the Model Context Protocol.
Can I use ssh-mcp to automate server management tasks?
Yes, ssh-mcp enables automation of server tasks by allowing LLMs to execute commands via natural language.
Is ssh-mcp limited to local networks?
No, ssh-mcp can connect to any reachable SSH server, provided network access and credentials are configured.
How do I configure ssh-mcp for my servers?
Configuration involves setting SSH credentials and server details in ssh-mcp's config files as per the documentation.
Does ssh-mcp support multiple simultaneous SSH sessions?
Yes, ssh-mcp can handle multiple SSH connections concurrently through MCP clients.