/** * MCP Client Configuration Adapters * Provides loosely coupled adapters for different MCP clients (Claude Desktop, Cursor, etc.) */ /** * MCP server configuration entry. * Supports both stdio and HTTP transports depending on client capabilities. */ export type McpServerConfig = StdioServerConfig | HttpServerConfig; export interface StdioServerConfig { command: string; args: string[]; env?: Record; } export interface HttpServerConfig { type: 'http'; url: string; } /** * Adapter interface for MCP client configurations. * Adapters can generate either stdio or HTTP transport configs depending on client support. */ export interface McpClientAdapter { /** Get the config file path for this client */ getConfigPath(): string; /** Get the key name for the servers object (e.g., "mcpServers" or "mcp.servers") */ getServersKey(): string; /** Whether the servers key should be treated as a flat key or nested path (default: nested) */ useFlatKey?(): boolean; /** Create server config for a limps project (stdio or HTTP depending on client) */ createServerConfig(configPath: string, host?: string, port?: number): McpServerConfig; /** Get display name for this client */ getDisplayName(): string; } /** * Claude Desktop adapter * Uses: mcpServers key, stdio transport, ~/Library/Application Support/Claude/claude_desktop_config.json * Note: Claude Desktop does not support HTTP transport yet, uses stdio with command/args */ export declare class ClaudeDesktopAdapter implements McpClientAdapter { getConfigPath(): string; getServersKey(): string; createServerConfig(configPath: string): McpServerConfig; getDisplayName(): string; } /** * Cursor adapter * Uses: mcp.servers key, stdio transport, VS Code settings.json location * Note: Cursor uses stdio transport with command/args */ export declare class CursorAdapter implements McpClientAdapter { private getSettingsPath; getConfigPath(): string; getServersKey(): string; useFlatKey(): boolean; createServerConfig(configPath: string): McpServerConfig; getDisplayName(): string; } /** * Claude Code adapter * Uses: mcpServers key, HTTP transport, ~/.claude.json (user scope) * Note: Claude Code supports HTTP transport to daemons */ export declare class ClaudeCodeAdapter implements McpClientAdapter { getConfigPath(): string; getServersKey(): string; createServerConfig(_configPath: string, host?: string, port?: number): McpServerConfig; getDisplayName(): string; } /** * OpenAI Codex adapter * Uses: mcp_servers key, TOML config at ~/.codex/config.toml * Note: Codex supports HTTP transport to daemons */ export declare class CodexAdapter implements McpClientAdapter { getConfigPath(): string; getServersKey(): string; createServerConfig(_configPath: string, host?: string, port?: number): McpServerConfig; getDisplayName(): string; } /** * Supported MCP client types for local workspace configs */ export type LocalMcpClientType = 'cursor' | 'claude-code' | 'opencode' | 'custom'; /** * Get the default local config path for a given client type */ export declare function getLocalConfigPath(clientType: LocalMcpClientType, customPath?: string): string; /** * Get the display name for a local config client type */ export declare function getLocalConfigDisplayName(clientType: LocalMcpClientType): string; /** * Local workspace MCP config adapter * Uses: mcpServers key, HTTP transport, client-specific local config paths * * Default paths by client: * - Cursor: .cursor/mcp.json * - Claude Code: .mcp.json * - Custom: user-specified path * Note: Local workspace configs support HTTP transport to daemons */ export declare class LocalMcpAdapter implements McpClientAdapter { private configPath; private clientType; constructor(clientType?: LocalMcpClientType, customPath?: string); getConfigPath(): string; getServersKey(): string; createServerConfig(_configPath: string, host?: string, port?: number): McpServerConfig; getDisplayName(): string; getClientType(): LocalMcpClientType; } /** * Global adapter client types (write to global config locations) */ export type GlobalAdapterClientType = 'claude' | 'cursor' | 'claude-code' | 'codex'; /** * Get adapter for a global client type */ export declare function getAdapter(clientType: GlobalAdapterClientType): McpClientAdapter; /** * Get a local adapter for a specific client type */ export declare function getLocalAdapter(clientType: LocalMcpClientType, customPath?: string): LocalMcpAdapter; //# sourceMappingURL=mcp-client-adapter.d.ts.map