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.
33 lines • 1.13 kB
TypeScript
import type { ConnectorInitOptions } from './base.js';
import { BaseConnector } from './base.js';
export interface HttpConnectorOptions extends ConnectorInitOptions {
authToken?: string;
headers?: Record<string, string>;
timeout?: number;
sseReadTimeout?: number;
clientInfo?: {
name: string;
version: string;
};
preferSse?: boolean;
}
export declare class HttpConnector extends BaseConnector {
private readonly baseUrl;
private readonly headers;
private readonly timeout;
private readonly sseReadTimeout;
private readonly clientInfo;
private readonly preferSse;
private transportType;
constructor(baseUrl: string, opts?: HttpConnectorOptions);
/** Establish connection to the MCP implementation via HTTP (streamable or SSE). */
connect(): Promise<void>;
private connectWithStreamableHttp;
private connectWithSse;
get publicIdentifier(): Record<string, string>;
/**
* Get the transport type being used (streamable-http or sse)
*/
getTransportType(): 'streamable-http' | 'sse' | null;
}
//# sourceMappingURL=http.d.ts.map