Native transports for MCP 2026-07-28 servers: stdio and streamable HTTP with SSE.
Dependencies
moon add marianoguerra/mcp-server-nativeasync fn main {
@transport_stdio.serve(build_server())
}async fn main {
@transport_http.serve(build_server(), "127.0.0.1:3200", allowed_origins=["https://app.example.com"])
}| GET / DELETE | 405 Method Not Allowed — they were the session verbs of earlier revisions |
| notification POST | 202 Accepted, no body |
| unimplemented method | 404 with a JSON-RPC -32601 body, which is what distinguishes it from a legacy server that does not host the endpoint at all |
| ladder rejections | 400 with -32020 / -32021 / -32022 / -32602 |
| in-band errors | 200 — an unknown tool is not a malformed request |
| Origin | validated against allowed_origins, 403 otherwise |
| SSE | X-Accel-Buffering: no, and flushed per event, so a proxy cannot batch a progress stream into one slow response |
| Mcp-Session-Id, Last-Event-ID | ignored, as the revision requires |
Native transports for MCP 2026-07-28 servers: stdio and streamable HTTP with SSE.
Dependencies