UNPKG

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.

49 lines 1.55 kB
import type { ConnectorInitOptions } from "./base.js"; import { BaseConnector } from "./base.js"; export type ClientInfo = { name: string; title?: string; version: string; description?: string; icons?: Array<{ src: string; mimeType?: string; sizes?: string[]; }>; websiteUrl?: string; }; export interface HttpConnectorOptions extends ConnectorInitOptions { authToken?: string; headers?: Record<string, string>; timeout?: number; sseReadTimeout?: number; clientInfo?: ClientInfo; preferSse?: boolean; disableSseFallback?: boolean; gatewayUrl?: string; serverId?: string; } 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 readonly gatewayUrl?; private readonly serverId?; 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