
Remote Bridge
io.github.varaprasadreddy9676由 GitHub 账号 varaprasadreddy9676 发布v0.1.5更新于 Oct 24, 2026
Sync code to remote servers via SSH/rsync and deploy from any AI IDE.
概览
一个本地 MCP 服务器,让 AI 助手通过 rsync/SSH 把代码同步到远程服务器,并执行部署、重启服务、获取日志和故障诊断。
- 可以做什么
- 把本地代码同步到已配置的远程目标,并以受限输出执行远程 shell 命令,复用现有 SSH 密钥,可选 SSH 连接复用。运行预检,一次调用收集操作系统和运行时信息。获取已配置的日志文件并重启已配置的服务。执行部署流程(同步、重启、失败上下文),并通过收集服务状态、监听端口、磁盘、内存和近期日志来诊断故障。比较预发与生产目标在配置和运行时上的差异。
- 适用场景
- 当希望由 AI 助手驱动可重复的远程操作(部署、重启、查看日志、诊断部署失败),且服务器的主机、路径、重启命令和日志位置只需配置一次时使用。一次性交互式探索仍可直接用 SSH。
- 运行要求
- 作为本地进程从 npm 安装(remote-bridge-cli);README 列出 Rust、rsync 和 ssh 需在 PATH 中。需要 remotebridge.yaml 配置目标主机、用户、路径、可选端口和 SSH 密钥、重启命令及日志路径。使用现有 SSH 认证;未声明 API 密钥或环境变量。
安装
在 SourceWeft 中
- 打开 控制台中的 Remote Bridge,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
RemoteBridge 🌉
A safe, configurable MCP tool for giving AI agents reliable access to remote servers.
RemoteBridge is a Rust CLI and MCP server for AI-assisted remote workflows. It syncs local code with rsync, runs remote commands over SSH, gathers logs and diagnostics, compares environments, and exposes all of that through a compact tool surface your AI can use directly.
Use it when you want an AI agent in Claude Code, Cursor, Windsurf, Codex, or another MCP-enabled tool to work against a remote machine with real operational context, not just a shell prompt.
Instead of making the model guess how your server is set up, RemoteBridge gives it a configured operational interface.
What RemoteBridge Helps The AI Understand
When an AI is debugging or deploying on a remote machine, it needs more than "run this command".
It needs to understand things like:
- where the app is deployed
- how the service is restarted
- which log files matter
- what runtimes are installed
- whether the service is healthy
- which ports are listening
- whether disk or memory pressure is involved
- how staging differs from production
- which commands are allowed or dangerous
RemoteBridge stores those recurring server facts in remotebridge.yaml and exposes the useful workflows as MCP tools.
That lets the AI work with a remote server as a system it can understand, not just a place where commands happen to run.
What Problem This Actually Solves
Without a structured tool layer, remote work from AI usually turns into a noisy sequence of shell steps:
- find the right host
- find the deploy path
- inspect the runtime
- find the restart command
- find the logs
- tail too much output
- ask more questions to recover context
RemoteBridge compresses that into a smaller set of reusable operations with clearer intent and better defaults.
Your AI can call:
sync_to_remotedeploypreflight_checkfetch_logsdiagnose_failurecompare_targets
These tools are designed to help the AI inspect and reason about the remote system, not just execute commands on it.
For example, diagnose_failure can gather:
- runtime facts
- service-manager state
- recent logs
- listeners
- disk status
- memory state
- likely failure signatures
in one compact response.
Small Note On Direct SSH
Direct SSH from an AI tool is still useful when:
- You want a fully interactive shell.
- You already know the exact command.
- You want one-off ad hoc exploration.
- You are doing a one-off urgent command and want raw terminal behavior.
RemoteBridge is better when:
- The AI is driving the workflow.
- The same server facts keep getting rediscovered.
- You want deploy, restart, diagnosis, and log workflows to be repeatable.
- You need guardrails around destructive commands.
- You want compact answers instead of full shell transcripts.
- You want config-aware operations like "compare staging and production".
How RemoteBridge Is Practically Different
RemoteBridge is not better because it hides SSH. It is better because it turns repeated infrastructure reasoning into stable, reusable tool behavior.
Concrete differences from direct SSH:
- The server path is configured once in
remotebridge.yamland reused on every call. - The restart command is configured once instead of being rediscovered or retyped.
- The log files are configured once instead of the model hunting for them.
- The model can call
deploy,diagnose_failure, andcompare_targetsas intent-level operations. - The output is deliberately bounded so the model receives signal instead of log floods.
- Dangerous commands can be confirmed, blocked, or allowlisted.
- Local code changes and remote execution are part of one workflow instead of two disconnected steps.
This is why RemoteBridge is usually more useful than raw shell access inside an AI agent, even when the AI agent technically supports remote access already.
Why This Saves Tokens In Practice
RemoteBridge is useful when it removes low-value conversation between the model and the server.
It saves tokens in a few concrete ways:
run_remote_commandtruncates combinedstdoutandstderrto a shared line budget, so the model gets the important tail instead of a full transcript.preflight_checkgathers OS and runtime facts in one remote call instead of making the AI issue several separate shell commands.fetch_logspulls configured log files in one structured response instead of the AI repeatedly asking where logs live and tailing each file manually.diagnose_failuregathers service state, listeners, disk, memory, runtime info, and recent logs in one pass, then summarizes likely causes.compare_targetsturns "SSH into staging, SSH into prod, inspect both, diff mentally" into one semantic tool call.deployandrestart_serviceremove the need for the AI to restate shell glue likecd /path && ...every time.- Config values such as
remote_path,restart_cmd,logs,allowed_commands, andblocked_patternsare stored once and reused on every call.
The important point is not just "fewer SSH commands." It is:
- less repeated reasoning around the same infrastructure facts
- less output the model has to read
- fewer follow-up prompts caused by noisy shell transcripts
Why This Is Better Than Letting AI Freestyle Shell
Raw SSH gives the AI a lot of power, but very little structure.
RemoteBridge adds:
- Config awareness: target host, deploy path, restart command, and log paths live in
remotebridge.yaml. - Operational semantics: tools like
deploy,diagnose_failure, andcompare_targetsdescribe intent, not just shell syntax. - Safer defaults: dangerous commands can require confirmation, be blocked entirely, or be limited to allowlisted prefixes.
- Better output discipline: the MCP surface returns compressed, useful output instead of dumping everything.
- Local + remote coordination: syncing local files to a remote server is part of the same workflow instead of a separate manual step.
That last point matters. A remote shell alone cannot see your local uncommitted code. RemoteBridge can sync exactly what the AI changed locally, then execute the remote step that depends on it.
Core Value
RemoteBridge is not trying to beat SSH at being a shell.
It is trying to give AI agents a better abstraction than:
- guess the host
- guess the path
- guess the service manager
- guess the logs
- dump too much output
- try again
Why We Built This In Rust
RemoteBridge could have been written in Node.js or Python. We chose Rust for practical reasons tied to the job this tool does.
Rust helps here because:
- it produces a single native binary with fast startup, which is useful for CLI and stdio MCP usage
- it avoids requiring users to manage a Python runtime or a larger JS runtime stack at execution time
- it is a good fit for process-heavy, I/O-heavy tooling such as
ssh,rsync, log streaming, and MCP stdio handling - it gives strong compile-time guarantees around error handling and data flow, which matters for deployment and remote execution tooling
- it tends to have predictable performance and low overhead for repeated tool calls
For this project specifically, that means:
- faster startup for MCP clients launching the server
- less packaging friction for a CLI that people want to install and use immediately
- a native binary that is well suited to wrapping system tools like
sshandrsync - a smaller risk surface for runtime dependency issues compared with large script-runtime stacks
Node.js or Python would have been workable. Rust is a better fit for a tool whose job is to be a reliable systems bridge between an AI client and remote infrastructure.
Features
A Practical Example
Without RemoteBridge, an AI debugging a broken deploy often does something like this:
- SSH in.
- Ask for
pwd. - Ask for
ls. - Try to find the app path.
- Guess how to restart the service.
- Ask for logs.
- Pull too much output.
- Ask follow-up questions because the output was noisy.
With RemoteBridge, the same request can be:
You: "The staging deploy is broken. Diagnose it."
The AI can call diagnose_failure and get back:
- target identity
- inferred service manager
- service health
- runtime versions
- disk or memory pressure signals
- relevant log excerpts
- likely causes
- next-step suggestions
That is a much better use of context than a multi-turn shell transcript.
Quick Start
1. Install
Prerequisites: Rust, rsync, and ssh available in PATH.
2. Add the MCP server to your AI tool
See MCP Support below for other tools.
3. Initialize project config
That creates remotebridge.yaml, which becomes the shared source of truth for your AI workflows.
Example Configuration
Why remotebridge.yaml Matters
This file is the reason the MCP tool is more useful than raw SSH.
It stores facts the AI should not have to rediscover:
- where the app lives
- how it restarts
- which logs matter
- which commands are safe
- which environment needs stronger confirmation
Once that information is encoded once, every future tool call gets simpler and cheaper.
CLI Commands
Integrating With AI CLIs
RemoteBridge is also pipe-friendly.
Claude Code
Gemini CLI
Aider
MCP Support
RemoteBridge is a native MCP server. Any MCP-compatible AI IDE can use it.
Available MCP Tools
What These Tools Let AI Do Better Than Raw SSH
diagnose_failure is the clearest example.
A raw SSH agent has to decide:
- which service manager exists
- how to inspect it
- which logs to read
- how many lines to tail
- whether disk, memory, or port state might be relevant
- which lines are likely signal versus noise
diagnose_failure bakes that investigation into one operation.
compare_targets is another example. SSH can inspect one server at a time. This tool compares:
- host/path/config differences
- confirmation-policy drift
- service-manager differences
- runtime version differences
- high-level compatibility risks
That is not impossible with SSH. It is just expensive and repetitive for AI.
Example Requests
Inside an MCP-enabled IDE, you can say:
- "Sync my current project to staging."
- "Deploy the latest local changes to staging."
- "Check what runtimes are installed on production."
- "The app failed after deploy. Diagnose staging."
- "Compare staging and production and tell me if runtime drift could explain the bug."
- "Show me the last 100 log lines for production."
MCP Configuration Examples
Claude Desktop
File: ~/Library/Application Support/Claude/claude_desktop_config.json
Cursor
File: ~/.cursor/mcp.json or .cursor/mcp.json
VS Code / Cline / Continue / Copilot-compatible MCP clients
Codex CLI
File: ~/.codex/config.json
Or inline:
Generic MCP Pattern
SSH Authentication
RemoteBridge uses your existing SSH setup.
-
Copy your key to the server:
-
Or specify key and port in config:
-
Or use
~/.ssh/configaliases:Then point
hostat the alias:
Safety Model
RemoteBridge is designed for AI-driven execution, so safety is not optional.
Confirmation Gate
Commands containing risky patterns such as sudo, rm, drop, delete, shutdown, reboot, killall, curl | bash, and similar destructive sequences require confirmation before execution.
Hard Block
Anything in blocked_patterns is always rejected:
Allowlist
If allowed_commands is set, only matching prefixes are allowed:
Audit Log
Every command is logged automatically:
Exit codes:
0+actual process exit code-1skipped by user-2hard blocked-3not allowlisted
Other Protections
require_confirmation: truecan force confirmation on every command for sensitive targets.sync --dry-runpreviews what will change before syncing.- No passwords are stored by RemoteBridge.
- No secrets need to live in
remotebridge.yaml. - MCP output stays bounded so one noisy command does not flood model context.
Honest Tradeoff
If you want a raw terminal, use SSH.
If you want an AI to reliably work with remote infrastructure without repeatedly wasting tokens on rediscovery, shell glue, and noisy output, use RemoteBridge.
That is the value proposition.
Contributing
Contributions and issues are welcome at GitHub Issues.
License
MIT License.
来源:README.md,提交 44ffe16
工具
0版本历史
1- v0.1.5最新Sep 16, 2026
评分
已满足适用检查项的 40%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
请在仓库或注册中心条目中声明许可证。