opencode-remote-mcp
Allows Gemini Web and Gemini Mobile to connect as remote MCP clients to a local OpenCode instance, exposing session control and read-only repository inspection tools for driving OpenCode and reviewing workspace changes.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
opencode-remote-mcp
Zero-dependency StreamableHTTP MCP bridge that lets you drive your local OpenCode instance from Gemini Web, Gemini Mobile, or any remote MCP client.
Gemini Web / Mobile (https://.../mcp/<secret>)
│
▼ HTTPS (OpenTunnel persistent blind-TLS / Cloudflare / Tailscale)
opencode-remote-mcp (127.0.0.1:49390)
├── repo_status / repo_read / repo_search / repo_diff (fast read-only, sandboxed to --root)
└── opencode_sessions / opencode_dispatch / opencode_poll / opencode_interrupt
│
▼ Local OpenCode HTTP API (127.0.0.1:49374)
OpenCode (edits, shell, tests, skills — also visible live in OpenCode Desktop)Quickstart (Gemini Web)
Make sure OpenCode is running locally (
opencode serveor OpenCode Desktop) and Bun is installed.Start the bridge pointing at your projects folder (not published to npm yet, so run via GitHub):
bunx github:system1970/opencode-remote-mcp --root ~/ProjectsOr from a local checkout:
bun run src/cli.ts --root ~/ProjectsOptionally pin a workhorse model:
bunx opencode-remote-mcp --root ~/Projects --model opencode-go/muse-spark-1.3-contributorConnect in Gemini Web:
Open
https://gemini.google.com/devmode(or Settings → Connected Apps → Add a custom app).Paste the printed
https://...opentunnel.xyz/mcp/<secret>(ortrycloudflare.com) URL.Leave OAuth Client ID and Client secret empty and click Next → Connect.
With OpenTunnel (
--tunnel auto, the default whenopentunnelis installed), both the subdomain and your/mcp/<secret>are persisted across restarts — so you only need to paste the URL into Gemini once.
Related MCP server: opencode-mcp
Tools Exposed
Tool | Mode | Purpose |
| Read-only | List allowed repos, git branch, status, and diff stat |
| Read-only | Line-numbered file read (capped at 400 lines / 24 KB) |
| Read-only |
|
| Read-only | Inspect working-tree or staged |
| Read-only | List OpenCode projects and recent/active sessions |
| Read-only | Check session status ( |
| Action | Start or continue an OpenCode session (waits ~25s, then returns |
| Action | Abort a running OpenCode session |
CLI Options
Flag | Env Var | Default | Description |
|
|
| Allowed workspace root (repeatable) |
|
| OpenCode default | Default model for new sessions |
|
|
| Local OpenCode server URL |
|
|
| OpenCode Basic auth password |
|
|
| Local HTTP port |
|
| Persisted in | URL path secret ( |
| — |
| Use a one-time random secret without saving to disk |
|
| — | Optional |
|
|
| Auto-prefers |
|
| — | Optional OpenTunnel subdomain name |
| — |
| Disable tunnel (bring your own HTTPS reverse proxy) |
|
|
| Disable |
Permanent URL (Optional)
If you want a permanent URL across Gemini Web and Mobile without re-pasting on restart, pass --no-tunnel --secret <your-fixed-secret> and point a Named Cloudflare Tunnel or Tailscale Funnel at http://127.0.0.1:49390.
Security Model
Binds strictly to
127.0.0.1; public exposure exists only while the process is running.Requires a 256-bit secret URL path (
/mcp/<secret>) compared in constant time; all other paths return404.All
repo_*tools enforcerealpathcontainment within--root(blocking..and symlink escapes).Built-in MCP instructions tell the model never to
git pushunless explicitly asked.
License
MIT
Part of the agent-webmcp ecosystem — see orkestrate.space for more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Remote MCP server exposing your Node Command fleet (files, shell, processes, browser) to AI hosts.
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
Remote MCP server exposing SMI Aware tools, resources, and skills over Streamable HTTP.
Coordinate and verify OpenCode workers over MCP Streamable HTTP.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceCoordinate and verify OpenCode worker agents over MCP Streamable HTTP. The bridge lets compatible AI harnesses dispatch scoped work, inspect progress, run approved commands, and verify results through a safe worker-only endpoint.4PolyForm Noncommercial 1.0.0
- AlicenseNot gradedqualityAmaintenanceConnects MCP clients such as Claude, Cursor, and VS Code to OpenCode's headless API so users can delegate coding work — asking questions, implementing features, monitoring background jobs, answering prompts and permission requests, and reviewing changes across multiple projects. Supports synchronous runs, asynchronous jobs with polling and recovery, multi-project directory scoping, and configurable server authentication and tool profiles.22,181 npmMIT
- AlicenseNot gradedqualityAmaintenanceConnects MCP clients such as Claude, Cursor, and VS Code to an OpenCode server's headless API so coding work can be delegated, answered, and monitored. It supports asking questions, launching foreground or background jobs, supplying required input and permissions, and reviewing resulting changes across projects.22,181 npmMIT
- AlicenseNot gradedqualityAmaintenanceConnects MCP clients such as Claude, Cursor, and VS Code to OpenCode's headless API so they can delegate coding work across projects — asking questions, implementing features, launching and monitoring background jobs, responding to permission and input requests, and reviewing the resulting changes. It supports multi-project directories, configurable default provider/model pairs, and both synchronous and asynchronous task workflows.22,181 npmMIT