UNPKG

@toolprint/hypertool-mcp

Version:

HyperTool MCP proxy server for routing requests between clients and multiple underlying MCP servers

63 lines • 1.84 kB
/** * HTTP client implementation for MCP servers using official MCP SDK */ import { Client } from "@modelcontextprotocol/sdk/client/index.js"; import { ListToolsResult, CallToolRequest } from "@modelcontextprotocol/sdk/types.js"; import { EventEmitter } from "events"; import { HttpServerConfig } from "../../types/config.js"; import { ConnectionOptions } from "../types.js"; import { BaseConnection } from "./base.js"; /** * HTTP client wrapper using proper MCP SDK Client */ export declare class HttpClient extends EventEmitter { private config; private client; private isConnected; constructor(config: HttpServerConfig); get url(): string; /** * Connect to the HTTP server using SDK Client */ connect(): Promise<void>; /** * Disconnect from the HTTP server */ disconnect(): Promise<void>; /** * List tools from the MCP server */ listTools(): Promise<ListToolsResult>; /** * Call a tool on the MCP server */ callTool(params: CallToolRequest["params"]): Promise<any>; /** * Ping the server to check if it's responsive */ ping(): Promise<boolean>; /** * Get the SDK client instance for advanced operations */ get sdkClient(): Client | null; } /** * HTTP connection implementation */ export declare class HttpConnection extends BaseConnection<HttpClient> { protected _client: HttpClient | null; constructor(serverName: string, config: HttpServerConfig, options?: ConnectionOptions); /** * Connect to the HTTP server */ protected doConnect(): Promise<void>; /** * Disconnect from the HTTP server */ protected doDisconnect(): Promise<void>; /** * Ping the HTTP server */ protected doPing(): Promise<boolean>; } //# sourceMappingURL=http.d.ts.map