/** * MCP Server types — JSON-RPC 2.0 based Model Context Protocol */ export interface MCPServerConfig { name: string; version: string; tools?: MCPServerToolDefinition[]; resources?: MCPResourceDefinition[]; prompts?: MCPPromptDefinition[]; } export interface MCPServerToolDefinition { name: string; description: string; inputSchema: Record; handler: (args: any) => Promise; } export interface MCPResourceDefinition { uri: string; name: string; description?: string; mimeType?: string; handler: () => Promise; } export interface MCPPromptDefinition { name: string; description?: string; arguments?: MCPPromptArgument[]; handler?: (args: Record) => Promise; } export interface MCPPromptArgument { name: string; description?: string; required?: boolean; } export interface MCPPromptMessage { role: 'user' | 'assistant'; content: { type: 'text'; text: string; }; } export interface JsonRpcRequest { jsonrpc: '2.0'; id?: number | string; method: string; params?: any; } export interface JsonRpcResponse { jsonrpc: '2.0'; id: number | string | null; result?: any; error?: { code: number; message: string; data?: any; }; } export declare const MCP_ERRORS: { readonly PARSE_ERROR: { readonly code: -32700; readonly message: "Parse error"; }; readonly INVALID_REQUEST: { readonly code: -32600; readonly message: "Invalid Request"; }; readonly METHOD_NOT_FOUND: { readonly code: -32601; readonly message: "Method not found"; }; readonly INVALID_PARAMS: { readonly code: -32602; readonly message: "Invalid params"; }; readonly INTERNAL_ERROR: { readonly code: -32603; readonly message: "Internal error"; }; readonly TOOL_NOT_FOUND: { readonly code: -32001; readonly message: "Tool not found"; }; readonly RESOURCE_NOT_FOUND: { readonly code: -32002; readonly message: "Resource not found"; }; readonly PROMPT_NOT_FOUND: { readonly code: -32003; readonly message: "Prompt not found"; }; }; //# sourceMappingURL=types.d.ts.map