
the-nine-nation/remote-ssh-mcp
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
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 |
설치
npx @zyluo/remote-ssh-mcp설정
{
"mcpServers": {
"remote-ssh": {
"command": "node",
"args": [
"/absolute/path/to/remote-ssh-mcp/dist/index.js"
],
"env": {
"SSH_MCP_ALLOWED_HOSTS": "prod,staging"
}
}
}
}