LABSCO SUMMARY
Configuration is where the safety lives.
The bridge is the front door to whatever it launches, so the settings that matter are the ones bounding it: allowed_origins decides who may connect, the connection limit decides how many at once, and the size caps stop a large response from becoming a problem. Restart behaviour backs off from 1s up to 60s, which matters if a wrapped server is crash-looping.
What it is
A Go bridge that wraps subprocess MCP servers with HTTP streaming, so a web client can talk to servers that only speak stdio. Each wrapped server gets its own namespace in the URL, and the bridge manages the process behind it.
What you get
- An SSE stream per namespace and a POST endpoint for requests —
GET /mcp/{namespace}andPOST /mcp/{namespace}/message - Subprocess management: spawning on demand, connection reuse, graceful shutdown on SIGTERM and SIGINT, and restarts with exponential backoff
- The MCP methods handled at the bridge —
initialize,tools/list,tools/callandping - Health per bridge and per namespace —
/healthand/health/{namespace} - Prometheus metrics at
/metrics, includingmcp_http_requests_total,mcp_tool_calls_total,mcp_tool_errors_totalandmcp_active_sessions - A live debug view —
/debugfor the dashboard and/debug/streamfor the message log as SSE - Limits you set rather than discover: request and response size caps, a connection limit, request and idle timeouts, and an origin allowlist
Requirements
A Go toolchain and make build, then run ./bin/mcp-bridge --config config.yaml. The YAML has two halves: a bridge block with the port, allowed origins, timeouts and limits, and a servers block naming each wrapped server with its binary, args, env, timeout, max restarts and whether to auto-start. Nothing to authorize at the bridge itself — credentials belong to the servers it launches, passed through their env entries.
Setup effort
Build from source — git clone https://github.com/AgentForgeEngine/mpc-bridge.git
USE CASES
01
Reaching a stdio server from a web app
Wrap it once and connect over SSE instead of shelling out from the browser tier.
02
Running several MCP servers behind one host
Give each a namespace and route to it by URL rather than managing separate ports.
03
Keeping a flaky server alive
Let the process manager restart it with backoff rather than watching it by hand.
04
Seeing which tool calls fail
Scrape the Prometheus metrics or watch the debug stream while a client is connected.
BEFORE YOU INSTALL
What to know first
Requires
A Go toolchain and make
INSTALLATION
Connect your client
This one is built from source rather than installed with a single command.
Server setup
TERMINAL
git clone https://github.com/AgentForgeEngine/mpc-bridge.git
cd mpc-bridge
make buildCreate config.yaml: a bridge block with the port (8080 in the examples) and allowed_origins, and a servers block naming each stdio MCP server to wrap, with its name, binary and args
TERMINAL
./bin/mcp-bridge --config config.yamlPoint your client at http://localhost:8080/mcp/<YOUR_NAMESPACE>, where <YOUR_NAMESPACE> is the server's key under servers: GET opens the SSE stream and POST /mcp/<YOUR_NAMESPACE>/message sends JSON-RPC requests