プロトタイプ · プレビュー版:公式レジストリのすべてのサーバーを掲載し、30分ごとに同期しています。レビューとアカウント機能は今後のステップで始まります。
PopNx MCPAIを使う人のためのMCPサーバー · やさしい言葉で解説

Remote Ssh MCP

作者:the-nine-nationバージョン 0.2.0i★ –iパソコンで動く
レジストリ名io.github.the-nine-nation/remote-ssh-mcp

インストール

概要

作者による説明(英語の原文)

Persistent stateful remote SSH sessions for AI agents via MCP + OpenSSH.

PopNx MCPの3つの柱

この3つを1つのスコアにまとめることはしません。意見、測定、人気はそれぞれ別のものだからです。

できること

このサーバーのやさしい解説はまだ書いていません。以下はレジストリから読み取った事実です。

  • 接続方法: パソコンで動く
  • トランスポート: stdio
  • カテゴリ: 開発者ツール

インストール

使っているAIアプリを選んで、設定をコピーしてください。

インストールの前に

  • 基本チェック:1項目中1項目に合格
  • あなたのパソコンで、あなたのユーザーと同じ権限(ファイル、ネットワーク、アプリ)で動きます。
  • 自分で入力するもの: SSH_MCP_ALLOWED_HOSTS, SSH_MCP_CONFIG

必要なもの

  • npmNode.jsのインストール(npxコマンドに必要)

どのアプリを使っていますか?

上でアプリを選んでください。選んだアプリを覚えておくので、次からはボタンに「…にインストール」と表示されます。

Claude Desktop → Settings → Developer → Edit Config を開き、claude_desktop_config.json にこれを貼り付けます

{
  "mcpServers": {
    "remote-ssh": {
      "command": "npx",
      "args": [
        "-y",
        "@zyluo/remote-ssh-mcp"
      ],
      "env": {
        "SSH_MCP_ALLOWED_HOSTS": "your-value",
        "SSH_MCP_CONFIG": "your-value"
      }
    }
  }
}

ターミナルでこれを実行します

claude mcp add remote-ssh --env SSH_MCP_ALLOWED_HOSTS=your-value --env SSH_MCP_CONFIG=your-value -- npx -y @zyluo/remote-ssh-mcp

動かす前に、空欄の値を入力してください。

Cursorで開く

または、設定を自分でコピーする

プロジェクトの .cursor/mcp.json、または ~/.cursor/mcp.json に貼り付けます

{
  "mcpServers": {
    "remote-ssh": {
      "command": "npx",
      "args": [
        "-y",
        "@zyluo/remote-ssh-mcp"
      ],
      "env": {
        "SSH_MCP_ALLOWED_HOSTS": "your-value",
        "SSH_MCP_CONFIG": "your-value"
      }
    }
  }
}

ブラウザがアプリを開いてよいか確認し、そのあとアプリが設定を表示して確認を求めます。キーの値は空欄のままなので、自分で入力してください。

VS Codeで開く

または、設定を自分でコピーする

プロジェクトの .vscode/mcp.json に貼り付けます

{
  "servers": {
    "remote-ssh": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@zyluo/remote-ssh-mcp"
      ],
      "env": {
        "SSH_MCP_ALLOWED_HOSTS": "your-value",
        "SSH_MCP_CONFIG": "your-value"
      }
    }
  }
}

ブラウザがアプリを開いてよいか確認し、そのあとアプリが設定を表示して確認を求めます。キーの値は空欄のままなので、自分で入力してください。

これはパソコンで動くサーバーですが、ChatGPTがつなげるのはインターネット上のサーバーだけです。ほかのアプリを選んでください。

選んだアプリは、この端末のCookieに保存されます。アカウントは不要です。

自分で入力する値

  • SSH_MCP_ALLOWED_HOSTS env
    Comma-separated additional SSH Host aliases to allow
  • SSH_MCP_CONFIG env
    Path to remote-ssh-mcp config.json

この設定は、作者のレジストリ登録情報から作成しています。READMEと違う場合は、READMEに従ってください。

できること

パソコンで動くサーバーです。インストールすると、ツール一覧がAIアプリに表示されます。

