mcp-use
Version:
Opinionated MCP Framework for TypeScript (@modelcontextprotocol/sdk compatible) - Build MCP Agents, Clients and Servers with support for ChatGPT Apps, Code Mode, OAuth, Notifications, Sampling, Observability and more.
36 lines • 1.24 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;
disableSseFallback?: 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 readonly disableSseFallback;
private transportType;
private streamableTransport;
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