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

SSH Session MCP

作者:Zw-awaバージョン 2.7.1i★ –iパソコンで動く
レジストリ名io.github.Zw-awa/ssh-session-mcp

インストール

概要

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

Shared SSH PTY runtime for MCP clients with viewer, input lock, async tracking, and policy rules.

PopNx MCPの3つの柱

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

できること

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

  • 接続方法: パソコンで動く
  • トランスポート: stdio
  • カテゴリ: その他
  • 入力が必要なもの:SSH_PASSWORD

インストール

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

インストールの前に

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

「秘密」と表示された値は、あなたのアカウントの鍵です。絶対に人に教えたり、チャットに貼り付けたりしないでください。

必要なもの

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

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

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

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

{
  "mcpServers": {
    "ssh-session": {
      "command": "npx",
      "args": [
        "-y",
        "ssh-session-mcp"
      ],
      "env": {
        "SSH_MCP_CONFIG": "your-value",
        "SSH_MCP_INSTANCE": "your-value",
        "VIEWER_PORT": "your-value",
        "VIEWER_HOST": "your-value",
        "AUTO_OPEN_TERMINAL": "your-value",
        "SSH_MCP_MODE": "your-value",
        "SSH_MCP_LOCAL": "your-value",
        "SSH_MCP_DEBUG": "your-value",
        "SSH_HOST": "your-value",
        "SSH_PORT": "your-value",
        "SSH_USER": "your-value",
        "SSH_PASSWORD": "your-value",
        "SSH_KEY": "your-value"
      }
    }
  }
}

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

claude mcp add ssh-session --env SSH_MCP_CONFIG=your-value --env SSH_MCP_INSTANCE=your-value --env VIEWER_PORT=your-value --env VIEWER_HOST=your-value --env AUTO_OPEN_TERMINAL=your-value --env SSH_MCP_MODE=your-value --env SSH_MCP_LOCAL=your-value --env SSH_MCP_DEBUG=your-value --env SSH_HOST=your-value --env SSH_PORT=your-value --env SSH_USER=your-value --env SSH_PASSWORD=your-value --env SSH_KEY=your-value -- npx -y ssh-session-mcp

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

Cursorで開く

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

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

{
  "mcpServers": {
    "ssh-session": {
      "command": "npx",
      "args": [
        "-y",
        "ssh-session-mcp"
      ],
      "env": {
        "SSH_MCP_CONFIG": "your-value",
        "SSH_MCP_INSTANCE": "your-value",
        "VIEWER_PORT": "your-value",
        "VIEWER_HOST": "your-value",
        "AUTO_OPEN_TERMINAL": "your-value",
        "SSH_MCP_MODE": "your-value",
        "SSH_MCP_LOCAL": "your-value",
        "SSH_MCP_DEBUG": "your-value",
        "SSH_HOST": "your-value",
        "SSH_PORT": "your-value",
        "SSH_USER": "your-value",
        "SSH_PASSWORD": "your-value",
        "SSH_KEY": "your-value"
      }
    }
  }
}

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

VS Codeで開く

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

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

{
  "servers": {
    "ssh-session": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "ssh-session-mcp"
      ],
      "env": {
        "SSH_MCP_CONFIG": "your-value",
        "SSH_MCP_INSTANCE": "your-value",
        "VIEWER_PORT": "your-value",
        "VIEWER_HOST": "your-value",
        "AUTO_OPEN_TERMINAL": "your-value",
        "SSH_MCP_MODE": "your-value",
        "SSH_MCP_LOCAL": "your-value",
        "SSH_MCP_DEBUG": "your-value",
        "SSH_HOST": "your-value",
        "SSH_PORT": "your-value",
        "SSH_USER": "your-value",
        "SSH_PASSWORD": "your-value",
        "SSH_KEY": "your-value"
      }
    }
  }
}

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

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

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