基本チェックi

誰でも見られる情報をチェックしており、コードは読んでいません。当てはまらない項目は数に入れていません。 · 2026年11月8日にチェック

  • ✓ 合格

    作者とリポジトリが一致

    レジストリ名は、リポジトリを所有するGitHubアカウント the-nine-nation で確認済みです

  • … 未チェック

    今もメンテナンスされている

    このリポジトリはまだGitHubから読み取っていません

  • … 未チェック

    ライセンスがある

    このリポジトリはまだGitHubから読み取っていません

  • – 対象外

    エンドポイントが応答する

    これはパソコンで動くため、インターネット上のエンドポイントはありません

  • – 対象外

    OAuthでサインイン

    パソコンで動き、代わりにローカルの設定を使います

  • … 未チェック

    ツールの説明に隠れた指示がない

    パソコンで動くサーバーです。ツール一覧を読み取れるのは、インターネット上のエンドポイントがある場合だけです

開発者ツールのほかのサーバーとの比較i

  • このカテゴリのほかの4914件のうち0%よりスターが多い
  • このカテゴリのほかの4914件のうち31%より最近レジストリに公開
  • 基本チェックの結果が、このカテゴリのほかの4914件のうち100%と同じかそれ以上

レジストリでこのカテゴリにある有効なすべてのサーバーと比較しています。スターは、公開者がリポジトリの所有者である場合だけ数えます。

よくある質問

Remote Ssh MCPは安全ですか?

当てはまる基本チェック1項目のうち1項目に合格しました。コードは読んでいません。キーやトークンを追加する前に、サーバーがどんなアクセスを求めているかを確認し、必要な権限だけを持つキーを使ってください。

どんなキーやコードが必要ですか?

レジストリには必須のキーは載っていません。ただし、最初に使うときにサインインを求めるサーバーもあります。

パソコンで動きますか、それともクラウドですか?

あなたのパソコンで動きます。必要なときにAIアプリが起動し、データは作者のサーバーを通りません(サーバー自体がオンラインサービスを呼び出す場合を除きます)。

今もメンテナンスされていますか?

GitHubリポジトリの最終更新は–、最新バージョン(0.2.0)がレジストリに届いたのは3 か月前です。

どのアプリで使えますか?

Claude Desktop、Claude Code、Cursor、VS CodeなどのMCP対応アプリで使えます。パソコンにNode.jsも必要です。

代わりに使えるものは?

同じカテゴリには:GitHub, Desktop Commander, Cloudflare MCP

代わりの候補

同じカテゴリで、ほかの作者が作ったサーバー。スターの多い順。

カードの見方:★ GitHubスターi3つの柱:レビュー · チェック · 利用状況i更新=最新バージョンをレジストリに公開した日i

GitHub

作者:github

Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.

パソコンでもクラウドでも★ 34,245MIT4 日前更新
インストール

Desktop Commander

作者:wonderwhy-er

MCP server for terminal commands, file operations, and process management

パソコンで動く★ 10,225MIT16 日前更新
インストール

作者のREADME

READMEを開く

作者のリポジトリから書かれたとおりにコピーしたものです。PopNx MCPは内容を確認・推奨していません。HTML、画像、スクリプトは取り除いています。リンクはこのサイトの外へ移動します。

Remote SSH MCP

Persistent, stateful remote Bash sessions for AI agents

via the Model Context Protocol

Why · Features · How it works · Tools · Quick start · Config · Security · 简体中文


Why Remote SSH MCP?

Most agents reach remote machines like this:

bash → ssh host "cmd" → disconnect → repeat

Every call pays the same tax:

PainWhat happens
🔁 Token wasteBanners, MOTD, login noise, and pwd / whoami probes flood the context
🧊 Lost statecwd, export, venv activation, and shell side effects vanish
🔌 UnstableFresh connects hit timeouts, host-key prompts, ProxyJump, and auth jitter
🌀 Error spiralThe model compensates with longer probe commands → more tokens

Remote SSH MCP turns a long-lived remote Bash into first-class MCP tools. One session ID keeps working directory, environment variables, and shell side effects. Open a new session when you need a clean environment.

