/** * LearnGraph MCP Server * * Model Context Protocol server for Claude integration. * Exposes knowledge graph tools, resources, and prompts. * * @packageDocumentation */ import type { McpServerConfig, McpToolResult } from './types.js'; /** * LearnGraph MCP Server * * Provides tools, resources, and prompts for Claude to interact with * educational knowledge graphs. * * @example * ```typescript * import { LearnGraphMcpServer } from 'learngraph/mcp'; * import { MemoryStorage } from 'learngraph/storage'; * * const storage = new MemoryStorage(); * await storage.connect({ backend: 'memory' }); * * const server = new LearnGraphMcpServer({ storage }); * await server.start(); * ``` */ export declare class LearnGraphMcpServer { private storage; private config; private isRunning; constructor(config: McpServerConfig); /** * Log debug messages */ private log; /** * Get server info */ getServerInfo(): { name: string; version: string; }; /** * List available tools */ listTools(): Array<{ name: string; description: string; inputSchema: Record; }>; /** * Execute a tool */ executeTool(name: string, args: Record): Promise; /** * List available resources */ listResources(): Promise>; /** * Get resource templates */ listResourceTemplates(): Array<{ uri: string; name: string; description?: string; mimeType?: string; }>; /** * Read a resource */ readResource(uri: string): Promise<{ uri: string; mimeType: string; text?: string; } | null>; /** * List available prompts */ listPrompts(): Array<{ name: string; description?: string; arguments?: Array<{ name: string; description?: string; required?: boolean; }>; }>; /** * Get a prompt */ getPrompt(name: string, args: Record): { description?: string; messages: Array<{ role: string; content: string; }>; } | null; /** * Convert Zod schema to JSON Schema */ private zodToJsonSchema; /** * Start the MCP server (stdio transport) * * This requires @modelcontextprotocol/sdk to be installed. */ start(): Promise; /** * Check if server is running */ get running(): boolean; } /** * Create and start an MCP server * * Convenience function for quick server setup. * * @example * ```typescript * import { startMcpServer } from 'learngraph/mcp'; * import { MemoryStorage } from 'learngraph/storage'; * * const storage = new MemoryStorage(); * await storage.connect({ backend: 'memory' }); * * await startMcpServer({ storage }); * ``` */ export declare function startMcpServer(config: McpServerConfig): Promise; //# sourceMappingURL=server.d.ts.map