Skip to the content.

ADR-0001 — stdio is the only transport

Context

MCP defines two standard transport bindings: stdio (newline-delimited JSON-RPC over a client-launched subprocess) and Streamable HTTP (POST per message, SSE or JSON reply). This SDK is written in Bash, so the question is not “which is better” but “which one can a shell script actually honour to the letter.”

Spike 01 measured the stdio path end-to-end rather than guessing:

Streamable HTTP, by contrast, would require in Bash: a socket listener (no socat on a default macOS box; BSD nc cannot fork per connection), correct SSE framing with keep-alive comments, Origin validation, and byte-exact Mcp-Method / Mcp-Name / Mcp-Param-* header↔body validation including the =?base64?…?= sentinel decoding — each a spec MUST whose violation is a 400 or a DNS-rebinding hole.

Decision

Implement the stdio binding only. No HTTP endpoint, no SSE, no listener process. A deployment that needs HTTP fronts this server with a real HTTP server (mcp-proxy, a reverse proxy, an inetd-style wrapper) rather than growing one inside the shell.

Consequences

Good

Bad / accepted

Alternatives considered