Why pick this over one-shot ssh in bash?

Concrete gains for agent workflows (multi-step remote work: deploy, debug, build, inspect logs):

DimensionOne-shot ssh host "…"Remote SSH MCP
💰 TokensEach step re-pays connect noise + state probes; models often re-cd / re-pwdPay once on ssh_open; later ssh_run returns mostly command output. Structured tools + head/tail caps cut tool-result bloat. In multi-step sessions this commonly cuts remote-tool context by ~50–80% vs reconnect-every-time (exact savings depend on MOTD size and how chatty the model is).
✅ Success rate*N* steps ≈ *N* handshakes → *N* chances to fail (timeout, jump, agent, host key)One handshake per session; subsequent commands ride a live shell. Long jobs use running + ssh_peek instead of killing the tool call and restarting. Fewer reconnects → far fewer false “SSH failed” loops mid-task.
🧳 PortabilityRemote needs nothing extra — but every agent machine reimplements the same brittle ssh … patternsInstall once on the machine that runs Claude / Cursor / Grok / etc. Remote hosts install nothing (no Node, no MCP daemon, no agent). Only a normal shell account + tools already required for SSH (bash, base64, stty, …). Keys and jump hosts stay in local ~/.ssh/config.
🧠 Model ergonomicsModel invents ssh strings, escapes, and recoveryStable tools: open → run → peek → close. Session id is the only handle.
🔐 Trust boundaryEasy to over-expose keys or prompt for passwords in-bandOpenSSH client only; tools never accept passwords or private-key material

Portability in one line: put the MCP on your dev box / AI host; every server already in your SSH config is reachable — zero package install on the remote fleet.

┌─────────────────────────┐         SSH (OpenSSH)         ┌──────────────────┐

│ Your laptop / CI agent │ ───────────────────────────► │ prod / staging │ │ Claude · Cursor · Grok │ ~/.ssh/config · agent │ no MCP install │ │ + remote-ssh-mcp │ │ plain Bash OK │ └─────────────────────────┘ └──────────────────┘

Token sketch (illustrative multi-step remote debug):

One-shot path (per step × 8):

ssh wrapper + banner/MOTD + pwd/whoami + re-cd + command output → noise dominates; context fills with reconnect junk

Session path: ssh_open → once (handshake + READY) ssh_run × 8 → mostly the real stdout/stderr (truncated head+tail) → context stays on the work product, not the transport

It does not reimplement SSH. Your system OpenSSH client stays in charge — so ~/.ssh/config, known hosts, the SSH agent, ProxyJump routes, and hardware keys keep working exactly as they already do.

ssh_hosts()              → discover allowed Host aliases

ssh_open(host) → session id ssh_run(id, command) → same cwd + env as last time ssh_peek / ssh_interrupt → observe or recover long / stuck work ssh_close(id) → release the shell and connection


Features

🧠 Persistent remote sessions
  • One stable session ID maps to one long-lived remote Bash
  • `cwd` and environment survive across ssh_run calls
  • Open a fresh session whenever you need a clean slate
  • Multiple sessions can target the same or different hosts (up to maxSessions)
🔧 Native OpenSSH integration
  • Spawns the real `ssh` binary — no custom crypto stack
  • Honors `~/.ssh/config`, Include, agent sockets, and ProxyJump
  • Forces `BatchMode=yes` and `StrictHostKeyChecking=yes`
  • Never accepts passwords, private-key text, or arbitrary SSH option args from the model
📡 Long-running command friendly
  • ssh_run waits up to wait_sec (default 10s), then returns status: "running" while the remote command continues
  • Poll with `ssh_peek(wait_sec=...)` long-poll instead of busy-looping
  • Optional hard `timeout_sec` sends Ctrl-C; no automatic kill by default
  • Ideal for docker pull, builds, downloads, and deploys that must not block the tool call forever
🛡️ Safety & control plane
  • Exact Host-alias allowlist from ssh_config + optional config / env overrides
  • Patterns with *, ?, or ! are ignored
  • Fail-closed interrupt: if shell recovery cannot be confirmed after Ctrl-C, the session is closed
  • Built-in denylist for a few obviously destructive patterns (not a full policy engine)
  • Idle reaping, session caps, and a JSONL audit log (0600) with hashed commands
