pipe-opencode
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., "@pipe-opencodeWait until OpenCode is ready for my next prompt"
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.
pipe-opencode
pipe-opencode is a local MCP server for inspecting and controlling a running
OpenCode TUI session. It reads durable OpenCode state through
opencode db --format json and uses tmux for live pane capture and prompt
injection.
Deployment
Build and deploy the MCP bridge to one or more local agent clients:
./deploy.sh all
./deploy.sh codex claude
./deploy.sh opencodeIf no environment is provided, deploy.sh prompts for all, codex,
claude, or opencode. The opposite operation removes only the
pipe-opencode config and instruction blocks owned by these scripts:
./undeploy.sh all
./undeploy.sh codexThe scripts deploy a stable repo-owned launcher:
/home/artur/Projekty/local-LLM/pipe-opencode/bin/pipe-opencode-mcpBy default, the bridge uses:
OPENCODE_BIN=/home/artur/.opencode/bin/opencodeOPENCODE_CONFIG_DIR=$HOME/.config/opencode
Override either environment variable when running deploy.sh if a machine uses
different paths.
Related MCP server: opencode-lens
OpenCode MCP config
{
"mcp": {
"pipe-opencode": {
"type": "local",
"command": ["/home/artur/Projekty/local-LLM/pipe-opencode/bin/pipe-opencode-mcp"],
"enabled": true,
"timeout": 1800000,
"environment": {
"OPENCODE_BIN": "/home/artur/.opencode/bin/opencode",
"OPENCODE_CONFIG_DIR": "/home/artur/.config/opencode"
}
}
}
}Use the longer timeout when calling blocking tools such as opencode_wait with
condition: "awaiting_user". A shorter client timeout cancels the MCP request
before the bridge can finish waiting for OpenCode to become idle.
Interrupting OpenCode
Use opencode_interrupt when an overseer needs to stop the running OpenCode
turn. The tool sends the double-Escape sequence OpenCode expects in one MCP
request, instead of relying on the overseer model to invoke opencode_tui_key
twice quickly enough.
{
"target": "%2",
"intervalMs": 75
}target is optional when pane auto-detection is unambiguous or
OPENCODE_TMUX_TARGET is set. intervalMs defaults to 75; set it to 0 to
send both Escape presses in a single tmux send-keys burst.
Blocking waits
opencode_wait supports three wait conditions:
changed: return aftersession.time_updatedadvances. This keeps the old polling behavior.idle: return after the root assistant turn is finished and no tracked session has a running tool call.awaiting_user: return after OpenCode appears ready for the next user prompt. This is the preferred mode for overseer agents that should block while OpenCode or its child agents are still processing.
When condition is omitted, calls with sinceTimeUpdated use changed; calls
without it use awaiting_user. Blocking waits default to no server-side timeout,
a 2s internal poll interval, and a 15s stable window. Set timeoutMs to a
positive value to cap the wait, or set stableMs higher if a local model has
long gaps between internal steps.
Development
npm install
npm testThis server cannot be deployed
Maintenance
Related MCP Connectors
Securely control computers you explicitly pair through files, terminals, processes, screenshots, desktop UI/input, clipboard, browser automation, diagnostics, and document tools.
Drive real devices from your AI Coding tool. Embed a client SDK (Unity, Godot, Flutter, iOS/macOS, Android, React Native, Web) in your app, then capture screenshots, traverse the UI tree, inject taps and key events, and run automated test tasks on the physical device over a secure relay.
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
Read a project's prompts, logs and agents, and send new work to the agent on your own machines.
Related MCP Servers
- AlicenseAqualityCmaintenanceTerminal multiplexer MCP server for orchestrating parallel AI agents. Manages workspaces, panes, surfaces with send_input/read_screen/spawn_agent/stop_agent tools. Supports Claude Code, Codex, Gemini, Cursor CLI agents with lifecycle management, browser automation, and agent status push via Claude --channels.2027Apache 2.0
- AlicenseNot gradedqualityCmaintenanceMCP server that enables inspecting, controlling, and safely automating live opencode TUI sessions.MIT
- AlicenseNot gradedqualityCmaintenanceEnables MCP clients to launch and interact with terminal/TUI programs, providing tools to inspect and control live CLI/TUI sessions.15 npm1Apache 2.0
- AlicenseBqualityCmaintenanceEnables stateful subprocess sessions (REPLs) and tmux-backed TUI program control for interactive tools like Python, r2, or shells.13AGPL 3.0