SSH MCP Server logo

SSH MCP Server

Community
tufantunc

MCP server exposing SSH control for Linux servers via Model Context Protocol.

Publishertufantunc
Repositoryssh-mcp
LanguageTypeScript
Forks
71
Stars
466
Available tools
0
Transport typestdio
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    SSH MCP Server exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    466 stars and 71 forks from the linked repository.

SSH MCP Server

NPM Version Downloads Node Version License GitHub Stars GitHub Forks Build Status GitHub issues

Trust Score

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
  • Configurable timeout protection with automatic process abortion
  • Graceful timeout handling - attempts to kill hanging processes before closing connections

Tools

  • exec: Execute a shell command on the remote server

    • Parameters:
      • command (required): Shell command to execute on the remote SSH server
      • description (optional): Optional description of what this command will do (appended as a comment)
    • Timeout Configuration:
  • sudo-exec: Execute a shell command with sudo elevation

    • Parameters:
      • command (required): Shell command to execute as root using sudo
      • description (optional): Optional description of what this command will do (appended as a comment)
    • Notes:
      • Requires --sudoPassword to be set for password-protected sudo
      • Can be disabled by passing the --disableSudo flag at startup if sudo access is not needed or not available
      • For persistent root access, consider using --suPassword instead which establishes a root shell
      • Tool will not be available at all if server is started with --disableSudo
    • Timeout Configuration:
      • Timeout is configured via command line argument --timeout (in milliseconds)
      • Default timeout: 60000ms (1 minute)
      • When a command times out, the server automatically attempts to abort the running process before closing the connection
    • Max Command Length Configuration:
      • Max command characters are configured via --maxChars
      • Default: 1000
      • No-limit mode: set --maxChars=none or any <= 0 value (e.g. --maxChars=0)

Installation

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

Client Setup

You can configure your IDE or LLM like Cursor, Windsurf, Claude Desktop to use this MCP Server.

Required Parameters:

  • host: Hostname or IP of the Linux or Windows server
  • user: SSH username

Optional Parameters:

  • port: SSH port (default: 22)
  • password: SSH password (or use key for key-based auth)
  • key: Path to private SSH key
  • sudoPassword: Password for sudo elevation (when executing commands with sudo)
  • suPassword: Password for su elevation (when you need a persistent root shell)
  • timeout: Command execution timeout in milliseconds (default: 60000ms = 1 minute)
  • maxChars: Maximum allowed characters for the command input (default: 1000). Use none or 0 to disable the limit.
  • disableSudo: Flag to disable the sudo-exec tool completely. Useful when sudo access is not needed or not available.
commandline
{
    "mcpServers": {
        "ssh-mcp": {
            "command": "npx",
            "args": [
                "ssh-mcp",
                "-y",
                "--",
                "--host=1.2.3.4",
                "--port=22",
                "--user=root",
                "--password=pass",
                "--key=path/to/key",
                "--timeout=30000",
                "--maxChars=none"
            ]
        }
    }
}

Claude Code

You can add this MCP server to Claude Code using the claude mcp add command. This is the recommended method for Claude Code.

Basic Installation:

bash
claude mcp add --transport stdio ssh-mcp -- npx -y ssh-mcp -- --host=YOUR_HOST --user=YOUR_USER --password=YOUR_PASSWORD

Installation Examples:

With Password Authentication:

bash
claude mcp add --transport stdio ssh-mcp -- npx -y ssh-mcp -- --host=192.168.1.100 --port=22 --user=admin --password=your_password

With SSH Key Authentication:

bash
claude mcp add --transport stdio ssh-mcp -- npx -y ssh-mcp -- --host=example.com --user=root --key=/path/to/private/key

With Custom Timeout and No Character Limit:

bash
claude mcp add --transport stdio ssh-mcp -- npx -y ssh-mcp -- --host=192.168.1.100 --user=admin --password=your_password --timeout=120000 --maxChars=none

With Sudo and Su Support:

bash
claude mcp add --transport stdio ssh-mcp -- npx -y ssh-mcp -- --host=192.168.1.100 --user=admin --password=your_password --sudoPassword=sudo_pass --suPassword=root_pass

Installation Scopes:

You can specify the scope when adding the server:

  • Local scope (default): For personal use in the current project

    bash
    claude mcp add --transport stdio ssh-mcp --scope local -- npx -y ssh-mcp -- --host=YOUR_HOST --user=YOUR_USER --password=YOUR_PASSWORD
  • Project scope: Share with your team via .mcp.json file

    bash
    claude mcp add --transport stdio ssh-mcp --scope project -- npx -y ssh-mcp -- --host=YOUR_HOST --user=YOUR_USER --password=YOUR_PASSWORD
  • User scope: Available across all your projects

    bash
    claude mcp add --transport stdio ssh-mcp --scope user -- npx -y ssh-mcp -- --host=YOUR_HOST --user=YOUR_USER --password=YOUR_PASSWORD

Verify Installation:

After adding the server, restart Claude Code and ask Cascade to execute a command:

"Can you run 'ls -la' on the remote server?"

For more information about MCP in Claude Code, see the official documentation.

Testing

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

sh
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.

Contributing

We welcome contributions! Please see our Contributing Guidelines for more information.

Code of Conduct

This project follows a Code of Conduct to ensure a welcoming environment for everyone.

Support

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

Installation

TypingMind
Prerequisites:

Node.js 18+

{
  "mcpServers": {
    "tufantunc-ssh-mcp": {
      "command": "",
      "args": []
    }
  }
}

Use SSH MCP Server MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once SSH MCP Server is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add SSH MCP Server as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the SSH MCP Server MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "tufantunc-ssh-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "ssh-mcp"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the SSH MCP Server MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the SSH MCP Server MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use SSH MCP Server to help me with this task?
SSH MCP Server
Sure. I read it.
Here is what I found using SSH MCP Server.

Frequently asked questions

What is the SSH MCP Server MCP server used for?

SSH MCP Server is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use SSH MCP Server MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use SSH MCP Server with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use SSH MCP Server MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With SSH MCP Server connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect SSH MCP Server MCP to TypingMind?

SSH MCP Server runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does SSH MCP Server MCP provide in TypingMind?

SSH MCP Server exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use SSH MCP Server MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If SSH MCP Server requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