📦 Clean tool results for models
  • Separate `stdout` / `stderr` streams
  • Head-and-tail byte truncation with valid UTF-8 boundaries
  • ANSI / PTY noise stripped before the model sees output (colors, CSI, bracketed-paste markers, control-only blank lines)
  • Quiet open-frame: TERM=dumb, NO_COLOR, bracketed-paste off — less junk at the source
  • Slim JSON payloads: omit empty stderr, false truncation flags, and request-echo fields so dual content + structuredContent stays cheap
  • ssh_hosts returns only safe metadata: alias, hostname, user, port, proxy_jump
  • Never leaks IdentityFile, certificates, agent sockets, or ProxyCommand
🔌 MCP-native
  • stdio transport for Claude Desktop, Cursor, and other MCP hosts
  • Compatible with both legacy and current MCP handshakes
  • Parent / stdio exit closes every tracked SSH connection

How it works

flowchart LR

A[AI Agent] -->|MCP tools| B[Remote SSH MCP] B -->|spawn| C[OpenSSH client] C -->|SSH + PTY| D[Remote Bash] D --> E[(cwd / env / side effects)]

subgraph Local machine B C F[~/.ssh/config agent / keys] C -.-> F end

subgraph Remote host D E end

Typical agent flow

1. ssh_hosts()                 # pick an alias from the allowlist
  1. ssh_open(host="prod") # get session id "s_…"
  2. ssh_run(id, "cd app && …") # state sticks to this id
  3. ssh_run(id, "npm test") # still in app/, env preserved
  4. ssh_peek(id, wait_sec=20) # long-poll a slow job
  5. ssh_close(id) # clean up when done

MCP tools

ToolWhat it does
🗂️ `ssh_hosts`List allowed Host aliases (safe metadata only). Pass reload=true after editing ~/.ssh/config
🔓 `ssh_open`Open a clean persistent shell for an allowed Host alias → returns session id
▶️ `ssh_run`Run a non-interactive command in an existing session
👀 `ssh_peek`Latest N lines of output + status; optional wait_sec long-polls while running
⛔ `ssh_interrupt`Send Ctrl-C and wait for confirmed shell recovery
📋 `ssh_list`List sessions, cwd, state, idle countdown, and capacity
🔒 `ssh_close`Tear down remote temp state and close the connection
Tool parameters (essentials)
ToolKey params
ssh_openhost (required Host alias), optional name label
ssh_runid, command, optional wait_sec, optional timeout_sec
ssh_peekid, optional lines (default 50, max 1000), optional wait_sec
ssh_interrupt / ssh_closeid
ssh_hostsoptional reload boolean

Quick start

Requirements
RequirementNotes
Node.js20 or newer
OpenSSH clientSystem ssh on PATH (or set sshPath)
Remote hostBash + base64, stty, mkdir, cat, rm
SSH setupHost alias in ~/.ssh/config, host key already trusted

⚠️ First-time host-key confirmation and authentication must be completed in a normal terminal. The MCP server never shows password or trust prompts.

Install
git clone https://github.com/the-nine-nation/remote-ssh-mcp.git

cd remote-ssh-mcp npm install npm run build npm test

Run the server:

node /absolute/path/to/remote-ssh-mcp/dist/index.js

Or install from npm (once published):

npx @zyluo/remote-ssh-mcp

or

npm install -g @zyluo/remote-ssh-mcp remote-ssh-mcp

Or, after a local package install from this repo, use the remote-ssh-mcp executable.

MCP host configuration

Most stdio hosts accept a shape like this (outer key may differ by product):

{

"mcpServers": { "remote-ssh": { "command": "node", "args": [ "/absolute/path/to/remote-ssh-mcp/dist/index.js" ], "env": { "SSH_MCP_ALLOWED_HOSTS": "prod,staging" } } } }

Cursor · Claude Desktop · Claude Code · other MCP-capable hosts: point command / args at the bu

冒頭だけを表示しています。続きはリポジトリで読めます

PopNxに聞く