import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import type { Transport } from "@modelcontextprotocol/sdk/shared/transport.js"; import type { GlobalCliOptions } from "./loader.js"; export declare const DEFAULT_MCP_DOWNLOAD_MAX_BYTES: number; export declare const MAX_MCP_DOWNLOAD_BYTES: number; export declare const resolveMcpDownloadCap: (maxBytes?: number) => number; export declare const mcpDownloadSize: (fullSize: number, range?: { end?: number; start: number; }) => number; export declare const assertMcpDownloadFitsCap: (key: string, size: number, cap: number) => void; export interface McpServerOpts { allowWrites?: boolean; global: GlobalCliOptions; } /** * Build an MCP server with the file tools registered, ready to connect to a * transport. Read tools are registered by default; pass `allowWrites` to * expose mutating tools. Provider + credentials are bound here (from the * global flags / env), so each tool call only needs operation arguments — the * agent doesn't have to thread credentials through every request. * * The `Files` instance is constructed once and reused across every tool call. * This keeps the underlying SDK client (S3 client, GCS client, etc.) warm and * surfaces credential failures immediately rather than on the first tool call. * * Split out from {@link startMcpServer} so the registered tools can be driven * over an in-memory transport in tests without touching stdio. */ export declare const buildMcpServer: (opts: McpServerOpts) => Promise; /** * Start an MCP server on stdio. Builds the server (binding provider + * credentials, registering tools) and connects it to a stdio transport so the * host agent can drive it. The transport factory is injectable so tests can * supply an inert stand-in instead of one that attaches to process.stdin. */ export declare const startMcpServer: (opts: McpServerOpts, createTransport?: () => Transport) => Promise; //# sourceMappingURL=mcp.d.ts.map