Namespace Nexus\Mcp\Core\Transport

Classes
InMemoryTransport

In-process JSON-RPC duplex between two TransportInterface instances. Each side's send() becomes the other side's inbound message. Pre-start inbound envelopes queue and drain on start(). close() cascades to the peer.

ReceiveContext

Transport-supplied context accompanying an inbound JSON-RPC message.

SendContext

Per-call context accompanying an outbound JSON-RPC message on a transport.

Interfaces
CancellableTransportInterface

A transport that can observe a peer abandoning an in-flight request without saying so in a message, such as an SSE consumer closing its stream.

ParameterHeaderMirroringInterface

Marks a transport that mirrors x-mcp-header tool parameters into request headers. The obligations the spec places on a client only bind on such a transport: it must exclude a tool whose declarations violate the scanner constraints from its tools/list result, and it must mirror the annotated arguments of a tools/call into Mcp-Param-{Name} headers. A transport without the marker (stdio) may ignore the annotations entirely, so the client leaves its tool listing untouched.

ReconnectingTransportInterface

A transport that replaces its own connection in place, so the peer a caller writes to may be a different one from the peer it wrote to a moment ago.

SubscriptionInterface

Opaque handle returned by transport listener registrations.

SupervisableTransportInterface

A transport whose peer runs as a process it owns, and which reports that the peer stopped serving without the shutdown having been requested.

TransportInterface

Bidirectional JSON-RPC envelope duplex between this SDK and a connected peer. - Listeners fire in registration order.

  • A throw aborts the chain.
  • A dispose mid-dispatch applies on the next emit.
Enums
TransportState

Lifecycle state of a TransportInterface instance.