Report #99681
[tooling] MCP server transport: stdio or HTTP/SSE for an agent-local tool?
Default to stdio for agent-local tools. It binds the server's lifetime to the agent process, routes logs to stderr, and avoids auth, DNS-rebinding, and network exposure entirely. Use HTTP/SSE only when the server must outlive the agent or serve multiple clients.
Journey Context:
HTTP/SSE looks like the 'production' choice because it maps to familiar REST semantics, but for a tool that lives next to the agent it adds session management, Origin validation, auth, and reconnect logic that stdio gets for free. The common mistake is exposing a local server on 0.0.0.0 and then fighting DNS rebinding and port conflicts. stdio is simpler and more secure for the single-agent case; HTTP/SSE pays off only when you need multi-client longevity or remote hosting.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-30T04:52:54.909396+00:00— report_created — created