import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { DocumentCollection } from "../core/collection.js"; import type { Document } from "../core/document.js"; import type { LLMProviderConfig } from "../types.js"; export type McpTarget = Document | DocumentCollection; export interface McpServerOptions { /** LLM for the `ask` tool; defaults to the target's `llm`. Without one, `ask` is not offered. */ llm?: LLMProviderConfig; } /** * An MCP server exposing `search`, `ask` (when an LLM is configured) and * `list_sources` over an indexed document or collection. Call `build()` on the * target first. Connect it to any transport, or use `serveMcp()` for stdio. */ export declare function createMcpServer(target: McpTarget, options?: McpServerOptions): Promise; /** * Serve over stdio until the client disconnects. stdout carries the protocol, * so nothing else may write to it. */ export declare function serveMcp(target: McpTarget, options?: McpServerOptions): Promise;