opencode VS Code Pipe Bridge
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 VS Code Pipe Bridge
Give an external MCP agent (opencode, Claude Desktop, Cursor, or any MCP client) control of your VS Code window over a named pipe or Unix domain socket instead of TCP.
This exists because localhost is not always yours. Transparent proxies,
corporate MITM appliances, and sandbox tools can intercept loopback TCP and
turn a working editor bridge into 502 Bad Gateway and hangs. Kernel IPC
sidesteps that entirely.
Why not just use a localhost port?
Many editor MCP bridges bind
127.0.0.1:<port>. If anything intercepts loopback (e.g. a proxy with "proxy localhost" enabled), the handshake fails.Named pipes (Windows) and Unix domain sockets (macOS/Linux) are not TCP and are not routed through HTTP proxies.
The endpoint is token-gated and the token lives in a user-only file, so other local users cannot trivially connect.
Related MCP server: vscode-mcp-api
How it works
┌──────────────┐ stdio JSON-RPC ┌────────────┐ pipe / socket ┌───────────────┐
│ MCP client │ ◄────────────────► │ shim │ ◄───────────────► │ VS Code ext. │
│ (opencode) │ newline-delimited │ (Node.js) │ token auth │ (extension.js)│
└──────────────┘ └────────────┘ └───────────────┘The extension serves MCP on
\\.\pipe\ocvscode-<id>(Windows) or<runtime-dir>/ocvscode-<id>.sock(macOS/Linux), where<id> = sha1(normalized workspace path)[0:12].It writes
%LOCALAPPDATA%\opencode-vscode-pipe\<id>.json(or$XDG_RUNTIME_DIR/opencode-vscode-pipe/<id>.json) with the endpoint and a random token.The shim discovers that file, authenticates, and proxies JSON-RPC. If the editor is not running it stays connected in a degraded mode so your agent session survives a restart.
See docs/ARCHITECTURE.md for the protocol details.
Tools
Tool | What it does |
| Folders, active file, selection text, open editors |
| List VS Code command IDs (filterable) |
| Run any VS Code command (privileged) |
| Problems from language servers |
| Open a file at a line/column |
| Diff editor between two files |
| Send text to an integrated terminal (not captured) |
| Symbol outline |
| Definition at a position |
| References at a position |
| Hover / type info |
| Quick fixes and refactors |
| Rename and apply the workspace edit |
| Add a source breakpoint |
| Launch configurations |
| Start a debug session by name |
| Stop the active session |
Lines are 1-based; characters are 0-based.
Requirements
VS Code 1.80 or newer (desktop).
Node.js 18+ for the shim (opencode ships with a suitable runtime).
Install
From a release
Download the .vsix from
Releases,
then either:
code --install-extension opencode-vscode-pipe.vsixor use Extensions: Install from VSIX... in the Command Palette. Reload the window when prompted.
From source
git clone https://github.com/sadguychronicle/opencode-vscode-pipe.git
cd opencode-vscode-pipe
npm run package
code --install-extension dist/opencode-vscode-pipe.vsixConfigure opencode
Open the Command Palette and run opencode Pipe: Copy opencode MCP Config. This copies a ready-to-paste block and writes the shim to a stable path.
Paste it under the top-level
mcpkey of your opencode config, for example:
{
"mcp": {
"vscode-pipe": {
"type": "local",
"command": ["node", "C:\\Users\\<you>\\AppData\\Local\\opencode-vscode-pipe\\shim.js"],
"enabled": true
}
}
}Restart opencode and check the connection:
opencode mcp list
# ✓ vscode-pipe connectedThe shim is copied into the registry directory on activation, so the path stays
the same across extension updates. On macOS/Linux the path is under
$XDG_RUNTIME_DIR/opencode-vscode-pipe/shim.js (or the system temp dir).
Security
This is remote control for your editor. Read SECURITY.md.
Local IPC only; no TCP port is opened.
Token-authenticated; token stored in a user-only (
0600) file.execute_commandandrun_in_terminalcan run arbitrary code.Tool output is untrusted input; beware prompt injection from repositories.
Disable the extension when you are not using an agent.
Compatibility
Windows: named pipes. macOS/Linux: Unix domain sockets.
The extension declares
extensionKind: ["workspace"], so in Remote/SSH/WSL windows it runs on the remote. The MCP client must run in the same environment as the extension to reach the pipe/socket.One endpoint per window, keyed to the first workspace folder.
Development
npm run check # node --check on both entrypoints
npm test # unit + shim integration tests (node:test)
npm run package # build dist/*.vsix with @vscode/vsceNo runtime dependencies; nothing to bundle.
Publishing
Tagged releases (v*) are packaged in CI. To publish automatically, add
repository secrets:
VSCE_PATfor the VS Code MarketplaceOVSX_TOKENfor Open VSX
The release workflow publishes only the marketplaces whose token is present and always attaches the VSIX to the GitHub release.
Limitations
Only the first workspace folder per window is exposed.
run_in_terminalis fire-and-forget; it does not capture output.Language features depend on a language server being active.
No TCP fallback by design.
License
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Enable secure connectivity between Sentry issues and debugging data, and LLM clients, using a Model Context Protocol (MCP) server.
Remote MCP server exposing your Node Command fleet (files, shell, processes, browser) to AI hosts.
Connect ChatGPT and Claude to your Mac, Windows or Linux with secure MCP remote access.
Remote MCP access to user-authorized Linux, Windows and Intel Mac devices for AI assistants.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with VS Code's language server protocol features (definitions, references, diagnostics) and debugger (breakpoints, stepping, variable inspection) via an MCP server.1MIT
- AlicenseNot gradedqualityBmaintenanceExposes a running VS Code instance to AI agents via MCP, enabling file operations, LSP diagnostics, terminal commands, Git workflows, and refactoring.23MIT
- FlicenseNot gradedqualityAmaintenanceEnables MCP clients and AI coding agents to pull real-time editor intelligence from a running VSCode instance, including LSP diagnostics and hover/definition/signature info, symbol references with usage context, workspace-wide renames, and file opening across open workspaces. This replaces slow tsc/eslint/build round-trips with instant language-server results over a per-workspace socket.-
- AlicenseNot gradedqualityFmaintenanceEnables external MCP clients to discover and read a trusted VS Code workspace, inspect diagnostics and symbols, preview and apply conflict-safe edits, and run individually approved terminal commands through a local authenticated bridge.MIT