Astral's Charlie Marsh: lazy-started, cross-thread cached MCP servers cut 30 processes to 3
charliermarsh · x · 2026-12-01
Charlie Marsh (Ruff/Astral) shares an MCP engineering optimization: cache the server list across threads and start servers lazily, only when the model first invokes one of their tools.
With three sharing-capable MCP servers and ten threads, this cuts spawned processes from 30 to 3. Even stateful MCPs without sharing support benefit — e.g., an installed Playwright MCP is no longer eagerly spawned on every thread; a single cached copy starts, with subsequent copies created lazily.
Related event: Codex Cuts MCP Processes from 30 to 3 with Caching and Lazy Startup(2 posts)→
More from coding & agent
- LangChain CEO Amplifies Debate: Do Agents Need Granular RBAC-Style Permissions? — hwchase17 · 2026-12-01
- Codex now caches MCP tool lists across threads and lazily starts servers — charliermarsh · 2026-12-01
- Codex app server cuts memory 25% at P50 and 40% at P95 — charliermarsh · 2026-12-01
- Full AI workflow tours Middle-earth: 3D blockout, Magnific MCP, Seedance video — techhalla · 2026-12-01
- Sentry to open-source its in-house MCP feedback tool with trace-connected user feedback — zeeg · 2026-12-01
- Microsoft CTO open-sources Demo Simulator: prerecorded demos with pause-and-Q&A control — WirelessLife · 2026-12-01