/** * Proper MCP Server implementation with stdio and streamable HTTP transports */ import { Server } from '@modelcontextprotocol/sdk/server/index.js'; import { CacheManager } from './core/cache.js'; import { RedditTools } from './tools/index.js'; export declare const SERVER_NAME = "reddit-mcp-buddy"; export declare const SERVER_VERSION = "1.1.14"; /** * Create MCP server with proper protocol implementation */ export interface SharedServices { cacheManager: CacheManager; tools: RedditTools; rateLimit: number; cacheTTL: number; } /** * Build the long-lived services (auth, cache, rate limiter, Reddit client). * These are created ONCE per process and shared by every MCP server instance, * so the stateless HTTP path can mint a fresh Server per request without * throwing away the cache or resetting the rate limiter. */ export declare function createSharedServices(): Promise; export declare function createMCPServer(shared?: SharedServices): Promise<{ server: Server<{ method: string; params?: { [x: string]: unknown; _meta?: { [x: string]: unknown; progressToken?: string | number | undefined; "io.modelcontextprotocol/related-task"?: { taskId: string; } | undefined; } | undefined; } | undefined; }, { method: string; params?: { [x: string]: unknown; _meta?: { [x: string]: unknown; progressToken?: string | number | undefined; "io.modelcontextprotocol/related-task"?: { taskId: string; } | undefined; } | undefined; } | undefined; }, { [x: string]: unknown; _meta?: { [x: string]: unknown; progressToken?: string | number | undefined; "io.modelcontextprotocol/related-task"?: { taskId: string; } | undefined; } | undefined; }>; cacheManager: CacheManager; tools: RedditTools; handlers: { 'tools/list': () => Promise<{ tools: { inputSchema: { [x: string]: unknown; type: "object"; properties?: { [x: string]: object; } | undefined; required?: string[] | undefined; }; name: string; description?: string | undefined; outputSchema?: { [x: string]: unknown; type: "object"; properties?: { [x: string]: object; } | undefined; required?: string[] | undefined; } | undefined; annotations?: { title?: string | undefined; readOnlyHint?: boolean | undefined; destructiveHint?: boolean | undefined; idempotentHint?: boolean | undefined; openWorldHint?: boolean | undefined; } | undefined; execution?: { taskSupport?: "optional" | "required" | "forbidden" | undefined; } | undefined; _meta?: { [x: string]: unknown; } | undefined; icons?: { src: string; mimeType?: string | undefined; sizes?: string[] | undefined; theme?: "light" | "dark" | undefined; }[] | undefined; title?: string | undefined; }[]; }>; 'tools/call': (params: any) => Promise<{ content: { type: "text" | "image"; data?: string | undefined; text?: string | undefined; mimeType?: string | undefined; }[]; isError?: boolean | undefined; }>; }; }>; /** * Start server with stdio transport (for Claude Desktop) */ export declare function startStdioServer(): Promise; /** * Start server with streamable HTTP transport for Postman MCP */ export declare function startHttpServer(port?: number): Promise; //# sourceMappingURL=mcp-server.d.ts.map