|
1 | 1 | # mcp-stdio-bridge |
2 | 2 |
|
3 | | -Universal stdio → HTTP(SSE) bridge image for MCP servers on Kubernetes. |
| 3 | +A tiny runtime image that keeps stdio-only Model Context Protocol (MCP) tools |
| 4 | +alive and exposes them over HTTP/SSE. It is designed to be dropped into a |
| 5 | +Kubernetes Pod (for example through the `servers[].stdioBridge` block in the |
| 6 | +`mcp-server` Helm chart), but it also works as a stand-alone container for |
| 7 | +local testing. |
4 | 8 |
|
5 | | -- Includes Node.js (with `npx`/`tsx`) and Python (`pip`). |
6 | | -- Entrypoint is `mcp-proxy`, converting stdio MCP servers to SSE over HTTP. |
7 | | -- Multi-arch (amd64/arm64) via GH Actions. |
| 9 | +## What is inside |
8 | 10 |
|
9 | | -Refer to your Helm chart for usage. |
| 11 | +| Runtime | Notes | |
| 12 | +|------------------------|-----------------------------------------------------------------------| |
| 13 | +| Node.js 25 + `npx` | Launch Node based MCP servers (`npx chrome-devtools-mcp`, etc.). | |
| 14 | +| Python 3.12 + `pip` | Base Python runtime for tools that need it. | |
| 15 | +| `uv` + `uvx` | Preinstalled musl build. The `uvx` wrapper forwards to |
| 16 | +`uv tool run "$@"`, so commands such as `uvx mcp-server-reddit` just work. | |
| 17 | +| `tsx` | Handy for TypeScript-first MCP servers. | |
| 18 | +| `mcp-proxy 0.9.x` | The bridge process that keeps the stdio tool alive and presents SSE. | |
| 19 | +| BusyBox utilities | Used by init scripts; nothing exotic. | |
| 20 | + |
| 21 | +Both `amd64` and `arm64` images are built on every release. |
| 22 | + |
| 23 | +## Quick start (local) |
| 24 | + |
| 25 | +```bash |
| 26 | +# Run a stdio-only MCP server with an SSE endpoint exposed at port 3000 |
| 27 | +docker run --rm -p 3000:3000 \ |
| 28 | + ghcr.io/icoretech/mcp-stdio-bridge:0.3.1 \ |
| 29 | + mcp-proxy --port 3000 -- npx chrome-devtools-mcp |
| 30 | +``` |
| 31 | + |
| 32 | +The container downloads the tool on first start (using `npx`, `uvx`, etc.) and |
| 33 | +keeps it alive. Any arguments that follow `--` are passed to the stdio server. |
| 34 | + |
| 35 | +### Using `uvx` |
| 36 | + |
| 37 | +Because the image ships with `uvx` preconfigured you can launch Python-based |
| 38 | +servers in one line: |
| 39 | + |
| 40 | +```bash |
| 41 | +# Start the Reddit MCP server and bridge it to SSE |
| 42 | +docker run --rm ghcr.io/icoretech/mcp-stdio-bridge:0.3.1 \ |
| 43 | + uvx mcp-server-reddit |
| 44 | +``` |
| 45 | + |
| 46 | +This downloads the package (cached inside the container) and runs it through |
| 47 | +`mcp-proxy` automatically. Replace `mcp-server-reddit` with any uv-compatible |
| 48 | +stdio tool. |
| 49 | + |
| 50 | +## Kubernetes / Helm (stdio bridge) |
| 51 | + |
| 52 | +When using the `mcp-server` Helm chart, enable the bridge per server: |
| 53 | + |
| 54 | +```yaml |
| 55 | +servers: |
| 56 | + - name: reddit |
| 57 | + port: 3000 |
| 58 | + stdioBridge: |
| 59 | + enabled: true |
| 60 | + image: ghcr.io/icoretech/mcp-stdio-bridge |
| 61 | + tag: 0.3.1 |
| 62 | + passEnvironment: true |
| 63 | + serverCommand: ["uvx", "mcp-server-reddit"] |
| 64 | + serverArgs: [] |
| 65 | + register: |
| 66 | + enabled: false |
| 67 | +``` |
| 68 | +
|
| 69 | +The chart embeds `mcp-proxy`. Setting `passEnvironment: true` forwards the |
| 70 | +Pod environment to the child process, which is useful for API keys or other |
| 71 | +configuration. |
| 72 | + |
| 73 | +## Useful flags |
| 74 | + |
| 75 | +You can pass any `mcp-proxy` flag before the `--` separator: |
| 76 | + |
| 77 | +```bash |
| 78 | +# Enforce a specific transport and allow all origins |
| 79 | +docker run --rm ghcr.io/icoretech/mcp-stdio-bridge:0.3.1 \ |
| 80 | + mcp-proxy --transport sse --allow-origin='*' --port 3000 -- \ |
| 81 | + npx chrome-devtools-mcp |
| 82 | +``` |
| 83 | + |
| 84 | +Common options: |
| 85 | + |
| 86 | +- `--pass-environment` / `--no-pass-environment` |
| 87 | +- `--cwd <path>` to change the working directory for the child process |
| 88 | +- `--named-server` to expose multiple bridge targets from one container |
| 89 | + |
| 90 | +Run `docker run --rm ghcr.io/icoretech/mcp-stdio-bridge:0.3.1 mcp-proxy --help` |
| 91 | +for the full list. |
| 92 | + |
| 93 | +## Release workflow |
| 94 | + |
| 95 | +This repository uses Release Please: |
| 96 | + |
| 97 | +1. Every commit and pull request triggers the *ci-build* workflow which builds |
| 98 | + (without pushing) and smoke-tests the runtime (`uv`, `uvx`, `node`, |
| 99 | + `python3`, `mcp-proxy`). |
| 100 | +2. Merging the Release Please PR creates the tag `vX.Y.Z`. |
| 101 | +3. The tag triggers the publish workflow which pushes the multi-arch image to |
| 102 | + `ghcr.io/icoretech/mcp-stdio-bridge` with tags `vX.Y.Z`, `vX.Y`, and |
| 103 | + `latest`. |
| 104 | + |
| 105 | +## License |
| 106 | + |
| 107 | +MIT (see LICENSE in the repo). |
0 commit comments