basalt / mcp/src / HttpClientTransport
Class: HttpClientTransport
Defined in: mcp/src/client.ts:22
Talk to a remote MCP server over HTTP (the Streamable-HTTP JSON path). It keeps the Mcp-Session-Id the server issues on initialize and sends it on every later request; close() ends the session (DELETE). A 404 for the session (expired, evicted) drops it — connect() again to open a new one.
Implements
Constructors
Constructor
> new HttpClientTransport(url, options?): HttpClientTransport
Defined in: mcp/src/client.ts:25
Parameters
url
string
options?
headers?
Record<string, string>
Returns
HttpClientTransport
Accessors
sessionId
Get Signature
> get sessionId(): string | undefined
Defined in: mcp/src/client.ts:31
The current session id, when the server issued one.
Returns
string | undefined
Methods
close()
> close(): Promise<void>
Defined in: mcp/src/client.ts:54
Returns
Promise<void>
Implementation of
send()
> send(message): Promise<JsonRpcResponse | null>
Defined in: mcp/src/client.ts:35
Parameters
message
Returns
Promise<JsonRpcResponse | null>