/** * MCP (Model Context Protocol) server for agent integration. * * Exposes high-level tools over stdio so any MCP-compatible agent * (Claude Code, Cursor, etc.) can discover and call them. * * CRITICAL: All logging/output goes to stderr. stdout is the JSON-RPC transport. */ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { queryDataShow } from "./queries.js"; import { type DataSlice, type ScopeOverview } from "./data-slice.js"; export interface McpServerDeps { queryDataShow?: typeof queryDataShow; } /** Build the MCP server with every tool registered, not yet connected. */ export declare function createMcpServer(deps?: McpServerDeps): McpServer; /** * Start the MCP server on stdio. * * Returns a promise that resolves when the transport disconnects. */ export declare function startMcpServer(): Promise; export interface ShowDataArgs { source: string; scope?: string; offset?: number; limit?: number; query?: string; } export type ShowDataResult = { ok: true; source: string; name: string; path: string; lastRunAt: string | null; dataState: string | null; summary: string[]; exportSummary: unknown; scopes: ScopeOverview[]; howToRead: string; } | ({ ok: true; source: string; name: string; } & DataSlice) | { ok: false; error: string; source: string; message: string; availableScopes?: string[]; nextSteps?: string[]; }; /** * The bounded answer to show_data: an overview of a dataset, or one page of * one scope. Never the whole dataset, which can be tens of megabytes. */ export declare function showData(args: ShowDataArgs, deps?: McpServerDeps): Promise; //# sourceMappingURL=mcp-server.d.ts.map