自分で入力する値

  • SSH_MCP_CONFIG env
    Optional explicit path to ssh-session-mcp.config.json when the config is not in the current working directory.
  • SSH_MCP_INSTANCE env
    Optional runtime instance id used to isolate state across multiple MCP clients or agents.
  • VIEWER_PORT env
    Viewer HTTP port. Use auto to allocate a free local port, or 0 to disable the browser viewer.
  • VIEWER_HOST env
    Optional viewer bind host. Defaults to 127.0.0.1 for local-only browser access.
  • AUTO_OPEN_TERMINAL env
    Set to true or 1 to automatically open the browser terminal when a session is created.
  • SSH_MCP_MODE env
    Operation mode. safe blocks risky or unsuitable terminal actions by default, while full allows broader execution.
  • SSH_MCP_LOCAL env
    Set to true or 1 to run a local shell instead of opening a real SSH connection. Useful for demos and offline testing.
  • SSH_MCP_DEBUG env
    Set to true or 1 to expose browser-side debug controls intended for demos and local troubleshooting.
  • SSH_HOST env
    Legacy single-target SSH host when not using ssh-session-mcp.config.json device profiles.
  • SSH_PORT env
    Legacy single-target SSH port when not using ssh-session-mcp.config.json device profiles.
  • SSH_USER env
    Legacy single-target SSH username when not using ssh-session-mcp.config.json device profiles.
  • SSH_PASSWORD 秘密 env
    Optional legacy password-based SSH authentication value.
  • SSH_KEY env
    Optional path to a local SSH private key file for legacy single-target mode.

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

できること

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

基本チェックi

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

  • ✓ 合格

    作者とリポジトリが一致

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

  • … 未チェック

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

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

  • … 未チェック

    ライセンスがある

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

  • – 対象外

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

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

  • – 対象外

    OAuthでサインイン

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

  • … 未チェック

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

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

その他のほかのサーバーとの比較i

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

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

よくある質問

SSH Session MCPは安全ですか?

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

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

入力が必要なもの:SSH_PASSWORD

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

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

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

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

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

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

代わりに使えるものは?

同じカテゴリには:Spec Driven Development, Remote Desktop Commander, AvaHR

代わりの候補

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

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

Remote Desktop Commander

作者:desktop-commander

Remote Desktop Commander: use files, terminal and processes on your own computers from any AI app.

クラウドで動く★ 211昨日更新
インストール

AvaHR

作者:avahr.com

Read hiring data and create inactive assessment and questionnaire drafts for human review.

クラウドで動く今日更新
インストール

作者のREADME

READMEを開く

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

ssh-session-mcp

中文 | English

Persistent shared-terminal runtime for MCP clients over SSH.

ssh-session-mcp gives the user and the AI the same SSH PTY session, adds a browser viewer, tracks who typed what, and makes long-running remote work manageable instead of stateless.

Contents

  • Install At A Glance
  • Project Structure
  • Quick Start
  • Docker Status
  • MCP Tools
  • Configuration Summary
  • Security
  • Docs
  • Development

Install At A Glance

  • Normal users do not need to git clone this repository.
  • Preferred install path for MCP clients: npx -y ssh-session-mcp --viewerPort=auto
  • Preferred install path for human operators who want local binaries: npm install -g ssh-session-mcp
  • Official container distribution can be published to a public registry such as docker.io/zwawa/ssh-session-mcp
  • git clone is only for contributors, source builds, and local development.
  • For the common desktop MCP workflow, npx or a global npm install is still the lowest-friction path. Docker is mainly useful when you want a pinned runtime, container-based deployment, or registry-backed distribution.

Why It Exists

Most SSH-oriented MCP servers can execute commands, but they do not manage terminal state well enough for real collaboration.

ssh-session-mcp focuses on the missing runtime layer:

  • One shared PTY for both the human and the AI
  • Browser terminal for live inspection and manual intervention
  • Input lock so the AI does not type over the user
  • Safe/full execution modes for risky commands
  • Configurable default policy rules plus session-level custom rule overrides
  • Async command tracking for long-running remote work
  • Multi-device and multi-connection profile support
  • Local debug mode for demos, offline testing, and prompt iteration

Best Fit

  • AI-assisted remote development on Linux boards and SSH servers
  • Embedded, ROS, training, and deployment hosts that need a real terminal
  • Users who want the AI to help, but do not want to surrender the terminal
  • MCP Marketplace listings where the install and demo path must be clear

Project Structure

Key directories and files:

