import { z } from 'zod/v4';
import type { MCPConfig } from '@levelcode/common/types/mcp';
/**
 * Schema for the mcp.json file format.
 * Matches the standard MCP config format used by Claude Code, Cursor, etc.
 */
export declare const mcpFileSchema: z.ZodObject<{
    mcpServers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
        type: z.ZodDefault<z.ZodEnum<{
            http: "http";
            sse: "sse";
        }>>;
        url: z.ZodString;
        params: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
        headers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
    }, z.core.$strict>, z.ZodObject<{
        type: z.ZodDefault<z.ZodLiteral<"stdio">>;
        command: z.ZodString;
        args: z.ZodDefault<z.ZodArray<z.ZodString>>;
        env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
    }, z.core.$strict>]>>>;
}, z.core.$strip>;
export type MCPFileConfig = z.infer<typeof mcpFileSchema>;
/**
 * Loaded MCP configuration with resolved environment variables.
 */
export type LoadedMCPConfig = {
    mcpServers: Record<string, MCPConfig>;
    /** The file path this config was loaded from */
    _sourceFilePath: string;
};
/**
 * Load MCP configuration from `mcp.json` files in `.agents` directories.
 *
 * By default, searches for mcp.json in:
 * - `{cwd}/.agents/mcp.json`
 * - `{cwd}/../.agents/mcp.json`
 * - `{homedir}/.agents/mcp.json`
 *
 * Later directories take precedence, so project MCP servers override global ones.
 * Environment variable references (e.g., `$API_KEY`) are resolved from process.env.
 *
 * @param options.verbose - Whether to log errors during loading
 * @returns Record of MCP server configurations keyed by server name
 *
 * @example
 * ```typescript
 * // Load from default locations
 * const mcpConfig = await loadMCPConfig({ verbose: true })
 *
 * // Access MCP servers
 * for (const [serverName, config] of Object.entries(mcpConfig.mcpServers)) {
 *   console.log(`MCP server: ${serverName}`)
 * }
 * ```
 */
export declare function loadMCPConfig(options: {
    verbose?: boolean;
}): Promise<LoadedMCPConfig>;
/**
 * Synchronously load MCP configuration from `mcp.json` files in `.agents` directories.
 * This is a sync version for use in contexts where async is not available.
 *
 * @param options.verbose - Whether to log errors during loading
 * @returns Record of MCP server configurations keyed by server name
 */
export declare function loadMCPConfigSync(options: {
    verbose?: boolean;
}): LoadedMCPConfig;
