export interface McpJsonTarget { serverKey: string; /** Functions so paths resolve at call time. */ dir(): string; file(): string; /** Read-side only; defaults to what the write path emits (Command Code writes its own). */ keyHeader?: { name: string; valuePrefix?: string; }; /** Cline nests url and headers under this key; every other harness is flat. */ transportKey?: string; /** Read-side only; OpenCode and its Kilo fork nest servers under `mcp`. */ serversKey?: string; } export interface McpJsonWriteResult { status: 'written' | 'unchanged' | 'corrupt_skip'; backupPath?: string; error?: string; /** A pre-existing entry was replaced — a repair, not a fresh install. */ repaired?: boolean; } export declare function buildTinyfishServerEntry(mcpUrl: string, apiKey?: string): Record; export declare function buildTinyfishKeylessServerEntry(mcpUrl: string): Record; /** Dry-run description of the pending write; touches nothing. */ export declare function planWrite(target: McpJsonTarget, mcpUrl: string, apiKey?: string, serverEntry?: Record): string; export interface McpJsonServerEntry { present: boolean; hasApiKeyHeader: boolean; keyless?: true; /** Only ever false: harnesses with a disable toggle write it, the rest omit it. */ enabled?: false; /** Registered endpoint, so a caller can tell "registered" from "registered at the right place". */ url?: string; keyMatchesCliKey?: boolean; /** Whole-value `${VAR}` template: the variable name, never a key. */ keyTemplateVar?: string; error?: string; } /** Reports the header's shape, never its value. */ export declare function readTinyfishEntry(target: McpJsonTarget): McpJsonServerEntry; /** Merges only the target's key; skips unreadable/corrupt files rather than clobber. */ export declare function writeMcpConfig(target: McpJsonTarget, mcpUrl: string, apiKey?: string, serverEntry?: Record): McpJsonWriteResult; /** Removes only the target's key. */ export declare function removeServer(target: McpJsonTarget): McpJsonWriteResult;