TN

the-nine-nation/remote-ssh-mcp

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

1 stars 0 forks 品質 84 トレンド 22MIT

Persistent, stateful remote SSH sessions for AI agents via MCP. Keep cwd, env & shell state across commands — powered by your local OpenSSH. Works with Claude, Cursor & any MCP host.

概要

Persistent, stateful remote Bash sessions for AI agents via the Model Context Protocol Why · Features · How it works · Tools · Quick start · Config · Security · 简体中文 Most agents reach remote machines like this: 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. Concrete gains for agent workflows (multi-step remote work: deploy, debug, build, inspect logs): put the MCP on your ; every server already in your SSH config is reachable — . It does 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. - One maps to one long-lived remote Bash - survive across ssh_run calls - Open a whenever you need a clean slate - Multiple sessions can target the same or different hosts (up to maxSessions)

README

以下は原文 README の抜粋です。原文を見る。

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:

Pain What happens
🔁 Token waste Banners, MOTD, login noise, and pwd / whoami probes flood the context
🧊 Lost state cwd, export, venv activation, and shell side effects vanish
🔌 Unstable Fresh connects hit timeouts, host-key prompts, ProxyJump, and auth jitter
🌀 Error spiral The model compensates with longer probe commands → more tokens
GitHub で README 全文を見る

インストール

npx @zyluo/remote-ssh-mcp
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

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