v0.4.0 · Interface
client-handler
Client-side MCP request/response handler interface
This interface defines the contract for processing MCP protocol messages on the client side.
Components implementing this interface receive server requests, process them, and return
client responses. They also handle bidirectional communication through responses and notifications.
This mirrors server-handler but processes server-initiated messages.
Type Aliases
T
server-context
TServer context passed to client handlers
error-code
TStandard JSON-RPC error codes
request-id
TJSON-RPC request identifier
client-response
TClient responses (to server requests)
server-request
TServer requests (sent to client)
server-response
TServer responses (to client requests)
server-notification
TServer notifications (sent to client)
output-stream
An output bytestream.