Could stdio MCP servers start only on tool calls and exit immediately after?

gelembjuk · reddit · 2026-07-24

The post proposes making stdio MCP servers ephemeral instead of persistent: start them only when a tool is called, let them advertise tools, handle the request, and exit.

The author argues that most MCP servers are stateless wrappers around APIs, so keeping 15+ processes resident wastes memory for little benefit. The tradeoff is a small startup delay, but the LLM call itself is usually the bottleneck. The main implementation caveat is that AI harness libraries would need to support this lifecycle.

Related event: On-Demand MCP Server Startup Saves Hundreds of MB of RAM(2 posts)→

Original post →

More from coding & agent

coding & agent channel →