AxMCPHTTPSSETransport Generated TypeScript API reference. typescript api api/reference build/apidocs/Class.AxMCPHTTPSSETransport.md class AxMCPHTTPSSETransport

AxMCPHTTPSSETransport

Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/mcp/transports/sseTransport.ts#L13

Implements

Constructors

Constructor

TypeScript
new AxMCPHTTPSSETransport(sseUrl: string, options: Readonly<AxMCPStreamableHTTPTransportOptions>): AxMCPHTTPSSETransport;

Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/mcp/transports/sseTransport.ts#L33

Parameters

ParameterType
sseUrlstring
optionsReadonly<AxMCPStreamableHTTPTransportOptions>

Returns

AxMCPHTTPSSETransport

Methods

close()

TypeScript
close(): void;

Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/mcp/transports/sseTransport.ts#L329

Releases transport resources. Implementations should be idempotent.

Returns

void

Implementation of

AxMCPTransport.close


connect()

TypeScript
connect(): Promise<void>;

Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/mcp/transports/sseTransport.ts#L189

Connects to the transport if needed This method is optional and only required for transports that need connection setup

Returns

Promise<void>

Implementation of

AxMCPTransport.connect


send()

TypeScript
send(message: Readonly<AxMCPJSONRPCRequest<unknown>>): Promise<AxMCPJSONRPCResponse<unknown>>;

Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/mcp/transports/sseTransport.ts#L202

Sends a JSON-RPC request or notification and returns the response

Parameters

ParameterTypeDescription
messageReadonly<AxMCPJSONRPCRequest<unknown>>The JSON-RPC request or notification to send

Returns

Promise<AxMCPJSONRPCResponse<unknown>>

A Promise that resolves to the JSON-RPC response

Implementation of

AxMCPTransport.send


sendNotification()

TypeScript
sendNotification(message: Readonly<AxMCPJSONRPCNotification>): Promise<void>;

Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/mcp/transports/sseTransport.ts#L258

Sends a JSON-RPC notification

Parameters

ParameterTypeDescription
messageReadonly<AxMCPJSONRPCNotification>The JSON-RPC notification to send

Returns

Promise<void>

Implementation of

AxMCPTransport.sendNotification


sendResponse()

TypeScript
sendResponse(message: Readonly<AxMCPJSONRPCResponse>): Promise<void>;

Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/mcp/transports/sseTransport.ts#L298

Sends a JSON-RPC response for a server-initiated request. Transports that cannot receive server requests do not need to implement it.

Parameters

ParameterType
messageReadonly<AxMCPJSONRPCResponse>

Returns

Promise<void>

Implementation of

AxMCPTransport.sendResponse


setMessageHandler()

TypeScript
setMessageHandler(handler: (message: Readonly<AxMCPJSONRPCMessage>) => void | Promise<void>): void;

Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/mcp/transports/sseTransport.ts#L73

Registers a handler for server-initiated JSON-RPC requests and notifications that arrive outside a direct client request response.

Parameters

ParameterType
handler(message: Readonly<AxMCPJSONRPCMessage>) => void | Promise<void>

Returns

void

Implementation of

AxMCPTransport.setMessageHandler


startListening()

TypeScript
startListening(): Promise<AxMCPListeningHandle>;

Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/mcp/transports/sseTransport.ts#L194

Starts a nonblocking server-message listener when the transport needs one.

Returns

Promise<AxMCPListeningHandle>

Implementation of

AxMCPTransport.startListening

Docs