@vibeus/bridge-contracts
v0.2.1
Published
Shared frame types for the Vibe websocket↔MCP bridge.
Downloads
118
Readme
vibe-bridge-sdk
A small SDK that bridges a WebSocket peer to a Claude Code session via the Model Context Protocol. Inbound WebSocket frames surface to the model as <channel> tags; the model replies by calling a reply tool that pushes a frame back over the socket.
Packages
| Package | Description |
| --- | --- |
| @vibeus/bridge-contracts | Shared frame types (ChannelInboundFrame, ChannelOutboundFrame). Pure types, no runtime. |
| @vibeus/claude-code-channel | MCP stdio server that connects a WebSocket peer to a Claude Code session. |
Requirements
- Bun 1.3.11+
Quick start
bun install
bun packages/claude-code-channel/channel.tsConfigure the bridge with environment variables:
WEBSOCKET_URL— peer to connect to (defaultws://localhost:8080)WEBSOCKET_RECONNECT_MS— reconnect backoff (default2000)
To register the bridge as an MCP server for Claude Code itself, add it to .mcp.json (gitignored — local only):
{
"mcpServers": {
"websocket-bridge": {
"command": "bun",
"args": ["packages/claude-code-channel/channel.ts"],
"env": { "WEBSOCKET_URL": "ws://localhost:8080" }
}
}
}Development
bun run check— Biome lint + format checkbun run check:fix— Biome lint/format with autofixbun run typecheck—tsc --noEmitacross the workspace
See CLAUDE.md for stack details, architecture, the bridge protocol contract, and the release procedure for @vibeus/bridge-contracts. AI agents should also see AGENTS.md.
