mcp-bridge
Bridges an MCP server's stdio transport over HTTP.
mcp-bridgePriority 510What it does
mcp-bridge offers a Model Context Protocol server that runs as a program on the gateway node to MCP clients over HTTP. For each session a client opens on the route, the gateway starts the program under Command with Arguments, and passes messages between the client and the program's standard input and output.
The program runs on every gateway node that takes the route, under the gateway worker's account, and must be installed there. The client reaches the server under Base URI, and every other path on the route is refused as not found.
When to use it
- An MCP server your team wrote for the orders data, installed on the gateway nodes and offered to the AI agents of other teams over HTTP.
- A file-system MCP server started with
npx, for agents that cannot start a program on their own machine. - Two MCP servers on one gateway, each on a route of its own under its own Base URI,
/mcpand/toolsfor example.
Not for offering an HTTP API as MCP tools read from its OpenAPI document — see openapi-to-mcp (Serves an HTTP API to MCP clients from its OpenAPI document) or sending prompts to a model and its answer back — see ai-proxy (Proxies requests to an LLM provider with a unified API).
Set it up
Expose an MCP server installed on the gateway node under one base path
The program runs on each gateway node under the gateway's own account and must be installed there; add an authentication plugin to the route, since the bridge checks nothing itself.
Set Command to /opt/orders-mcp/bin/server, fill Arguments as in the JSON below and set Base URI to /mcp.
{
"command": "/opt/orders-mcp/bin/server",
"args": [
"--stdio"
],
"base_uri": "/mcp"
}
Things to know
- Command — Every session starts its own process on the gateway host, and the process keeps running after the client leaves. A host with many sessions carries a process for each.
- Command — Nothing checks the program when you save, so a path that names no program on a node is saved like one that does.
- Arguments — The same value may appear more than once, for example
--mountbefore each folder the program serves. - Arguments — Every item is text, and a number in the list is refused when you save.
- Base URI — Left empty, only
/sseand/messageat the root are answered, so a route under a path answers404to every request. - Base URI — The prefix is read as a pattern, so a dot or a bracket in it matches more than itself.
- AdvicePut an authentication plugin, key-auth for example, on the same route, so that only your own agents can start the program.
Settings
The fields as the console shows them, section by section.
commandstringRequiredThe program started for each session, such as npx. It runs without a shell, under the gateway worker's account. Nothing checks it when the plugin is saved.
argsarray of stringsA JSON list of arguments, such as ["-y", "@modelcontextprotocol/server-filesystem"]. Each item is passed as one argument. The same value may appear more than once.
["-y","@modelcontextprotocol/server-filesystem","/srv/files"]base_uristringThe path prefix the plugin answers, such as /mcp: it serves /mcp/sse and /mcp/message and answers 404 elsewhere on the route. It is read as a pattern, so a dot or a bracket matches more than itself. Left empty, only /sse and /message at the root are answered, so a route under a path returns 404 to every request.