/** * MCP Server Factory * * Creates a fully-configured McpServer instance with all 23 Metrx tools registered. * Used by both the stdio CLI entrypoint and the Streamable HTTP endpoint. * * @module server-factory */ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'; /** * Minimal interface that any API client (real or demo) must satisfy. * Uses structural typing — no `implements` keyword needed. */ export interface ApiClientLike { get(path: string, params?: Record): Promise<{ data?: T; error?: string; }>; post(path: string, body?: Record): Promise<{ data?: T; error?: string; }>; patch(path: string, body?: Record): Promise<{ data?: T; error?: string; }>; } /** * Creates a fully-configured McpServer with all Metrx tools registered. * * @param apiKey - The Metrx API key for authenticating tool calls * @param apiUrl - Optional API base URL override (default: https://metrxbot.com/api/v1) * @returns A configured McpServer ready to be connected to a transport */ export declare function createMcpServer(apiKey: string, apiUrl?: string): McpServer; /** * Creates a fully-configured McpServer using a pre-built API client. * Used for demo mode where DemoApiClient provides mock data. * * @param client - A pre-built API client (real MetrxApiClient or DemoApiClient) * @returns A configured McpServer ready to be connected to a transport */ export declare function createMcpServer(client: ApiClientLike, options?: { isDemo?: boolean; }): McpServer; //# sourceMappingURL=server-factory.d.ts.map