import type { Rule } from '../domain/Rule.js';
import { ContextFile } from '../domain/ContextFile.js';
import { Violation } from '../domain/Violation.js';
/**
 * Validates a Model Context Protocol configuration file (`.mcp.json`).
 *
 * @remarks
 * Claude Code loads MCP servers from `.mcp.json`; a malformed entry silently
 * drops the server. This rule enforces the shape Claude Code expects: a
 * top-level `mcpServers` object whose every entry is *either* a stdio server
 * (`command`, optional `args`/`env`) *or* a remote server (`url` + a `type` of
 * `sse`/`http`) — never both or neither. It also checks that `${VAR}`
 * environment placeholders are well-formed and that no server name is declared
 * twice (JSON silently keeps only the last duplicate key). It is a pure rule
 * and performs no IO.
 */
export declare class McpConfigRule implements Rule {
    readonly id = "mcp-config";
    readonly description = "Validates Claude Code MCP server configuration (.mcp.json)";
    appliesTo(file: ContextFile): boolean;
    lint(file: ContextFile): Violation[];
    private validateServer;
    private validateStdioServer;
    private validateRemoteServer;
    private validateEnv;
    /** Flag malformed `${VAR}` placeholders in any string value of a server. */
    private collectPlaceholders;
    /**
     * Detect server names declared more than once. JSON.parse keeps only the last
     * value for a duplicate key, so the parsed object cannot reveal the collision;
     * this scans the raw text with a string-aware brace walk.
     */
    private reportDuplicateServerNames;
}
//# sourceMappingURL=McpConfigRule.d.ts.map