ssh-mcp
What it does
MCP gateway for controlled SSH access with per-client auth, command policies, and audit logging.
- Connects パソコンで動く
- Account or key Needs CONFIG_API_TOKEN
- Category 開発者ツール
インストール
使っているAIアプリを選んで、設定をコピーしてください。
チェック 3/3 合格 · あなたのパソコンで動きます
まず:どの AI を使っていますか?
使っているアプリを選ぶと、下に手順が表示されます。
Claude につなげますが、先に準備が必要です
ssh-mcp のキーが必要です(提供元のサイトで作成) · 先にパソコンへ Docker を入れてください(1 回だけ) · パソコン版 Claude アプリ(Windows または Mac)のみ。Web やスマホでは使えません
パソコン版 Claude アプリの設定ファイルを開く
SettingsDeveloperEdit Config
この設定を貼り付けて保存
{ "mcpServers": { "ssh": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "CONFIG_DIR", "-e", "LOG_DIR", "-e", "CONFIG_API_ENABLED", "-e", "CONFIG_API_TOKEN", "ghcr.io/gelse/ssh-mcp:0.3.0" ], "env": { "CONFIG_DIR": "your-value", "LOG_DIR": "your-value", "CONFIG_API_ENABLED": "your-value", "CONFIG_API_TOKEN": "your-value" } } } }キーはアプリの入力欄にだけ貼り付け、チャットに貼ったり人に送ったりしないでください
Claude を終了してもう一度開く
試してみる
ssh-mcp を使って、私に何ができるか教えて、1 つやってみせて✓ Claude が ssh-mcp を使っていると言うか、回答に ssh-mcp のツール名が出れば接続成功です
メニュー名は 2026年11月11日 に Anthropic のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります
ChatGPT はまだ ssh-mcp につなげません
ssh-mcp はパソコンに入れて使うものですが、ChatGPT は Web 上で動くサーバーにしかつなげません
代わりにできること
A · ssh-mcp につなげるアプリを使う
- ssh-mcp のキーが必要です(提供元のサイトで作成) · 先にパソコンへ Docker を入れてください(1 回だけ) · パソコン版 Claude アプリ(Windows または Mac)のみ。Web やスマホでは使えません
- ssh-mcp のキーが必要です(提供元のサイトで作成) · 先にパソコンへ Docker を入れてください(1 回だけ)
- ssh-mcp のキーが必要です(提供元のサイトで作成) · 先にパソコンへ Docker を入れてください(1 回だけ)
- ssh-mcp のキーが必要です(提供元のサイトで作成) · 先にパソコンへ Docker を入れてください(1 回だけ)
B · 開発者ツール の中で ChatGPT につなげる別のサーバー
同じカテゴリでよく使われているものから、キーなしでアドレスだけでつなげるものを選びました
- Sentry✓ ChatGPT
- Compiler Explorer✓ ChatGPT
- GitDiagram✓ ChatGPT
Claude Code につなげますが、先に準備が必要です
ssh-mcp のキーが必要です(提供元のサイトで作成) · 先にパソコンへ Docker を入れてください(1 回だけ)
ターミナルを開く
Mac:Command+スペースで Terminal と入力 · Windows:PowerShell を開く
このコマンドを貼り付けて Enter
claude mcp add --scope user ssh --env CONFIG_DIR=your-value --env LOG_DIR=your-value --env CONFIG_API_ENABLED=your-value --env CONFIG_API_TOKEN=your-value -- docker run -i --rm -e CONFIG_DIR -e LOG_DIR -e CONFIG_API_ENABLED -e CONFIG_API_TOKEN ghcr.io/gelse/ssh-mcp:0.3.0Enter の前に「your-value」を自分のキーに書き換えてください
キーはアプリの入力欄にだけ貼り付け、チャットに貼ったり人に送ったりしないでください
Claude Code で /mcp と入力
ssh-mcp が一覧にあり、接続済みと表示されれば OK です
試してみる
ssh-mcp を使って、私に何ができるか教えて、1 つやってみせて✓ Claude Code が ssh-mcp を使っていると言うか、回答に ssh-mcp のツール名が出れば接続成功です
メニュー名は 2026年11月11日 に Anthropic のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります
Cursor につなげますが、先に準備が必要です
ssh-mcp のキーが必要です(提供元のサイトで作成) · 先にパソコンへ Docker を入れてください(1 回だけ)
キーを入力
ssh-mcp の設定で CONFIG_DIR, LOG_DIR, CONFIG_API_ENABLED, CONFIG_API_TOKEN が空です。自分のキーを入れて保存します
キーはアプリの入力欄にだけ貼り付け、チャットに貼ったり人に送ったりしないでください
Cursor の AI チャットを Agent モードで開く
試してみる
ssh-mcp を使って、私に何ができるか教えて、1 つやってみせて✓ Cursor が ssh-mcp を使っていると言うか、回答に ssh-mcp のツール名が出れば接続成功です
メニュー名は 2026年11月11日 に Cursor のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります
VS Code につなげますが、先に準備が必要です
ssh-mcp のキーが必要です(提供元のサイトで作成) · 先にパソコンへ Docker を入れてください(1 回だけ)
キーを入力
ssh-mcp の設定で CONFIG_DIR, LOG_DIR, CONFIG_API_ENABLED, CONFIG_API_TOKEN が空です。自分のキーを入れて保存します
キーはアプリの入力欄にだけ貼り付け、チャットに貼ったり人に送ったりしないでください
VS Code の AI チャットを Agent モードで開く
試してみる
ssh-mcp を使って、私に何ができるか教えて、1 つやってみせて✓ VS Code が ssh-mcp を使っていると言うか、回答に ssh-mcp のツール名が出れば接続成功です
メニュー名は 2026年11月11日 に VS Code のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります
Windsurf、Zed、Gemini CLI など MCP を使える他のアプリは追加方法がそれぞれ違います。アプリ一覧で確認してください
JSON 設定は下の「開発者向け」にあります
開発者向け:ターミナルのコマンドと JSON 設定
パソコンにインストール
Claude Code
claude mcp add --scope user ssh --env CONFIG_DIR=your-value --env LOG_DIR=your-value --env CONFIG_API_ENABLED=your-value --env CONFIG_API_TOKEN=your-value -- docker run -i --rm -e CONFIG_DIR -e LOG_DIR -e CONFIG_API_ENABLED -e CONFIG_API_TOKEN ghcr.io/gelse/ssh-mcp:0.3.0Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"ssh": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"CONFIG_DIR",
"-e",
"LOG_DIR",
"-e",
"CONFIG_API_ENABLED",
"-e",
"CONFIG_API_TOKEN",
"ghcr.io/gelse/ssh-mcp:0.3.0"
],
"env": {
"CONFIG_DIR": "your-value",
"LOG_DIR": "your-value",
"CONFIG_API_ENABLED": "your-value",
"CONFIG_API_TOKEN": "your-value"
}
}
}
}Cursor (~/.cursor/mcp.json)
{
"mcpServers": {
"ssh": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"CONFIG_DIR",
"-e",
"LOG_DIR",
"-e",
"CONFIG_API_ENABLED",
"-e",
"CONFIG_API_TOKEN",
"ghcr.io/gelse/ssh-mcp:0.3.0"
],
"env": {
"CONFIG_DIR": "your-value",
"LOG_DIR": "your-value",
"CONFIG_API_ENABLED": "your-value",
"CONFIG_API_TOKEN": "your-value"
}
}
}
}VS Code (mcp.json)
{
"servers": {
"ssh": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"CONFIG_DIR",
"-e",
"LOG_DIR",
"-e",
"CONFIG_API_ENABLED",
"-e",
"CONFIG_API_TOKEN",
"ghcr.io/gelse/ssh-mcp:0.3.0"
],
"env": {
"CONFIG_DIR": "your-value",
"LOG_DIR": "your-value",
"CONFIG_API_ENABLED": "your-value",
"CONFIG_API_TOKEN": "your-value"
}
}
}
}自分で入力する値
CONFIG_DIRenvDirectory containing ssh-mcp-config.jsonLOG_DIRenvDirectory for JSONL audit logsCONFIG_API_ENABLEDenvEnable the configuration REST API and web dashboardCONFIG_API_TOKEN秘密 envBearer token for the configuration API
この設定は、作者のレジストリ登録情報から作成しています。READMEと違う場合は、READMEに従ってください。
ひと目でわかる
使えるアプリ
このサーバーのつなぎ方と、各アプリの公式ドキュメントに基づきます。2026年11月10日に確認。
パソコン上で動かせるアプリ
ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast
できること
パソコンで動くサーバーです。インストールすると、ツール一覧がAIアプリに表示されます。
基本チェックi
誰でも見られる情報をチェックしており、コードは読んでいません。当てはまらない項目は数に入れていません。 · 2026年11月12日にチェック
- ✓ 合格
作者とリポジトリが一致
レジストリ名は、リポジトリを所有するGitHubアカウント gelse で確認済みです
- ✓ 合格
今もメンテナンスされている
コードの最終更新:2 か月前
- ✓ 合格
ライセンスがある
MITを使用
- – 対象外
エンドポイントが応答する
これはパソコンで動くため、インターネット上のエンドポイントはありません
- – 対象外
OAuthでサインイン
パソコンで動き、代わりにローカルの設定を使います
- … 未チェック
ツールの説明に隠れた指示がない
パソコンで動くサーバーです。ツール一覧を読み取れるのは、インターネット上のエンドポイントがある場合だけです
話し合い
質問、コツの共有、使えないことの報告ができます。「役に立った」の多い順です。
ユーザーレビュー
まだレビューはありません
開発者ツールのほかのサーバーとの比較i
- このカテゴリのほかの5800件のうち89%よりスターが多い
- このカテゴリのほかの5800件のうち38%より最近レジストリに公開
- 基本チェックの結果が、このカテゴリのほかの5800件のうち100%と同じかそれ以上
レジストリでこのカテゴリにある有効なすべてのサーバーと比較しています。スターは、公開者がリポジトリの所有者である場合だけ数えます。
よくある質問
ssh-mcpは安全ですか?
当てはまる基本チェック3項目のうち3項目に合格しました。コードは読んでいません。キーやトークンを追加する前に、サーバーがどんなアクセスを求めているかを確認し、必要な権限だけを持つキーを使ってください。
どんなキーやコードが必要ですか?
入力が必要なもの:CONFIG_API_TOKEN
パソコンで動きますか、それともクラウドですか?
あなたのパソコンで動きます。必要なときにAIアプリが起動し、データは作者のサーバーを通りません(サーバー自体がオンラインサービスを呼び出す場合を除きます)。
今もメンテナンスされていますか?
GitHubリポジトリの最終更新は2 か月前、最新バージョン(0.3.0)がレジストリに届いたのは2 か月前です。
どのアプリで使えますか?
Claude Desktop、Claude Code、Cursor、VS CodeなどのMCP対応アプリで使えます。パソコンにDockerも必要です。
同じカテゴリのほかの候補
同じカテゴリで、ほかの作者が作ったサーバー。スターの多い順。
カードの見方:↓ 週あたりのダウンロードi★ GitHubスターi3つの柱:レビュー · チェック · 利用状況i更新=最新バージョンをレジストリに公開した日i
GitHub
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Serena MCP: the IDE for your agent
A powerful toolkit for coding, providing semantic retrieval and editing capabilities.
作者のREADME
READMEを開く
作者のリポジトリから書かれたとおりにコピーしたものです。PopNx MCPは内容を確認・推奨していません。HTML、画像、スクリプトは取り除いています。リンクはこのサイトの外へ移動します。
ssh-mcp
A centralized MCP gateway that gives AI agents controlled SSH access over Streamable HTTP.
What problem does this solve?
Most MCP SSH servers run as local stdio processes — one per client, with no shared state, no centralized authorization, and no audit trail. When multiple AI agents need SSH access, each manages its own SSH keys and runs its own process. This creates:
- No centralized access control — every client decides what it can run
- No audit trail — commands are invisible to the ops team
- SSH key sprawl — keys scattered across every agent machine
- No rate limiting — a runaway agent can overwhelm a target
ssh-mcp solves this by deploying a single HTTP gateway. All clients connect to it; it connects to your SSH targets. Authorization, rate limiting, connection pooling, and audit logging happen in one place.
Quick Start
Using the pre-built image (recommended)
docker compose pull
docker compose up -d
The image is published at ghcr.io/gelse/ssh-mcp:latest. The compose file maps host port 9080 to container port 8080.
Verify the server is running:
curl http://localhost:9080/health
→ {"status": "ok"}
Create a minimal config in config/ssh-mcp-config.json:
{
"version": 1, "ssh_targets": { "my-server": { "host": "10.0.1.10", "username": "deploy" } }, "allowed_commands": { "default": [ { "targets": ["*"], "commands": ["hostname", "uptime", "free", "df"] } ] } }
Generate an API key hash and add it to your config or secrets.json (see Configuration).
Build locally instead
make build
docker compose up -d --build
</details>
What you can do (tools)
Six MCP tools are available over Streamable HTTP:
| Tool | Description |
|---|---|
ssh_list_servers | List configured SSH targets |
ssh_list_allowed_commands | Show allowed commands for a target |
ssh_execute_command | Execute a command on a remote server |
ssh_check_connection | Test SSH connectivity to a target |
ssh_download_file | Download a file via SFTP |
ssh_upload_file | Upload a file via SFTP |
Tool Naming Convention
All tools follow the pattern ssh_ _ :
ssh_list_servers— list resourcesssh_list_allowed_commands— list permissionsssh_execute_command— perform an actionssh_check_connection— verify connectivityssh_download_file/ssh_upload_file— file transfer
See examples/README.md for usage examples including curl commands and Python client code.
What's configurable
ssh-mcp is configured via JSON files with hot-reload (15 s poll, 2 s debounce). Key areas:
| Area | Details |
|---|---|
| SSH targets | Host, port, username, key, password |
| Command policies | Block patterns, per-key/network allowlists |
| Connection pool | Max connections, idle timeout, concurrency |
| Rate limiting | Per-IP sliding window (default 60 req/min) |
| Logging | JSONL with rotation, gzip, multiple targets |
| SFTP | Sandbox root, path length limits |
Full reference: docs/CONFIGURATION.md
| File | Purpose |
|---|---|
ssh-mcp-config.json | Main config |
config.schema.json | JSON Schema for validation |
secrets.json | Passwords and API key hashes |
MCP_SSH_* env vars | Overrides for any setting |
Why not just raw SSH / other MCP servers?
ssh-mcp adds a layered authorization chain (9 ordered layers) between every client request and every SSH command. Per-API-key and per-network rules let different agents get different permissions on different servers — without touching the underlying SSH accounts.
Additional protections:
- Circuit breakers isolate failing targets with exponential backoff
- Rate limiting prevents runaway agents from overwhelming hosts
- Structured audit logs trace every command, client, IP, and authorization decision
- Connection pooling reuses SSH sessions across requests
- Input sanitization and dangerous-pattern detection block shell injection attempts
Architecture: ARCHITECTURE.md Security model: docs/SECURITY.md
What it is NOT
- Not an interactive shell — commands are executed individually with structured output
- Not a file manager — SFTP supports single-file download and upload only (no directory listing or recursive transfer)
- Not a firewall / network ACL — authorization is command-level, not network-level
- Does not reduce SSH account privileges — if a command is allowed, the SSH user executes it with whatever privileges that account has
Not yet / known gaps
Fixable with contribution:
- SFTP is single-file only — no directory listing or recursive transfer
- No TLS termination — run Traefik or nginx in front
- No OAuth or mTLS app-layer authentication
- Rate limiter settings are not hot-reloadable (set at boot)
Architectural:
- Config API dashboard login sessions are in-memory only — they don't survive restarts and the API is single-instance (config changes themselves persist to the config file normally)
- No tamper protection for audit logs
Observability
- Health:
GET /health— returns{"status": "ok"} - Metrics:
GET /metrics— Prometheus exposition format - Logging: Structured JSONL with request correlation
Full reference: docs/OBSERVABILITY.md
Config API & Dashboard
An optional web dashboard for managing configuration without editing JSON files. Enable with CONFIG_API_ENABLED=true.
Full reference: docs/CONFIG-API.md
FAQ
Dashboard returns 401 over HTTP
The session cookie defaults to Secure (HTTPS only). For local HTTP testing, set:
environment:
- CONFIG_API_SESSION_COOKIE_SECURE=false
Then restart the container.
How do MCP clients connect?
Connect to http://host:9080/mcp using the Streamable HTTP transport. Pass your API key via X-API-Key or Authorization: Bearer header.
How do I generate an API key hash?
docker compose exec mcp-ssh python -c \
"from lib.crypto import hash_api_key; print(hash_api_key('your-key'))"
→ pbkdf2:sha256:100000$ $
Or use the hash utility in the Config API dashboard.
How does hot reload work?
The config file is polled every 15 seconds with a 2-second debounce. Changes to targets, commands, and settings take effect without restart. Rate limiter and log target settings require a restart.
Why was my command denied?
Commands are evaluated through a 9-layer authorization chain. The matched_via field in logs shows which layer denied. See Security Model for the full chain.
How does rate limiting work?
Per-IP sliding window, default 60 requests per 60 seconds. Exceeding the limit returns HTTP 503. Configure via settings.rate_limit in the config file.
Where do logs go?
Logs are written to the /logs volume (mapped from ./logs). The active log file is ssh-mcp.log in JSONL format with optional gzip rotation.
Troubleshooting basics
# Check server health
curl http://localhost:9080/health
Validate config
make config-test
Check logs
docker compose logs mcp-ssh
Documentation
| Document | Description |
|---|---|
ARCHITECTURE.md | System design and data flow |
docs/SECURITY.md | Security model and threat analysis |
docs/CONFIGURATION.md | Full config reference |
docs/CONFIG-API.md | Config API & dashboard |
docs/OBSERVABILITY.md | Health, metrics, logging |
CONTRIBUTING.md | Development and contribution guide |
CHANGELOG.md | Release history |
examples/ | Config examples and client code |
Development
# Unit tests
make test
Integration tests (builds Docker image)
make integrationtest
See CONTRIBUTING.md for the full development guide, coding conventions, and PR workflow.
Roadmap
No public roadmap. See Not yet / known gaps for current limitations and opportunities.