A minimal MCP bridge for cua-driver. Spawns cua-driver mcp, connects to its stdio, and exposes an HTTP server with streamableHttp SSE support.
I wrote this to replace supergateway — the reference Node.js bridge that pulls in ~200MB of dependencies and burns 40-50% CPU at idle. This is ~190 lines of Rust, compiles to a ~2MB binary, and idles at 0%.
cargo build --release./target/release/cua-bridge \
--cua-driver /Applications/CuaDriver.app/Contents/MacOS/cua-driver \
--port 8080If the bridge is on a different machine than your agent and you use Tailscale:
./target/release/cua-bridge \
--cua-driver /path/to/cua-driver \
--port 8080 \
--tailscale-ip 100.64.0.1Omitting --tailscale-ip auto-detects it. The bridge always binds localhost too.
| Flag | Default | |
|---|---|---|
--cua-driver |
/Applications/CuaDriver.app/Contents/MacOS/cua-driver |
Path to cua-driver |
--port |
8080 |
HTTP listen port |
--tailscale-ip |
auto | Tailscale IPv4 to additionally bind |
Client → POST /mcp (JSON-RPC) → forwarded to cua-driver stdio
Client → GET /mcp (SSE streamableHttp) → broadcasts every response as events
→ GET /health
Straight passthrough. No handshake modification, no caching, no buffering. Just reads a line from cua-driver's stdout and writes it to the SSE stream.
The SSE support on GET /mcp is why this exists. Hermes Agent's native MCP client uses streamableHttp transport and needs GET /mcp to return text/event-stream. supergateway's SSE support is unreliable. This one isn't.
# ~/.hermes/config.yaml
mcp_servers:
cua-remote:
url: http://100.94.73.114:8080/mcpThen /reload-mcp. Tools show up prefixed with mcp_cua_remote_.
cua-bridge passes --no-overlay to cua-driver. Without it, cua-driver v0.5.x runs a 60fps overlay render loop even in MCP stdio mode, burning 40-50% CPU (trycua/cua#1808). The visual cursor overlay isn't needed in MCP mode — it's for the serve/daemon path. Once PR #1865 lands this won't be necessary.
cua-bridge is cross-platform (Rust + axum + tokio). cua-driver has pre-release Linux binaries as of v0.5.5. Bind to localhost, use Tailscale for remote access.
MIT