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
ProtocolVersionAwareInterface

Implemented by transports that need the negotiated MCP protocol version after the initialize handshake.

SubscriptionInterface

Opaque handle returned by transport listener registrations.

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.