Skip to content
MCP server

SSH MCP Server

Fix and use SSH from an agent: manage keys, diagnose failures, run remote commands

Runs locallyStatus and history
Pricing
Open source
Platforms
CLI, Linux, macOS
Runs
Locally
Version
0.18.6
Listing updated
2 days ago

About SSH MCP Server

SSH MCP Server is an open-source MCP server for developer tools. It runs locally on your machine and is started by your AI client.

AI coding tools often run in subprocesses where SSH quietly breaks: a stale agent socket, a key that exists but is not loaded, or a host key that changed after an instance was recreated. This server gives the agent tools to see why instead of guessing. Its worked examples include a failing git pull traced through ssh_git_check, ssh_key_list and ssh_key_load.

Environment tools start the agent, list keys with fingerprints, resolve the effective config for a host, and fix known_hosts (the one tool that writes it). Remote tools run a command, run one across many hosts in parallel, and tail the last lines of a log with an optional grep. The README also lists file transfer and key management.

It reuses your existing SSH setup, so no API key is needed. Package: @yawlabs/ssh-mcp from Yaw Labs, MIT licensed.

Install

Run in a terminal

claude mcp add ssh-mcp -- npx -y @yawlabs/ssh-mcp

Add to claude_desktop_config.json

{
  "mcpServers": {
    "ssh-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@yawlabs/ssh-mcp"
      ]
    }
  }
}
Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "ssh-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@yawlabs/ssh-mcp"
      ]
    }
  }
}
Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to .vscode/mcp.json

{
  "servers": {
    "ssh-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@yawlabs/ssh-mcp"
      ]
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "ssh-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@yawlabs/ssh-mcp"
      ]
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "ssh-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@yawlabs/ssh-mcp"
      ]
    }
  }
}

Tools this server provides (11)

Taken from the project documentation; the running server may differ.

ssh_agent_ensure
Ensures ssh-agent is running.
ssh_key_list
Lists keys in ~/.ssh with type, fingerprint and agent status.
ssh_key_load
Loads a key into the agent.
ssh_config_lookup
Resolves effective SSH config for a host.
ssh_known_hosts_fix
Removes a stale host key and re-scans.
ssh_git_check
Tests Git-over-SSH auth.
ssh_test
Quick connectivity test.
ssh_diagnose
Full SSH environment diagnostic.
ssh_exec
Runs a remote command.
ssh_multi_exec
Runs one command on many hosts in parallel.
ssh_tail
Reads the last lines of a remote file with optional grep.

What it does

Failure diagnosis
Full SSH environment check with actionable fix commands.
Agent and key handling
Starts ssh-agent, lists and loads keys.
Git-over-SSH test
Checks auth to GitHub, GitLab and Bitbucket.
Parallel remote commands
Runs one command on many hosts at once.
Log tailing
Reads the last N lines with optional grep.
Host key repair
Removes a stale entry and re-scans.

Good for

  • Work out why git pull fails with a publickey error
  • Recover from a changed host key
  • Check disk space across web servers
  • Tail a remote log without improvising a pipeline

Pricing

Open source

MIT, free on npm

Prices change. Check yaw.sh before you buy.

SSH MCP Server FAQ

Does it need an API key?

No, it uses your existing SSH configuration.

Which tool edits known_hosts?

Only ssh_known_hosts_fix.

How do I pin a version?

Install globally with npm and set the command to ssh-mcp.

What about Windows?

Wrap the npx call in cmd /c, because Node 20+ cannot spawn .cmd files directly.

Is SSH MCP Server free?

Yes. SSH MCP Server is open source, so you can use and self-host it for free.

How do I add SSH MCP Server to Claude Code?

Run this command in your terminal: claude mcp add ssh-mcp -- npx -y @yawlabs/ssh-mcp

What are the best alternatives to SSH MCP Server?

The closest alternatives to SSH MCP Server are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.

Alternatives to SSH MCP Server

  1. REA

    MCP server

    CLI and MCP server that lets coding agents reverse engineer apps and binaries

    Runs locally
    • Open source
    • 464K GitHub stars
    • Developer tools
  2. Codebase Memory

    MCP server

    Local MCP server that builds a code knowledge graph for AI coding agents

    Runs locally
    • Open source
    • 48.7K GitHub stars
    • Knowledge and memory
  3. GitHub

    MCP server

    Official MCP server connecting AI assistants to GitHub repos, issues and workflows

    Not checked yet
    • Remote
    • Open source
    • 34.5K GitHub stars
    • Developer tools
  4. MCP toolkit giving coding agents symbol-level code retrieval and editing

    Runs locally
    • Open source
    • 31.5K GitHub stars
    • Developer tools
  5. XERJ

    MCP server

    Local search engine for AI agents with cited answers over your code and docs

    Runs locally
    • Open source
    • 19.2K GitHub stars
    • Knowledge and memory
  6. Ouroboros

    MCP server

    Spec-first layer that pins requirements and verifies results of AI coding agent work

    Runs locally
    • Open source
    • 6.4K GitHub stars
    • Developer tools