PathPurpose
src/Core TypeScript implementation for the MCP server, SSH session runtime, viewer, tools, and config CLIs
src/viewer-html/HTML page generators and browser-side scripts for the terminal viewer
test/Vitest coverage for runtime behavior, viewer contracts, config loading, and repository validation
docs/Supporting documentation such as contracts, failure taxonomy, platform notes, and Docker usage
docs/examples/Example config files for normal and Docker-oriented setups
scripts/Build, version sync, and local operator helper scripts
deploy/helm/Helm chart for Kubernetes deployment in single-node or distributed v0 mode
site/GitHub Pages landing page source
dist/Generated static site output from npm run build:site
build/Generated JavaScript output from npm run build
DockerfileContainer image build definition
docker-compose.ymlProfile-based Docker Compose example
docker-compose.env.ymlLegacy .env-style Docker Compose example
server.jsonMCP server metadata for marketplace-style distribution
AGENT.mdPrimary agent/operator playbook
llms-install.mdAgent-focused installation and environment checklist
.env.exampleLegacy single-target environment variable template

Quick Start

1. Agent-First Install (Auto-download on first run)

If the goal is to let Claude Code, Codex, or OpenCode install the server automatically, prefer npx -y ssh-session-mcp in the MCP command instead of a prior global install.

For Cline Marketplace and other agent installers, see llms-install.md. This repo is structured to be one-click installable through an npx -y ssh-session-mcp --viewerPort=auto command.

Claude Code
claude mcp add --transport stdio ssh-session-mcp -- npx -y ssh-session-mcp --viewerPort=auto

Windows note from the Claude Code docs: native Windows users should wrap npx with cmd /c for stdio MCP servers.

claude mcp add --transport stdio ssh-session-mcp -- cmd /c npx -y ssh-session-mcp --viewerPort=auto
Codex
codex mcp add ssh-session-mcp -- npx -y ssh-session-mcp --viewerPort=auto
OpenCode

OpenCode's opencode mcp add flow is interactive. Choose a local MCP server and use this command:

npx -y ssh-session-mcp --viewerPort=auto

If you prefer config instead of the interactive flow:

{

"$schema": "https://opencode.ai/config.json", "mcp": { "ssh-session-mcp": { "type": "local", "command": ["npx", "-y", "ssh-session-mcp", "--viewerPort=auto"] } } }

This is the closest thing to "automatic installation" for stdio MCP servers today: the MCP client stores the command, and npx -y downloads the package automatically the first time it runs.

2. Fastest Local Demo
npm install -g ssh-session-mcp

ssh-session-mcp-ctl launch --local --viewerPort=auto

This starts a local shell instead of SSH and opens the browser terminal, which is the easiest way to test the MCP runtime before touching a real server.

3. Register As An MCP Server

Use the MCP server binary directly when wiring a client:

# Global install

npm install -g ssh-session-mcp

Server command used by MCP clients

ssh-session-mcp --viewerPort=auto

# Claude Code

claude mcp add --transport stdio ssh-session-mcp -- ssh-session-mcp --viewerPort=auto

Codex CLI

codex mcp add ssh-session-mcp -- ssh-session-mcp --viewerPort=auto

If you prefer npx instead of a global install:

npx -y ssh-session-mcp --viewerPort=auto
4. Connect To A Real SSH Target

Create .env from .env.example:

cp .env.example .env
SSH_HOST=YOUR_DEVICE_HOST

SSH_PORT=22 SSH_USER=YOUR_DEVICE_USER SSH_PASSWORD= SSH_KEY= VIEWER_PORT=auto AUTO_OPEN_TERMINAL=false SSH_MCP_MODE=safe

Then launch:

ssh-session-mcp-ctl launch --viewerPort=auto
5. Multi-Device Config

For multiple boards or named targets, create ssh-session-mcp.config.json:

{

"defaultDevice": "DEVICE_A_ID", "devices": [ { "id": "DEVICE_A_ID", "host": "DEVICE_A_HOST", "port": 22, "user": "DEVICE_A_USER", "auth": { "passwordEnv": "DEVICE_A_PASSWORD" }, "defaults": { "term": "xterm-256color", "cols": 120, "rows": 40, "autoOpenViewer": true, "viewerMode": "browser" } } ] }

Discovery order:

  1. --config=/path/to/config.json
  2. Workspace ssh-session-mcp.config.json
  3. User-global config
  4. Legacy .env fallback

