From b1ef69b22929d96f258ac34c49a652608244737a Mon Sep 17 00:00:00 2001 From: Aaron Queen Date: Fri, 9 Oct 2026 20:35:26 -0600 Subject: [PATCH 1/2] docs(mcp-relay): list the memory each launch command costs npx -y swarmail-mcp keeps about 180 MiB running per client, mostly the npm exec process. bunx --bun runs the same script under Bun in about 46 MiB; bunx alone still runs Node because of the script's shebang. Measured on one Linux machine with the relay idle after a first request. --- CHANGELOG.md | 3 +++ packages/mcp-relay/README.md | 16 ++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a3bdaef..bbacb39 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,9 @@ Notable changes to Swarmail. Versions follow [semantic versioning](https://semve which is the default. A page of 20 messages took 48 µs instead of 57 µs with 2 KB bodies and 52 µs instead of 82 µs with 17 KB bodies. +- The `swarmail-mcp` README lists the memory each launch command costs: about 180 MiB for `npx -y swarmail-mcp`, 82 MiB + for `bunx swarmail-mcp` and 46 MiB for `bunx --bun swarmail-mcp`, which runs the same relay under Bun. + ## 0.5.2 - 2026-10-09 - Require agents to record whole-session closeouts and retire their own project diff --git a/packages/mcp-relay/README.md b/packages/mcp-relay/README.md index 8e3c851..a5910e1 100644 --- a/packages/mcp-relay/README.md +++ b/packages/mcp-relay/README.md @@ -17,3 +17,19 @@ It forwards each JSON-RPC message to `SWARMAIL_URL` (default `http://127.0.0.1:18765/mcp/`). Node 18 or newer, no dependencies. Hosts that support MCP over HTTP can skip the relay and use that URL directly, which is what `scripts/configure-mcp.ts` sets up. + +## Memory + +Each MCP client that launches the relay keeps its own process tree running. +On one Linux machine, with the relay idle after a first request: + +| Command | Memory, whole process tree | +| ------------------------- | -------------------------- | +| `npx -y swarmail-mcp` | about 180 MiB | +| `bunx swarmail-mcp` | about 82 MiB | +| `bunx --bun swarmail-mcp` | about 46 MiB | + +Most of the `npx` figure is the `npm exec` process that stays running beside +the relay. `bunx` alone still runs the relay under Node, because the script's +`#!/usr/bin/env node` line wins; `--bun` runs it under Bun. Both runtimes pass +the same relay tests. Use `--bun` only where Bun is installed. From 9321a5ad7bf25f972fff1ad92ea1830524eefc11 Mon Sep 17 00:00:00 2001 From: Aaron Queen Date: Fri, 9 Oct 2026 20:41:30 -0600 Subject: [PATCH 2/2] docs(mcp-relay): say the repository's relay tests run under Node only --- packages/mcp-relay/README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/mcp-relay/README.md b/packages/mcp-relay/README.md index a5910e1..169032e 100644 --- a/packages/mcp-relay/README.md +++ b/packages/mcp-relay/README.md @@ -31,5 +31,7 @@ On one Linux machine, with the relay idle after a first request: Most of the `npx` figure is the `npm exec` process that stays running beside the relay. `bunx` alone still runs the relay under Node, because the script's -`#!/usr/bin/env node` line wins; `--bun` runs it under Bun. Both runtimes pass -the same relay tests. Use `--bun` only where Bun is installed. +`#!/usr/bin/env node` line wins; `--bun` runs it under Bun. The relay is plain +JavaScript with no dependencies, so it runs unchanged under Bun, but the +repository's relay tests run it under Node only. Use `--bun` only where Bun is +installed.