Expand description
One command line for the three MCP transports.
Every server in the suite is started the same way:
<server> # stdio, for a client that spawns it
<server> --transport streamable-http # HTTP on 127.0.0.1:8000, path /mcp
<server> --transport sse --port 8001 # the older HTTP+SSE transportOver streamable HTTP the SDK speaks both current protocol revisions
on one endpoint: 2026-07-28 (stateless, server/discover,
per-request _meta) and 2025-11-25 (initialize handshake,
Mcp-Session-Id). Responses stream as server-sent events; a GET
on the same path opens the server-to-client event stream.
--transport sse serves the 2024-11-05 HTTP+SSE transport for
clients that still expect it: GET /sse opens the event stream,
whose first event names the /messages/?sessionId=... endpoint the
client posts to.
The listener binds the loopback interface unless told otherwise. There is no authentication here: put the server behind a gateway you trust before binding a routable address.
This module (transport.rs and transport/) depends only on the
SDK and on a [ServerHandler] passed in, so it is copied verbatim
into every Rust server of the suite. Nothing in it knows what the
tools are.
Structs§
- Options
- What the command line asked for.
Enums§
Constants§
- DEFAULT_
HOST - Where the listeners bind unless told otherwise.
- DEFAULT_
PORT - The port the HTTP transports listen on unless told otherwise.
- MESSAGE_
PATH - Where the legacy transport’s client messages are posted.
- SSE_
PATH - Where the legacy transport’s event stream is opened.
- STREAMABLE_
HTTP_ PATH - The streamable HTTP endpoint.