local-bridge
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@local-bridgeNavigate to google.com and search for MCP servers"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
local-bridge
@tianshu-ai/local-bridge — a lightweight local client that connects
your machine's tools (browser, and more) into a
tianshu server via
reverse-MCP.
tianshu runs on a server. This bridge runs on your computer, dials out to the server over a WebSocket, and registers itself as an MCP server. The server-side agent can then drive your local tools — as if they were built in — but scoped to your own sessions only.
your machine tianshu server
┌──────────────┐ outbound WSS ┌──────────────────┐
│ local-bridge │ ────────────────▶ │ /ws (Local Bridge │
│ • browser │ register tools │ plugin) │
│ tools │ ◀──── tools/call ─│ → agent uses │
└──────────────┘ ──── result ─────▶ │ your tools │
└──────────────────┘Install & run
Install globally, then use the short tsbridge command:
npm i -g @tianshu-ai/local-bridge
tsbridge --server wss://your-tianshu.example.com/ws --token ***Or run one-off with npx (no install):
npx @tianshu-ai/local-bridge --server wss://your-tianshu.example.com/ws --token ***The Local Bridge panel in tianshu shows a ready-to-copy command with your server URL + token filled in.
macOS menu-bar app
Prefer a UI? Build a tiny native menu-bar app (no Electron) that wraps the CLI — a menu-bar icon with Start/Stop + Settings (server / token / browser engine / headless):
npm i -g @tianshu-ai/local-bridge
tsbridge install-app --runThat installs Tianshu Bridge.app to ~/Applications (menu-bar only, no
Dock icon) and launches it. Click the bolt icon → Settings to configure,
then Start. Requires Xcode command line tools (xcode-select --install)
for the one-time swiftc build. First launch: right-click → Open
(unsigned local build).
(app/install-app.sh is also available for a clone-based build.)
For a local dev server with auth off, the token is optional:
tsbridge --server ws://localhost:3110/wsThe
tsbridgeandtianshu-local-bridgecommands are equivalent.
Keeping it updated
tsbridge update # update to the latest version if newer (default)
tsbridge update --check # just check; exit 1 if an update is available
tsbridge update --dry-run # print the npm command without running it
tsbridge update --tag next # target a non-`latest` dist-tag
tsbridge version # print the installed version(Same semantics as tianshu update.)
Flags
flag | meaning |
| tianshu chat WS endpoint (required), e.g. |
| connection token from the Local Bridge panel |
| stable device id (default: hostname) |
| human label shown in the panel |
| don't expose browser tools |
| expose the shell exec + file sync tools (OFF by default) |
| fixed root dir that jails |
| run the browser without a window (default: headful) |
| connect to an already-running Chrome's CDP endpoint (default probe |
| which installed browser to launch: |
| reuse a Chrome profile dir so logins carry over |
No Chromium download. The bridge uses your Chrome:
If a Chrome is already running with
--remote-debugging-port=9222, it connects to that (your real browser — real cookies + session).Otherwise it launches your system-installed Google Chrome via Playwright's
channel: "chrome". Pass--user-data-dirto reuse your logged-in profile.
To expose your everyday browser, start Chrome with a debugging port:
# macOS
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" --remote-debugging-port=9222Related MCP server: NexBrowser MCP Server
Tools
Both engines expose the full Playwright-MCP toolset (navigate, snapshot, click, type, fill_form, evaluate, tabs, screenshot, …). Only the underlying browser differs:
own —
@playwright/mcppointed at your Chrome: connects over CDP to a Chrome already running with--remote-debugging-port, else launches your system Chrome (--browser chrome). Real cookies + fingerprint, no Chromium download.stealth —
cloakbrowser-mcp: the same toolset on CloakBrowser stealth Chromium (source-level anti-bot-detection patches).
Shell + file sync
When --shell is passed, the bridge also exposes three native
tools that run directly on your machine. Their names, parameters and
result shapes mirror tianshu's server-side openshell plugin, so an
agent written against openshell works unchanged against a bridge device.
All three are jailed to a single fixed root directory
(~/.tianshu_shell by default, override with --shell-root). exec's
cwd + workdir, sync_up's read base, and sync_down's write dest all
resolve inside that root; any path that escapes it is rejected.
exec— run a shell command viabash -c, cwd inside the root. Params:command, optionalworkdir(relative to the root, defaults to the root itself), optionaltimeout_ms(default 300s, cap 1800s). Output is truncated at 200 lines / 8000 bytes per stream. Returns{ ok, exit_code, stdout, stderr, truncated, duration_ms, timed_out }.sync_up— read files/dirs under the root and return their bytes (base64) up to the agent. Params:paths[](relative to the root, directories walked recursively). Per-file cap 8 MiB, ≤500 files/call.sync_down— receive files (base64) from the agent and write them down under the root. Params:files: [{ path, base64 }]. Parent dirs are created; existing files overwritten.
Transport is base64-in-args over the existing reverse-MCP tools/call
channel — no protocol changes.
Security:
execruns commands with your user's permissions, but is confined to the--shell-rootdirectory (default~/.tianshu_shell) — the agent can'tcdor read/write outside it via these tools. It is not a kernel sandbox (a determined command could still reach the wider fs), so only connect a bridge to a tianshu server you trust. Because of this, shell is off by default — add--shellonly when you want the agent to run commands + move files on your machine.
Protocol
The bridge speaks the reverse-MCP protocol defined authoritatively in the
server repo: plugins/reverse-mcp/PROTOCOL.md. It's a thin envelope
around standard MCP JSON-RPC over the authenticated chat WebSocket. This
client imports no tianshu package.
Develop
npm install
npm run build
node dist/index.js --server ws://localhost:3110/ws --no-browserRepo: https://github.com/tianshu-ai/local-bridge
Apache-2.0.
This server cannot be deployed
Maintenance
Related MCP Connectors
Secure tunneling, reverse proxy and remote access for local applications.
MCP server to assist with JxBrowser development.
Host your MCP tool over streamable HTTP in one command.
Enable secure connectivity between Sentry issues and debugging data, and LLM clients, using a Model Context Protocol (MCP) server.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceEnables cloud agents to securely operate local machine resources (files, commands, screenshots) via standard MCP protocol.MIT

NexBrowser MCP Serverofficial
AlicenseBqualityAmaintenanceConnects MCP clients to a local NexBrowser desktop app for browser automation, environment management, and session-isolated page inspection via the Model Context Protocol.6410 npmMIT- AlicenseNot gradedqualityAmaintenanceEnables MCP clients to connect to a local workspace over a public tunnel and lets them run shell commands and transfer files bidirectionally.262 npm21GPL 3.0
- FlicenseNot gradedqualityCmaintenanceEnables agents to connect to remote MCP servers once, access their tools through a compact MCP endpoint, pair a CLI inside sandboxes, and create watches that turn command or tool output into pollable structured events.2-