/** * Base classes and types for MCP client configuration */ /** * Configuration object for MCP server */ export interface MCPServerConfig { command: string; args: Array; env: Record; type?: string; } /** * Standard MCP configuration structure */ export interface StandardMCPConfig { mcpServers: { glean: MCPServerConfig; }; } /** * VS Code global configuration structure */ export interface VSCodeGlobalConfig { mcp: { servers: { glean: MCPServerConfig; }; }; } /** * VS Code local configuration structure */ export interface VSCodeLocalConfig { servers: { glean: MCPServerConfig; }; } /** * Configuration format union type */ export type MCPConfig = StandardMCPConfig | VSCodeGlobalConfig | VSCodeLocalConfig; /** * Base options interface that all clients extend */ export interface BaseClientOptions { readonly homedir: string; readonly instanceOrUrl?: string; readonly apiToken?: string; } /** * VS Code specific options */ export interface VSCodeClientOptions extends BaseClientOptions { readonly local?: boolean; } /** * Configuration constructor parameters */ export interface ClientConstructorParams { readonly displayName: string; readonly options: T; } /** * Abstract base class for all MCP clients */ export declare abstract class MCPClient { protected readonly displayName: string; protected readonly options: TOptions; constructor(params: ClientConstructorParams); /** * Get the display name for this client */ getDisplayName(): string; /** * Get the configuration file path for this client */ abstract getConfigFilePath(): string; /** * Generate the configuration object for this client */ abstract generateConfig(): TConfig; /** * Get the success message after configuration */ abstract getSuccessMessage(configPath: string): string; /** * Check if the existing configuration already has Glean MCP configured */ abstract hasExistingConfig(existingConfig: Record): boolean; /** * Update the existing configuration with the new Glean MCP configuration */ abstract updateConfig(existingConfig: Record, newConfig: TConfig): Record; /** * Create the environment variables for the MCP server */ protected createServerEnv(): Record; /** * Create the base MCP server configuration */ protected createServerConfig(): MCPServerConfig; } /** * Base class for clients that use the standard configuration format */ export declare abstract class StandardMCPClient extends MCPClient { generateConfig(): StandardMCPConfig; hasExistingConfig(existingConfig: Record): boolean; updateConfig(existingConfig: Record, newConfig: StandardMCPConfig): Record; protected createSuccessMessage(configPath: string, instructions: Array): string; } //# sourceMappingURL=base-client.d.ts.map