Shuttle
Enables AI assistants to securely execute SSH commands on remote servers with connection pooling, session isolation, and a web audit panel.
README
<div align="center">
🚀 Shuttle
Secure SSH gateway for AI assistants
Shuttle lets AI assistants (Claude Code, Cursor, etc.) securely execute commands on your remote SSH servers — with connection pooling, session isolation, command safety rules, and a web audit panel.
Getting Started · MCP Tools · Web Panel · Security Rules · Docs · 中文文档
</div>
Why Shuttle?
When AI coding assistants need to operate remote servers (run tests on GPU machines, deploy to staging, check logs), they need a secure bridge. Shuttle provides:
- 🔐 4-Level Command Security — Block dangerous commands, require confirmation for risky ones, warn on installs, allow the rest
- 🔄 Connection Pooling — Reuse SSH connections across commands, no repeated handshakes
- 📦 Session Isolation — Each AI conversation gets its own working directory context
- 🌐 Web Audit Panel — See every command the AI ran, per node, with full stdout/stderr
- 🛡️ Per-Node Rules — Different security policies for prod vs dev servers
- ⚡ Jump Host Support — Connect through bastion/jump servers
Getting Started
1. Install
# Recommended: install CLI once (tools bin on PATH)
uv tool install shuttle-mcp
shuttle --help
# Or run without installing (stdio / one-off)
uvx shuttle-mcp --help
# Older PyPI wheels without the `shuttle-mcp` script:
# uvx --from shuttle-mcp shuttle --help
2. Add your first node
shuttle node add
# Follow the prompts: name, host, username, password/key
3. Connect to your AI assistant
Claude Code / Cursor (stdio mode):
// .mcp.json
{
"mcpServers": {
"shuttle": {
"command": "uvx",
"args": ["shuttle-mcp"]
}
}
}
Service mode (with Web UI):
# Start the service
shuttle serve
# Then configure your AI client with the URL
// .mcp.json
{
"mcpServers": {
"shuttle": {
"url": "http://localhost:9876/mcp/"
}
}
}
That's it. Your AI assistant can now execute commands on your remote servers.
Two Running Modes
| Mode | Command | MCP Transport | Web UI | Use Case |
|---|---|---|---|---|
| CLI | shuttle |
stdio | ❌ | Quick use, AI client manages lifecycle |
| Service | shuttle serve |
streamable-http | ✅ http://localhost:9876 | Audit logs, manage rules, cloud deploy |
Both modes share the same SQLite database — commands logged in CLI mode are visible in the Web UI when you switch to service mode.
MCP Tools
AI assistants get these tools automatically:
| Tool | Description |
|---|---|
ssh_run |
Run a command on a remote node (sessions auto-managed) |
ssh_upload |
Upload a file via SFTP |
ssh_download |
Download a file via SFTP |
ssh_list_nodes |
List all configured nodes |
ssh_add_node |
Add a new SSH node |
Example conversation
You: Check the GPU usage on my training server
AI: → ssh_run(node="gpu-server", command="nvidia-smi")
AI: Your GPU server has 7x A100-80GB, all idle at 0% utilization.
You: Start a training run
AI: → ssh_run(node="gpu-server", command="cd /workspace && python train.py")
AI: Training started. Epoch 1/10... (working directory preserved automatically)
Security Rules
Commands are evaluated against a 4-level security system:
| Level | Behavior | Example |
|---|---|---|
| 🔴 block | Rejected immediately | rm -rf /, mkfs, fork bomb |
| 🟡 confirm | Requires user confirmation | sudo, rm -rf, shutdown |
| 🟠 warn | Executes with warning logged | apt install, pip install |
| 🟢 allow | Executes normally | Everything else |
Default rules are seeded on first startup. Customize via Web UI or directly in the database.
Per-Node Overrides
Different servers can have different rules:
Global: sudo .* → confirm
GPU Server: sudo .* → allow (trusted environment)
Prod Server: DROP TABLE → block (extra protection)
Web Panel
Start with shuttle serve, open http://localhost:9876:
- Overview — Node cards with status, quick stats
- Activity — Per-node command log (console-style, with stdout/stderr)
- Security Rules — Manage global defaults and per-node overrides
- Settings — Connection pool and cleanup configuration
The Web UI requires a bearer token (displayed when you run shuttle serve).
CLI Reference
# MCP Server
shuttle # Start MCP server (stdio mode)
shuttle serve # Start service mode (MCP + Web)
shuttle serve --port 8080 # Custom port
shuttle serve --host 0.0.0.0 # Bind to all interfaces
# Node Management
shuttle node add # Add node interactively
shuttle node list # List all nodes
shuttle node test <name> # Test SSH connection
shuttle node edit <name> # Edit a node
shuttle node remove <name> # Remove a node
# Configuration
shuttle config show # Display current config
Configuration
All settings can be overridden with environment variables (prefix SHUTTLE_):
| Variable | Default | Description |
|---|---|---|
SHUTTLE_DB_URL |
sqlite+aiosqlite:///~/.shuttle/shuttle.db |
Database URL |
SHUTTLE_WEB_PORT |
9876 |
Web panel port |
SHUTTLE_POOL_MAX_TOTAL |
50 |
Max total SSH connections |
SHUTTLE_POOL_MAX_PER_NODE |
5 |
Max connections per node |
SHUTTLE_POOL_IDLE_TIMEOUT |
300 |
Idle connection timeout (seconds) |
Using PostgreSQL
SHUTTLE_DB_URL=postgresql+asyncpg://user:pass@host:5432/shuttle shuttle serve
Requires: uv pip install asyncpg (install into the same environment that runs Shuttle)
Development
# Clone and install
git clone https://github.com/enwaiax/shuttle.git
cd shuttle
uv sync
# Run tests
uv run pytest tests/ -v
# Lint
uv run ruff check src/ tests/
# Frontend dev (hot reload)
cd web && npm install && npm run dev
# Backend: uv run shuttle serve (in another terminal)
Architecture
Developer ↔ AI Assistant ↔ Shuttle (MCP) ↔ SSH ↔ Remote Servers
│
┌─────────┴──────────┐
│ Core Engine │
│ ├ ConnectionPool │
│ ├ SessionManager │
│ ├ CommandGuard │
│ └ SQLAlchemy ORM │
└────────────────────┘
Service mode: Single ASGI app serving both MCP (at /mcp/) and Web UI (at /) on the same port.
License
<div align="center"> <sub>Built for developers who let AI do the SSH-ing.</sub> </div>
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。