import { McpServerConfig } from './types.js'; export interface ClientConfigLocation { client: string; path: string; format: 'mcpServers-json' | 'vscode-mcp-json' | 'codex-toml' | 'opencode-json' | 'zed-settings-json' | 'continue-yaml' | 'amp-settings-json' | 'skill-mcp-json' | 'skill-frontmatter-yaml' | 'agent-frontmatter-yaml' | 'copilot-mcp-json' | 'marketplace-json' | 'goose-yaml' | 'goose-recipe-yaml' | 'crush-json'; } /** * Well-known MCP client config locations, relative to a home directory. * Covers Claude (Desktop + Code), Cursor, VS Code, Codex, OpenCode, * Windsurf, Cline, Gemini CLI, Kiro, Roo Code, Kilo Code, Zed, Continue.dev, Amp, * Warp, LM Studio, Qoder, and Amazon Q Developer (plus the generic * `.agents/.mcp.json` convention); project-level discovery also covers * Trae (`.trae/mcp.json`), Qoder (`.qoder/settings.json`, * `.qoder/settings.local.json`), and Amazon Q (`.amazonq/mcp.json`, * `.amazonq/default.json`). */ export declare function knownConfigLocations(homeDir?: string, platform?: NodeJS.Platform): ClientConfigLocation[]; /** Project-level config locations relative to a project directory. */ export declare function projectConfigLocations(projectDir: string): ClientConfigLocation[]; /** * Discover existing config files among the known locations. The same file can be * reachable through several conventions (a project-root `.mcp.json` is both the * claude-code location and a plugin manifest's path ref); only the first hit is * kept so its servers are not scanned and reported twice. */ export declare function discoverConfigFiles(opts?: { homeDir?: string; projectDir?: string; platform?: NodeJS.Platform; }): ClientConfigLocation[]; /** Parse a client config file into normalized MCP server entries. */ export declare function parseConfigFile(location: ClientConfigLocation): McpServerConfig[]; /** Claude Desktop / Cursor / generic `{ "mcpServers": { ... } }` format. Also handles Claude Code `~/.claude.json` (top-level + per-project). */ export declare function parseMcpServersJson(raw: string, location: ClientConfigLocation): McpServerConfig[]; /** Copilot CLI project MCP config (`.github/mcp.json`): an `mcpServers` wrapper or a bare top-level server map. */ export declare function parseCopilotMcpJson(raw: string, location: ClientConfigLocation): McpServerConfig[]; /** VS Code `mcp.json`: `{ "servers": { ... } }` (also accepts `mcpServers`). */ export declare function parseVsCodeJson(raw: string, location: ClientConfigLocation): McpServerConfig[]; /** OpenCode `opencode.json` (and Kilo CLI `kilo.json(c)`, same schema, JSONC allowed): `{ "mcp": { name: { type, command: [...], environment, url, headers } } }`. */ export declare function parseOpenCodeJson(raw: string, location: ClientConfigLocation): McpServerConfig[]; /** Continue.dev `config.yaml` / `.continue/mcpServers/*.yaml`: `mcpServers` is a list of `{ name, command, args, env, url, type }`. */ export declare function parseContinueYaml(raw: string, location: ClientConfigLocation): McpServerConfig[]; /** * Goose `config.yaml`: `extensions` is a map of `{ type, cmd, args, envs, uri, headers, enabled }`. * Only `stdio` and remote (`streamable_http`/`sse`) extensions are MCP servers; * `builtin`/`platform`/`frontend`/`inline_python` types are goose-internal and skipped. */ export declare function parseGooseYaml(raw: string, location: ClientConfigLocation): McpServerConfig[]; /** * Goose recipe (`recipe.yaml`/`recipe.json`, YAML parses both): `extensions` is an * array of the same `{ type, name, cmd, args, envs, uri, headers }` entries as * config.yaml, started automatically for everyone who runs the recipe. Gated on * the documented recipe shape (title + description + instructions|prompt) since * the filename alone is generic. */ export declare function parseGooseRecipeYaml(raw: string, location: ClientConfigLocation): McpServerConfig[]; /** Amp `settings.json` (user `~/.config/amp/settings.json` or workspace `.amp/settings.json`): `{ "amp.mcpServers": { ... } }` — standard entry shape. */ export declare function parseAmpSettingsJson(raw: string, location: ClientConfigLocation): McpServerConfig[]; /** Skill sibling `mcp.json`: a bare `{ "": { command|url, ... } }` map. */ export declare function parseSkillMcpJson(raw: string, location: ClientConfigLocation): McpServerConfig[]; /** Marketplace catalog (`.claude-plugin/marketplace.json`): inline `mcpServers` on plugin entries. */ export declare function parseMarketplaceJson(raw: string, location: ClientConfigLocation): McpServerConfig[]; /** `SKILL.md` frontmatter `mcpServers` map — same entry shape as `mcp.json`. */ export declare function parseSkillFrontmatter(raw: string, location: ClientConfigLocation): McpServerConfig[]; /** Copilot agent profile frontmatter `mcp-servers` map — YAML form of the repo MCP JSON config (stdio→local type). */ export declare function parseAgentFrontmatter(raw: string, location: ClientConfigLocation): McpServerConfig[]; /** Zed `settings.json`: `{ "context_servers": { ... } }` — same entry shape as mcpServers, JSONC allowed. */ export declare function parseZedSettingsJson(raw: string, location: ClientConfigLocation): McpServerConfig[]; /** Crush (Charm) legacy JSON config (`crush.json` / `.crush.json`, JSONC): `mcp` maps name → { type, command, args, env, url, headers }. */ export declare function parseCrushJson(raw: string, location: ClientConfigLocation): McpServerConfig[]; /** * Codex CLI `config.toml`: `[mcp_servers.]` tables with `command`, `args`, `env`, `url`. * Minimal TOML subset parser — enough for the flat key/value + array shapes Codex uses. */ export declare function parseCodexToml(raw: string, location: ClientConfigLocation): McpServerConfig[]; /** Discover and parse all MCP server entries visible to known clients. */ export declare function discoverServers(opts?: { homeDir?: string; projectDir?: string; platform?: NodeJS.Platform; }): { servers: McpServerConfig[]; files: string[]; errors: { file: string; error: string; }[]; };