PRODUCTION SCENARIO
A team wants a repo-indexing MCP server that runs on each developer's workstation, one client per machine. Claude Code should start it, talk to it and shut it down, with no separate process for the developer to start and no service for anyone to deploy. The index is rebuilt from the working tree each time the server launches, so nothing has to survive between sessions.
Which transport fits that requirement?
Answering here is anonymous. Nothing is saved unless you sign in.
Show answer and explanation
Answer: stdio, with the client launching the server as a subprocess over its own streams
stdio is defined as the client launching the server as a subprocess and exchanging newline-delimited JSON-RPC over its standard streams, which is the lifecycle described: Claude Code starts it, talks to it, and closes its input to shut it down. A localhost HTTP server is the right call when several clients share one server or it has to outlive a session, and it is a process someone must start and supervise. Behind a reverse proxy it becomes shared infrastructure with a deployment and credentials, which suits a central index. A Unix socket reusing the same framing is blessed by the specification for reaching a long-lived local daemon, and there is no daemon here to reach.