UNPKG

@kya-os/mcp-i

Version:

The TypeScript MCP framework with identity features built-in

26 lines (25 loc) 786 B
import { IncomingMessage, ServerResponse } from "http"; export interface HttpTransportOptions { port?: number; host?: string; endpoint?: string; bodySizeLimit?: string; debug?: boolean; } export interface JsonRpcMessage { jsonrpc: string; method?: string; params?: any; id?: string | number | null; result?: any; error?: any; } export declare abstract class BaseHttpServerTransport { onmessage?: (message: JsonRpcMessage) => void; onerror?: (error: Error) => void; onclose?: () => void; abstract start(): Promise<void>; abstract close(): Promise<void>; abstract send(message: JsonRpcMessage): Promise<void>; abstract handleRequest(req: IncomingMessage, res: ServerResponse, parsedBody?: unknown): Promise<void>; }