README
¶
ringbearer
One MCP to rule them all. A small relay that runs one shared copy of each of your stdio MCP servers and serves it to every client session over Streamable HTTP.
If you run several Claude Code or Codex sessions, each session usually starts its own copy of every MCP server. Five sessions and six servers means thirty processes. ringbearer replaces that with one process per server.
- One copy per server, shared by every session (Claude Code, Codex, or any MCP client that speaks Streamable HTTP), at
http://127.0.0.1:8802/servers/<name>/mcp. Claude Desktop, which only runs stdio servers, reaches the same copies through a small built-in bridge. - Crashed servers restart by themselves (with a backoff from 1 s to 1 min), without touching the other servers. Client sessions stay open across the restart.
- Idle servers can sleep: with
idleTimeout, a server starts on first use and stops after a quiet period. - A dashboard shows state, RAM, CPU, logs and who calls what (per client), and lets you start, stop, restart, add and edit servers.
- A single static binary with no runtime dependencies, for Windows, macOS and Linux. It installs as a per-user autostart (no admin rights).
How it works
Claude Code ----+
Claude Code ----+ HTTP +-------------------------------+ stdio +---------------------+
Codex ----------+---------->| ringbearer 127.0.0.1:8802 |--------->| filesystem (1 copy) |
Claude Desktop | | /servers/<name>/mcp |--------->| postgres (1 copy) |
> bridge -----+ | / dashboard |--------->| fetch (1 copy) |
| /admin/* admin API | +---------------------+
+-------------------------------+
- Each server in the config gets one child process, started with its
command,argsandenv. - The child is initialized once, with the first client's
initializeparameters. Later sessions get the cached result, and their requests are multiplexed onto the same child: ringbearer rewrites request ids and progress tokens so sessions never see each other's traffic. - ringbearer relays raw JSON-RPC and has no MCP SDK inside. It only touches ids, progress tokens and
initialize. Methods it does not know, extensions and new capabilities pass through unchanged. For example, the MCP skills extension (skills/list,skills/get) reaches the server; whether a client shows or uses those skills is up to the client. - Clients on protocol revisions 2025-06-18, 2025-11-25 and 2026-07-28 can be connected at the same time, and on 2024-11-05 and 2025-03-26 through the legacy SSE endpoint (
/sse, see Works with). Children always stay on 2025-11-25. For 2026-07-28 clients (noinitialize, no session), the relay answersserver/discoverandsubscriptions/listenitself and forwards everything else. In our tests (2026-11), Claude Code 2.1.332 used the 2026-07-28 path and Codex 0.172.0 theinitializepath (includingskills/list), both through the same relay. - Each server's stderr goes to its own log file. Relay events (starts, exits, restarts, config changes) go to
relay.log.
Quick start
1. Install the binary
Linux / macOS (installs into ~/.local/bin, no sudo, checks the SHA-256 checksum):
curl --proto '=https' --tlsv1.2 -fsSL https://raw.githubusercontent.com/Unax2710/ringbearer/main/install.sh | sh
Set RINGBEARER_INSTALL_DIR to install somewhere else. If ringbearer is not found afterwards, add ~/.local/bin to your PATH (the script tells you how).
Windows (PowerShell 5.1 or later; installs into %LOCALAPPDATA%\Programs\ringbearer and adds it to your user Path, no admin):
irm https://raw.githubusercontent.com/Unax2710/ringbearer/main/install.ps1 | iex
A release candidate (or any given release): the scripts install the latest stable release by default, which does not include pre-releases. Name the version instead (with or without the v):
curl --proto '=https' --tlsv1.2 -fsSL https://raw.githubusercontent.com/Unax2710/ringbearer/main/install.sh | RINGBEARER_VERSION=v0.1.0-rc2 sh
& { $env:RINGBEARER_VERSION = 'v0.1.0-rc2'; try { irm https://raw.githubusercontent.com/Unax2710/ringbearer/main/install.ps1 | iex } finally { Remove-Item Env:RINGBEARER_VERSION } }
The PowerShell form removes the variable afterwards, so a later run of the script in that session installs the latest stable release again.
Managed or corporate machines: install by hand from the release archive (recommended there). Security software (EDR, antivirus) often flags a script piped from the internet into a shell. Instead, download the archive for your OS and architecture and checksums.txt from the releases page, check the SHA-256 (sha256sum -c checksums.txt --ignore-missing, shasum -a 256 on macOS, Get-FileHash on Windows), extract ringbearer (ringbearer.exe) into a folder on your PATH, such as ~/.local/bin or %LOCALAPPDATA%\Programs\ringbearer, and continue with step 2.
With Go 1.27+:
go install github.com/Unax2710/ringbearer@latest
Note: on Windows this builds a console program (a console window at each logon); prefer install.ps1 there.
Release archives (linux, darwin, windows; amd64 and arm64; with checksums.txt) are on the releases page.
The install scripts only copy the binary: the next steps are separate commands.
2. Start it at logon
ringbearer install
This registers ringbearer for the current user and starts it right away. On every OS, the service runs a built-in supervisor (run --supervise), which starts the relay and restarts it within about 1 s if it exits:
| OS | Mechanism | Restart if the supervisor itself exits |
|---|---|---|
| Linux | systemd user unit ~/.config/systemd/user/ringbearer.service |
Restart=on-failure after 5 s, at most 5 times in 5 min |
| macOS | LaunchAgent ~/Library/LaunchAgents/io.github.ringbearer.plist |
KeepAlive (launchd waits at least 10 s between starts) |
| Windows | Scheduled task ringbearer (Task Scheduler, current user, at logon) |
not before the next logon or ringbearer install |
install prints the dashboard URL and the config and log paths, then checks that the relay answers.
On Windows, the supervisor is started by Task Scheduler, not by the terminal that ran install, so closing that terminal does not stop it. If the supervisor itself is killed, nothing restarts it: it comes back at the next logon, or right away with ringbearer install. ringbearer status says when the task is disabled.
On every OS, a relay that keeps exiting (three times or more in a row, whatever the reason, including a kill by security software) is restarted after a growing delay, up to 1 min, instead of every second; watch.log says so ("relay exited N times in a row, next attempt in X"). Five minutes up starts the count over.
Corporate machines: security software (EDR, antivirus) may flag or quarantine a program that starts at logon, unsigned ones more so. Ask your IT team to allow ringbearer.exe before installing it, and prefer the manual install from the release archive (see step 1); signed builds are planned.
- Re-running
installreplaces the registered flags: pass the full set each time (a flag left out goes back to its default). - Headless Linux:
loginctl enable-linger $USERso it starts without a login session. No systemd (some WSL setups, containers): runringbearer run --supervisefrom your session startup. - To run in the foreground without installing:
ringbearer run(or justringbearer).
3. Add your servers
Either open the dashboard at http://127.0.0.1:8802/ and press Add server, or edit relay.json (path printed by install; see Configuration). The relay picks up changes within a few seconds. A minimal config:
{
"mcpServers": {
"fetch": { "command": "uvx", "args": ["mcp-server-fetch"] }
}
}
4. Point your clients at it
ringbearer connect claude
ringbearer connect codex
connect registers every enabled server in the client, at user scope, through the client's own CLI (claude mcp add --transport http -s user ..., codex mcp add ... --url ...). It never edits the clients' config files. It reads the address, TLS and token settings from the installed relay (or uses the defaults if none is installed). A relay installed without a token flag that still asks for a token (it got RINGBEARER_TOKEN from its environment, for example set with setx on Windows) is registered with RINGBEARER_TOKEN. Servers already registered with the same URL and token variable are skipped.
| Option | Effect |
|---|---|
-only a,b |
only these servers |
-remove |
unregister the entries instead |
-dry-run |
print the commands without running them |
If the client's CLI is not on your PATH, connect prints the commands for you to run yourself.
Then restart your Claude Code / Codex session, and check with claude mcp list / codex mcp list.
connect claude replaces a user-scope Claude Code entry that has the same name as a ringbearer server (it prints a notice, but does not ask). If you already have such an entry, copy its command and env into relay.json first (try -dry-run to see what will change).
Remove the per-session copies of these servers from your client config, or you will still have them running alongside the shared ones.
5. Claude Desktop
Claude Desktop only launches local stdio servers: it ignores a url entry in claude_desktop_config.json, and its custom connectors go through Anthropic's cloud, which cannot reach 127.0.0.1. So it normally runs its own copy of every server. Instead, it can run ringbearer bridge <name>, a small process that forwards stdio to the shared server in the relay.
To get the same servers everywhere, each running once, first quit Claude Desktop completely (from the tray or menu bar: closing the window is not enough), since it may rewrite its config file while running. Then:
ringbearer import desktop # copy Desktop's own stdio servers into relay.json
ringbearer connect desktop # point Desktop's entries at the relay
ringbearer connect claude # and/or: ringbearer connect codex
Then start Claude Desktop again. The config file is %APPDATA%\Claude\claude_desktop_config.json on Windows, ~/Library/Application Support/Claude/ on macOS and ~/.config/Claude/ on Linux.
import desktopadds each stdio entry of the Desktop file whose namerelay.jsondoes not have yet (same checks,.bakand atomic write as the dashboard). It skipsurlentries, entries that are already bridges, and names already in the relay, and says why for each. It never changes the Desktop file.envvalues are copied as they are: move secrets to${VAR}afterwards if you prefer. It is refused when the relay runs with-read-only-config.connect desktopsetsmcpServers.<name>to{"command": "<path of ringbearer>", "args": ["bridge", ..., "<name>"]}for each enabled server, with the relay's-addr,-tls-certand-token-filewhen they are not the defaults. The path is that of the installed relay. Other keys and servers are kept, in their order. The file as it was before the first run is kept asclaude_desktop_config.json.bak(later runs do not replace it). When it replaces a different entry with the same name, it prints that entry's command and its number of arguments (arguments,envvalues and URLs may hold secrets: see the.bak).- Token: Claude Desktop passes only a few of its environment variables to its servers, so a relay that reads its token from a variable (
-token-env,RINGBEARER_TOKEN) cannot be reached that way:connect desktoprefuses. Install the relay with-token-file <path>; the bridge reads the same file. The token is never written into the Desktop file.-only,-remove(bridge entries only) and-dry-runwork as for the other clients. - Another machine: the bridge refuses to send a token over plain HTTP to an address that is not on its own machine (loopback or one of the machine's own addresses are fine): give it the relay's certificate with
-tls-cert(the relay then serves HTTPS with that certificate), or run it on the relay's machine. A relay behind a reverse proxy with a public certificate is not supported by the bridge (it pins the relay's own certificate and dials the relay's own address); the dashboard does not offer the bridge snippets there. Clients that speak Streamable HTTP can use the proxy's URL. - The bridge re-opens its relay session by itself when the relay restarts (update, crash, sleep). A request sent while the relay is down waits up to 30 s, then gets an error; the Desktop session stays up. A request already running when the relay goes down gets an error and is not sent again (a tool call could run twice). A server removed or disabled in
relay.jsonanswers each request with an error right away. - Memory per bridge, measured on a GitHub Windows runner: about 2 MB private working set (Task Manager's "Memory" column) and 10 MB working set (the dashboard's measure, which also counts the program's pages shared with the relay and the other bridges). On a Windows 11 workstation with endpoint security, the working set was 19 MB. Windows also reports about 45 MB committed, of which 32 MB is a buffer of Go's crypto package that is reserved but never touched. A duplicate Node.js or Python server usually takes far more.
- Logs go to stderr, which Claude Desktop keeps in its own MCP log files.
Works with
ringbearer speaks plain MCP, so any MCP client can use it. The dashboard's Connect a client button shows the exact snippet for each client below, with your real URLs (open http://127.0.0.1:8802/#connect to go straight there).
| Client | Transport | How to connect |
|---|---|---|
| Claude Code | Streamable HTTP | ringbearer connect claude, or claude mcp add --transport http -s user <name> <url> (docs) |
| Codex | Streamable HTTP | ringbearer connect codex, or codex mcp add <name> --url <url> (docs) |
| Claude Desktop | stdio, through ringbearer bridge |
ringbearer connect desktop (Desktop only starts local programs; see Claude Desktop) (docs) |
| Cursor | Streamable HTTP | ~/.cursor/mcp.json: "url" (docs) |
| VS Code (Copilot) | Streamable HTTP | mcp.json: "servers", "type": "http", "url" (docs) |
| Windsurf | Streamable HTTP | mcp_config.json: "serverUrl" (docs) |
| Gemini CLI | Streamable HTTP | ~/.gemini/settings.json: "httpUrl" ("url" means SSE there) (docs) |
| Zed | Streamable HTTP, or the bridge with a token | settings.json: "context_servers", "url" (docs) |
| Cline | Streamable HTTP | "type": "streamableHttp", "url" (without type it assumes SSE) (docs) |
| Continue, Goose, OpenCode, LM Studio | Streamable HTTP, or the bridge | see their MCP docs: Continue, Goose, OpenCode, LM Studio |
| Any stdio-only client | stdio | command ringbearer bridge <name> |
| Clients that only speak the old HTTP+SSE transport (2024-11-05) | HTTP+SSE | http://127.0.0.1:8802/servers/<name>/sse |
<url> is http://127.0.0.1:8802/servers/<name>/mcp. With a token, clients send Authorization: Bearer <token>; the snippets read it from the RINGBEARER_TOKEN environment variable of the client (${RINGBEARER_TOKEN}, ${env:RINGBEARER_TOKEN} or bearer_token_env_var, depending on the client), never from the file itself. The bridge reads RINGBEARER_TOKEN from its own environment, but a GUI app such as Claude Desktop usually does not pass your shell's variables on to it: give it -token-file <path> instead (the dashboard snippets do).
CI connects to a real relay with the official MCP SDK clients that most apps embed: the TypeScript SDK (Streamable HTTP and SSE) and the Python SDK (Streamable HTTP with initialize and with the 2026-07-28 server/discover, and SSE), each doing a handshake, tools/list and tools/call.
Not supported: cloud web apps such as claude.ai or ChatGPT connectors. They reach MCP servers from the vendor's cloud, not from your machine, so they need a public HTTPS URL with OAuth. ringbearer is a local relay with a bearer token: putting it on the internet would expose every server it runs, with your credentials. It does not implement OAuth.
Legacy SSE. /servers/<name>/sse serves the HTTP+SSE transport of protocol 2024-11-05: GET opens an event stream whose first endpoint event gives the URL to POST messages to, and the replies come back on the stream. It uses the same shared server, sessions and access checks as /mcp. A client that asks for 2024-11-05 or 2025-03-26 gets that version back. One SSE session serves at most 32 requests at a time; more get an error. Prefer /mcp whenever the client supports it.
Configuration
Where the files are
| Config | Logs | |
|---|---|---|
Portable layout: a relay.json exists next to the executable |
that file | logs/ next to the executable |
| Otherwise, Linux | ~/.config/ringbearer/relay.json |
~/.cache/ringbearer/logs |
| Otherwise, macOS | ~/Library/Application Support/ringbearer/relay.json |
~/Library/Caches/ringbearer/logs |
| Otherwise, Windows | %APPDATA%\ringbearer\relay.json |
%LOCALAPPDATA%\ringbearer\logs |
On Linux, XDG_CONFIG_HOME and XDG_CACHE_HOME are honored. -config and -logs override both. If the default config does not exist, it is created empty ({"mcpServers":{}}). An explicit -config that does not exist is an error.
In the logs folder: relay.log (the relay), <name>.log (each server's stderr), watch.log (the supervisor, run --supervise, on any OS) and supervisor.pid. Log files roll over at 5 MB, and one previous file is kept as .1.
Format
The mcpServers format of Claude Desktop and mcp-proxy. Only command-based (stdio) servers are supported: an entry with only a url has nothing to run.
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/projects"],
"env": { "NODE_OPTIONS": "--max-old-space-size=128" },
"idleTimeout": "15m"
},
"fetch": {
"command": "uvx",
"args": ["mcp-server-fetch"]
},
"old-experiment": {
"command": "node",
"args": ["./tools/experiment.js"],
"enabled": false
}
}
}
| Field | Meaning |
|---|---|
command |
Program to run. Relative paths are resolved against the folder of relay.json. |
args |
Arguments, as a list. |
env |
Variables added to the relay's own environment for this server. |
enabled |
false keeps the entry without running it. Default true. |
idleTimeout |
A Go duration such as "15m" or "1h30m" (at least 1s): start on first use, stop after that long without requests. Absent or "0": always running. See Saving RAM. |
${VAR} substitution. ${NAME} in command, args and env values is replaced with the variable from the relay's environment, so secrets can stay out of the file. If a variable is missing, that server does not start: the error appears as its last exit in the dashboard and in relay.log, and it is retried with a backoff. The other servers are not affected.
When installed as a service on Linux or macOS, the relay only gets your PATH: variables exported in .bashrc or .zshrc do not reach it. Put such values directly in the server's env, and keep relay.json readable only by you (chmod 600).
Hot reload. The file is checked every 2 seconds (or press Reload config in the dashboard). Only servers that were added, removed or changed are touched: a changed server restarts, the others keep running and keep their clients. A file that is not valid JSON is ignored as a whole and nothing changes. A single invalid entry (an idleTimeout that is not a duration of at least 1s, or the reserved name relay in any case) is skipped with a line in relay.log; if that server was running, it keeps its previous definition.
Commands and flags
ringbearer [run|install|uninstall|status] [flags]
ringbearer connect claude|codex|desktop [-only a,b] [-remove] [-dry-run]
ringbearer import desktop
ringbearer bridge [-addr host:port] [-tls-cert file] [-token-file file | -token-env VAR] <server>
ringbearer update [-tag vX.Y.Z]
ringbearer version
| Command | What it does |
|---|---|
run (or no command) |
Run the relay in the foreground. |
install |
Register the autostart for the current user with the given flags, start it, and wait until it answers. |
uninstall |
Stop the relay and remove the autostart. Config, logs and the binary stay. |
status |
Show whether the autostart is registered, the registered command line, whether the relay answers, and the config and log paths. Exits non-zero if not registered or not running. |
connect claude|codex |
Register the servers in Claude Code or Codex (see Quick start). |
connect desktop, import desktop |
Point Claude Desktop at the relay, and copy its own servers into the relay (see Claude Desktop). |
bridge <server> |
stdio to Streamable HTTP bridge to one relay server; what connect desktop registers. |
update |
Download the latest stable release from GitHub (or the release -tag vX.Y.Z, pre-releases included), check it against the release's checksums.txt. Without -tag, only a release newer than this binary is installed; before the first stable release, use -tag (for example -tag v0.1.0-rc2). The downloaded binary is never run before it is in place. Linux and macOS: replace this binary, keeping the previous one as ringbearer.old, restart the autostart if it runs this binary, and wait up to 10 s for it to answer; if it does not, it points at watch.log and prints how to put ringbearer.old back. Windows: a running program cannot replace itself, so it leaves the checked ringbearer.new.exe next to ringbearer.exe and prints the commands (cmd /c ..., for cmd.exe or PowerShell) that finish (end the task, copy the current exe to ringbearer.old.exe, move the file, run the task). |
version |
Print the version (-version and --version work too). |
Run install, uninstall and, on Linux and macOS, update from an ordinary terminal, not from a process the relay started (for example a shell MCP server): they stop the relay, and that process with it, halfway through. The same goes for the commands update prints on Windows.
Flags of run, install and status:
| Flag | Default | Meaning |
|---|---|---|
-addr |
127.0.0.1:8802 |
Listen address. Anything other than loopback requires a token. |
-config |
see Where the files are | Config file. |
-logs |
see Where the files are | Log folder. |
-token-file |
none | File holding the access token (must be chmod 600 on Unix). Every request except the dashboard page then needs Authorization: Bearer <token>. Required by install when the relay is reachable beyond this machine. |
-token-env |
RINGBEARER_TOKEN |
Environment variable holding the token, for ad-hoc runs. Without -token-file, the relay always reads this variable, so a set RINGBEARER_TOKEN turns the token on. The variable is removed from the servers' environment. Exclusive with -token-file. |
-allow-host |
none | Extra host name accepted in Host and Origin, for example the public name behind a reverse proxy. Repeatable. Requires a token. |
-tls-cert, -tls-key |
none | Serve HTTPS with this certificate and key (both or neither). The certificate is loaded once at startup. |
-read-only-config |
off | Forbid adding, editing and removing servers from the dashboard. Start, stop, restart and reload still work, and the file can still be edited on disk. |
-supervise (alias -watch) |
off | Run a supervisor that restarts the relay within about 1 s if it exits. This is what the autostart runs, on every OS. |
Dashboard
Open http://127.0.0.1:8802/ (the URL install and status print).
- Header: health, relay uptime, relay RAM, total RAM (the relay plus every running MCP server; memory pages shared between processes are counted once per process, so it is slightly overestimated), total sessions, and buttons for Connect a client, Relay log, Reload config and Add server.
- One card per server: state (running, idle, starting, crashed, stopped), sessions, requests in flight, calls, restarts, uptime, and RAM and CPU of the server's whole process tree with a 5-minute history. Buttons: Restart, Stop, Start.
- Details panel (click a server name): its MCP endpoint URL with a copy button, the last exit, calls per method, and a live tail of its log.
- Activity: who calls what, live. Each request shows its time, client (Claude Code, Codex, ... with a stable color), server, tool, prompt or resource, duration and status (
ok,error <code>,tool error,cancelled). Filter by client and by server; a summary gives calls, errors and share per client since the relay started. The client is theclientInfoname the client sends (through the bridge too, which passes on the real client'sinitialize), else itsUser-Agent. Arguments and results are never recorded, and a resource URI loses its user info and query. The relay keeps the last 500 calls in memory only (GET /admin/calls?since=<seq>), and per-client counters per server in/admin/status. - Connect a client: the configuration snippet or command for each client, with this relay's real URLs (see Works with).
- Add, edit, remove servers in a form (name, command, arguments, environment, enabled, idle timeout). Disabled servers are listed separately so they can be enabled again. Names added from the dashboard are 1 to 64 characters among
A-Z a-z 0-9 . _ -(starting with a letter or digit) and unique regardless of case;relayis reserved. - Saving rewrites
relay.jsonatomically, keeps the previous version asrelay.json.bak, and refuses a file the relay could not load. Keys come out sorted, and keys the dashboard does not know are kept. On Unix, both files are0600after an edit. Arelay.jsonthat is a symlink stays one: the target is replaced, and the.bakgoes next to the target. - Secrets in the form:
commandandargsare returned in clear, so put secrets inenvas${VAR}references. An environment value is shown only if it is exactly one${VAR}; any other value is never sent back by the API: it shows as•••• (unchanged)and is kept if you leave it empty. This hides values from casual viewing, but it is not a barrier against someone who can edit the config (they can change the command). The real barrier is the access checks: a token when the relay is exposed, and-read-only-configif you want the dashboard to stay read-only.
With a token, the page loads without it (it contains no data) and asks for it: press Enter token and paste it. It is kept in that browser tab only (sessionStorage). A link ending in #token=<token> also works and is removed from the address bar right away, but the token may still end up in your browser or shell history, so pasting it is the better habit.
Saving RAM
Idle servers
Set idleTimeout on a server (for example "15m"):
-
It does not start with the relay. The first request that needs it starts it.
-
It stops once no request has arrived for that long and none is in flight. Open client sessions and streams do not keep it alive: the relay keeps them, and the next request starts a fresh child initialized with the same parameters.
-
While it sleeps, the relay answers from memory without waking it:
- new sessions (
initialize, andserver/discoverfor 2026-07-28 clients), from the cachedinitializeresult; - un-paginated
tools/list,prompts/list,resources/list,resources/templates/listandskills/list, from the child's last answer; - pings.
So opening a new Claude Code or Codex session does not wake every sleeping server.
- new sessions (
-
What wakes it: any other request (a tool call, a resource read, a prompt, a paginated list or a list it has never answered), and Start in the dashboard. These caches live in memory only: right after the relay starts, the first session still starts each server once. A list cache is dropped when the server sends a
list_changednotification, when it crashes or is restarted, and when its definition changes. -
When a server wakes up (or restarts), connected clients get
list_changednotifications for its tools, prompts and resources, so they re-list in case anything changed.
Stateful servers: a server that keeps state in memory between calls (an open browser, a "plan then apply" workflow, an in-memory cache) loses it at each idle stop. Leave idleTimeout off for those.
Per-server runtime limits
Many servers run on Node.js, Python or .NET, whose default heap sizes are generous. You can cap them per server through env. These are tips, not guarantees: how much a server really needs depends on the server, and too low a cap makes it crash (it is then restarted, see the dashboard's restart count).
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/projects"],
"env": { "NODE_OPTIONS": "--max-old-space-size=128" }
}
- Node.js:
NODE_OPTIONS=--max-old-space-size=<MB>. - .NET:
DOTNET_GCHeapHardLimit=<bytes, in hexadecimal>(for example0x10000000for 256 MB).
The dashboard's RAM column (whole process tree) tells you which servers are worth tuning.
Security model
ringbearer can start any command written in its config, and the dashboard can edit that config. Whoever can change the config can run programs as you. Everything below follows from that.
- Loopback by default. It listens on
127.0.0.1:8802. It refuses to listen on any other address without a token. - Browser attacks are blocked. Every request's
Hostmust belocalhost,127.0.0.1,::1, the listen host or an-allow-hostname, which stops DNS rebinding. A browserOriginmust match the same list, which stops cross-site requests. Admin changes also require anX-Ringbearer: 1header, and MCP posts requireContent-Type: application/json: a web page cannot send either without a CORS preflight, which ringbearer never approves. - Token. With
-token-file(or theRINGBEARER_TOKENvariable), every request except the static dashboard page needsAuthorization: Bearer <token>. A token is required for any non-loopback address and for-allow-host. Keep the filechmod 600; ringbearer refuses a token file other users can read (on Unix). Clients registered byconnectread the token fromRINGBEARER_TOKEN(or the-token-envname) in their own environment. - On loopback without a token, local processes are trusted. The checks above stop web pages, not programs running on your machine. On a shared machine, use a token, and consider
-read-only-config. - TLS is optional (
-tls-cert,-tls-key). Alternatively, put a reverse proxy in front that terminates TLS, and start ringbearer with-allow-host <public name>and-token-file(Streamable HTTP clients only: the Claude Desktop bridge does not go through such a proxy). - Secrets. Environment values are never returned by the admin API, except exact
${VAR}references, and the status API never includes server definitions. This does not protect a secret from someone who can edit the config: they can run a command that prints it. - One relay = one identity. Every client connected to a relay uses the same server processes with the same credentials (tokens in
env, logged-in sessions, file access). Run one relay per user or trust boundary. - Servers that need per-client context are not a fit. A shared child cannot know which client a request comes from, so client capabilities
roots,samplingandelicitationare not offered to it, and its requests for them are refused. Run such servers directly in each client.
To report a vulnerability, see SECURITY.md.
Verifying downloads and code signing
Today, release binaries are not code-signed. From v0.1.0 on, every release archive has a GitHub build attestation (see below). Every release archive is listed with its SHA-256 in the release's checksums.txt (the install scripts and ringbearer update check it for you). To check a manual download, put the archive and checksums.txt in one folder:
sha256sum -c checksums.txt --ignore-missing # Linux
shasum -a 256 -c checksums.txt 2>&1 | grep ': OK$' # macOS: the line of your archive must say OK
(Get-FileHash .\ringbearer_0.1.0-rc2_windows_amd64.zip -Algorithm SHA256).Hash # compare with its line in checksums.txt
checksums.txt comes from the same release as the archives, so a match only proves the download is not corrupted. It does not protect against a compromised release or account.
Build attestations (v0.1.0 and later): each archive and checksums.txt carries a GitHub artifact attestation (Sigstore build provenance) proving it was built by this repository's release workflow from the tagged commit. Check one with the GitHub CLI:
gh attestation verify ringbearer_0.1.0_windows_amd64.zip --repo Unax2710/ringbearer \
--signer-workflow Unax2710/ringbearer/.github/workflows/release.yml --source-ref refs/tags/v0.1.0
Planned:
- Windows Authenticode signing through SignPath Foundation (free code signing for open source): the application is pending. Signed releases will say so on their release page, with SignPath's credit.
Windows SmartScreen may warn the first time you run an unsigned ringbearer.exe: choose More info, then Run anyway, if you trust the file you checked. Even signed programs only stop getting this warning once they have built up reputation over time.
Managed or corporate machines: endpoint security (EDR, antivirus) may block or quarantine any unsigned program that starts at logon. Prefer the manual archive install there, and ask your IT team to allowlist ringbearer (by path or file hash today, by certificate once releases are signed). Never try to bypass endpoint security.
Code signing policy
Who can approve signing, how releases are built, and the privacy statement are in the code signing policy. In short: releases are built by GitHub Actions with GoReleaser from the tagged commit, and the program sends nothing to other networked systems unless you ask it to (it talks to the MCP servers you configure, and to GitHub when you run ringbearer update).
Limitations and FAQ
- Roots, sampling, elicitation are not forwarded to shared servers (see above). A filesystem server that relies on the client's roots should be configured with explicit paths in
args, or run directly. - A request in flight when its server crashes fails with an error. It is never replayed, since it may already have had an effect.
- Codex per-tool settings: when
connect codexreplaces an existing entry with the same name but a different URL or token variable, Codex drops its per-tool settings ([mcp_servers.<name>.tools.*]).connectsays so, and skips entries that are already identical. - macOS: if the relay itself is killed with
SIGKILL, its servers are not killed with it; most MCP servers exit on their own when their stdin closes. On Linux, the kernel kills the direct child; a process it started (for example thenodestarted bynpx) also exits when its stdin closes. - Windows: a supervisor killed by hand (Task Manager,
taskkill) is not restarted before the next logon; runringbearer installagain to start it now. - Linux and macOS services only get your
PATH(see Configuration). - JSON-RPC batches (removed from MCP in 2025-06-18) are refused.
- Updating:
ringbearer update(see Commands and flags). It keeps the registered flags. You can also replace the binary yourself with the install scripts. On Windows, runschtasks /End /TN ringbearerfirst (the script refuses to overwrite a runningringbearer.exe) andschtasks /Run /TN ringbearerafter; with either way, quit Claude Desktop first if it uses the bridge, since each bridge runs from the sameringbearer.exe; on Linux and macOS, runringbearer installagain with all the flags it was installed with (ringbearer statusshows them). Coming from 0.1.0-rc1, runringbearer installagain in any case: the autostart changed (see CHANGELOG.md). - Uninstalling:
ringbearer connect claude -remove,ringbearer connect codex -removeandringbearer connect desktop -remove(do this first:connectreads the installed relay's settings);ringbearer uninstall;- delete the binary, and if you want, the config and logs folders (paths shown by
ringbearer status). On Windows, also remove%LOCALAPPDATA%\Programs\ringbearerfrom your userPathifinstall.ps1added it.
Why not X?
Other projects solve related problems. As of 2026-11:
| Project | What it is | Difference from ringbearer |
|---|---|---|
| mcp-proxy (Python) | Exposes stdio servers over HTTP | In our tests with v0.15.0 (Windows): the whole proxy stopped when one child died, and MCP extensions capabilities were not passed through (skills/list rejected with -32602) |
| mcpmu (Go) | Shares one child per server by default | From reading its code: aggregates servers behind one endpoint; unknown JSON-RPC methods return method-not-found; no automatic restart of crashed children found; no OS service install |
| mcp-mux (Go) | Shares children, with an idle timeout, through a stdio shim and a daemon | Clients go through its stdio shim; ringbearer clients connect over Streamable HTTP |
| MetaMCP (TypeScript) | Aggregator with an admin UI | Archived on 2026-11-12; lists 2-4 GB of RAM as a requirement |
| IBM ContextForge (Python) | Enterprise MCP gateway | A larger system aimed at organizations; ringbearer is a single binary for one user's machine |
If one of them fits your setup better, use it.
Building from source
Requires Go 1.27 or later. No third-party dependencies.
git clone https://github.com/Unax2710/ringbearer
cd ringbearer
go build # ringbearer, or ringbearer.exe
go vet ./... && go test ./...
On Windows, add -ldflags "-H windowsgui" to get the release behavior (no console window at logon; command output still goes to the terminal you run it from). Release builds also set the version with -X main.version=<version>; other builds report dev.