UNPKG

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.

18 lines 763 B
import WS from 'ws'; import { ConnectionManager } from './base.js'; export type IWebSocket = WS; export declare class WebSocketConnectionManager extends ConnectionManager<IWebSocket> { private readonly url; private readonly headers; private _ws; /** * @param url The WebSocket URL to connect to. * @param headers Optional headers to include in the connection handshake. */ constructor(url: string, headers?: Record<string, string>); /** Establish a WebSocket connection and wait until it is open. */ protected establishConnection(): Promise<IWebSocket>; /** Cleanly close the WebSocket connection. */ protected closeConnection(connection: IWebSocket): Promise<void>; } //# sourceMappingURL=websocket.d.ts.map