Important:

  • Config discovery is based on the MCP process working directory.
  • auth.password is intentionally unsupported. Use auth.passwordEnv or auth.keyPath.
  • Secrets belong in .env or the parent environment, not in repo-tracked JSON.
6. Docker Status

Public Docker images should be distributed through Docker Hub, with GitHub Container Registry as an optional secondary registry:

docker.io/zwawa/ssh-session-mcp:<version>

docker.io/zwawa/ssh-session-mcp:latest ghcr.io/zw-awa/ssh-session-mcp:

Recommended container launch for a real SSH target:

docker run --rm -i \

-p 8793:8793 \ -e VIEWER_PORT=8793 \ -e VIEWER_HOST=0.0.0.0 \ -e SSH_HOST=YOUR_DEVICE_HOST \ -e SSH_PORT=22 \ -e SSH_USER=YOUR_DEVICE_USER \ -e SSH_PASSWORD \ docker.io/zwawa/ssh-session-mcp:latest

Export the password in your shell first instead of placing it directly on the command line.

Recommended launch for profile-based config:

docker run --rm -i \

-p 8793:8793 \ -e VIEWER_PORT=8793 \ -e VIEWER_HOST=0.0.0.0 \ -e SSH_MCP_CONFIG=/workspace/ssh-session-mcp.config.json \ -v "$PWD/ssh-session-mcp.config.json:/workspace/ssh-session-mcp.config.json:ro" \ -v "/path/to/host/keys:/workspace/keys:ro" \ docker.io/zwawa/ssh-session-mcp:latest

Equivalent Compose example:

docker compose up -d

See docker-compose.yml for a ready-to-run example that mounts ssh-session-mcp.config.json, publishes the viewer on 8793, and uses SSH_KEY_DIR when set or falls back to a dedicated ./keys directory. For the full Docker guide, including the legacy .env compose variant and MCP client config snippets, see docs/docker.md. For a container-oriented profile example, see docs/examples/ssh-session-mcp.config.docker.example.json.

Container-specific notes:

  • The image defaults VIEWER_PORT to 8793 when unset so the browser viewer can be published reliably.
  • The image defaults VIEWER_HOST to 0.0.0.0 inside the container so the mapped port is reachable from the host.
  • AUTO_OPEN_TERMINAL defaults to false in the container because browser auto-open from inside a container is usually not useful.
  • Mount config files or SSH keys read-only when possible.
  • Prefer mounting SSH keys from a directory outside the repo root.
  • In docker-compose.yml, SSH_KEY_DIR overrides the default key mount path. If it is unset, Compose falls back to ./keys, not the repo root.
  • Avoid putting passwords directly on the command line. Prefer exported env vars, Compose .env, or --env-file.
  • For stdio MCP clients, Docker is viable, but host-native npx is still simpler unless your client explicitly prefers containerized commands.

Docker-based MCP client command examples:

# Claude Code

claude mcp add --transport stdio ssh-session-mcp -- docker run --rm -i -p 8793:8793 -e VIEWER_PORT=8793 -e VIEWER_HOST=0.0.0.0 docker.io/zwawa/ssh-session-mcp:latest

Codex CLI

codex mcp add ssh-session-mcp -- docker run --rm -i -p 8793:8793 -e VIEWER_PORT=8793 -e VIEWER_HOST=0.0.0.0 docker.io/zwawa/ssh-session-mcp:latest

For JSON-based MCP clients, the same pattern works by using docker as the command and passing the remaining run ... docker.io/zwawa/ssh-session-mcp:latest tokens as args.

This is useful when:

  • The primary workflow is a local stdio MCP server command, not a long-lived network service.
  • You want a pinned Node/runtime environment without a local install.
  • You need registry-based distribution for a team or managed host.
  • You want container-level isolation for the MCP server process.

For many users, publishing to npm and recommending npx -y ssh-session-mcp --viewerPort=auto is still the lower-friction install path.

Viewer And Collaboration Model

The browser viewer is not decorative. It is part of the workflow:

  • The user can see exactly what the AI did.
  • The AI can pause when the user takes over.
  • Password prompts, pagers, and editors become visible state instead of hidden failure modes.
  • Session diagnostics and history turn terminal debugging into something inspectable.

Marketplace-Friendly Flow

For users:

install -> launch viewer -> connect once -> keep the session alive -> let the AI help

For agents:

ssh-qu

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

PopNxに聞く