mcp-use
Version:
A utility library for integrating Model Context Protocol (MCP) with LangChain, Zod, and related tools. Provides helpers for schema conversion, event streaming, and SDK usage.
29 lines • 1.28 kB
TypeScript
import type { StreamableHTTPClientTransportOptions } from '@modelcontextprotocol/sdk/client/streamableHttp.js';
import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';
import { ConnectionManager } from './base.js';
export declare class StreamableHttpConnectionManager extends ConnectionManager<StreamableHTTPClientTransport> {
private readonly url;
private readonly opts?;
private _transport;
/**
* Create a Streamable HTTP connection manager.
*
* @param url The HTTP endpoint URL.
* @param opts Optional transport options (auth, headers, etc.).
*/
constructor(url: string | URL, opts?: StreamableHTTPClientTransportOptions);
/**
* Spawn a new `StreamableHTTPClientTransport` and return it.
* The Client.connect() method will handle starting the transport.
*/
protected establishConnection(): Promise<StreamableHTTPClientTransport>;
/**
* Close the underlying transport and clean up resources.
*/
protected closeConnection(_connection: StreamableHTTPClientTransport): Promise<void>;
/**
* Get the session ID from the transport if available.
*/
get sessionId(): string | undefined;
}
//# sourceMappingURL=streamable_http.d.ts.map