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..169032e 100644 --- a/packages/mcp-relay/README.md +++ b/packages/mcp-relay/README.md @@ -17,3 +17,21 @@ 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. 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.