Structural shape of an MCP transport the server can connect to.
Matches @modelcontextprotocol/sdk/shared/transport.js Transport without
importing it — keeping the SDK type off our public API surface.
StreamableHTTPServerTransport, StdioServerTransport, and
InMemoryTransport from the SDK all satisfy this shape.
message / callback parameters are typed with any (not unknown) so
SDK-specific transports with narrower message types (JSONRPCMessage) are
assignable bi-directionally without forcing downstream consumers to
widen their own transport types.
Structural shape of an MCP transport the server can connect to.
Matches
@modelcontextprotocol/sdk/shared/transport.jsTransport without importing it — keeping the SDK type off our public API surface.StreamableHTTPServerTransport,StdioServerTransport, andInMemoryTransportfrom the SDK all satisfy this shape.message/ callback parameters are typed withany(notunknown) so SDK-specific transports with narrower message types (JSONRPCMessage) are assignable bi-directionally without forcing downstream consumers to widen their own transport types.