/** * MCP Registry Client * * Interacts with the official MCP Registry API for server discovery * API Docs: https://registry.modelcontextprotocol.io/ */ export interface RegistryServer { server: { name: string; description: string; version: string; repository?: { url: string; type?: string; }; packages?: Array<{ identifier: string; version: string; runtimeHint?: string; environmentVariables?: Array<{ name: string; description?: string; isRequired?: boolean; isSecret?: boolean; default?: string; }>; }>; remotes?: Array<{ type: string; url: string; environmentVariables?: Array<{ name: string; description?: string; isRequired?: boolean; isSecret?: boolean; default?: string; }>; }>; }; _meta?: { 'io.modelcontextprotocol.registry/official'?: { status: string; publishedAt?: string; updatedAt?: string; }; isPhoton?: boolean; sourceUrl?: string; schemaUrl?: string; [key: string]: any; }; } export interface ServerSearchResult { server: { name: string; description: string; version: string; repository?: { url: string; source?: string; }; packages?: Array<{ identifier: string; version: string; runtimeHint?: string; }>; remotes?: Array<{ type: string; url: string; }>; }; _meta?: { 'io.modelcontextprotocol.registry/official'?: { status: string; publishedAt?: string; updatedAt?: string; }; isPhoton?: boolean; sourceUrl?: string; schemaUrl?: string; [key: string]: any; }; } export interface RegistryMCPCandidate { number: number; name: string; displayName: string; description: string; version: string; transport: 'stdio' | 'http' | 'sse'; command?: string; args?: string[]; url?: string; remoteType?: string; envVars?: Array<{ name: string; description?: string; isRequired?: boolean; isSecret?: boolean; default?: string; }>; downloadCount?: number; status?: string; repository?: { url: string; source?: string; }; publishedAt?: string; isTrusted?: boolean; qualityScore?: number; _meta?: any; } export interface RegistrySearchOptions { /** Maximum number of results to return */ limit?: number; /** Pagination cursor */ cursor?: string; /** Security filtering options */ security?: { /** Only include servers with GitHub repositories */ requireRepository?: boolean; /** Trusted namespaces to prioritize (e.g., ['io.github.modelcontextprotocol']) */ trustedNamespaces?: string[]; /** Minimum age in days (avoid brand new servers) */ minAgeDays?: number; }; } export declare class RegistryClient { private baseURL; private cache; private readonly CACHE_TTL; private allServersCache; private allServersCacheTime; /** * Fetch ALL servers from registry (up to 100 - API limit) for comprehensive dataset * This allows intelligent client-side sorting and filtering */ private fetchAllServers; /** * Calculate quality score for a server (higher = better quality) */ private calculateQualityScore; /** * Search for MCP servers with intelligent quality-based sorting * Fetches large dataset and sorts by quality indicators */ search(query: string, options?: RegistrySearchOptions): Promise; /** * Apply client-side security filters to search results * Note: Sorting is handled separately by quality scoring */ private applySecurityFilters; /** * Get detailed information about a specific server */ getServer(serverName: string): Promise; /** * Search and format results as numbered candidates for user selection * Includes security filtering and trust indicators */ searchForSelection(query: string, options?: RegistrySearchOptions): Promise; /** * Get detailed info for selected MCPs (including env vars) * Returns unified configuration for both stdio and HTTP/SSE servers */ getDetailedInfo(serverName: string): Promise<{ transport: 'stdio' | 'http' | 'sse'; command?: string; args?: string[]; url?: string; remoteType?: string; envVars?: Array<{ name: string; description?: string; isRequired?: boolean; isSecret?: boolean; default?: string; }>; _meta?: any; }>; /** * Extract short name from full registry name * io.github.modelcontextprotocol/server-filesystem → server-filesystem */ private extractShortName; /** * Get from cache if not expired */ private getFromCache; /** * Set cache with timestamp */ private setCache; /** * Clear cache */ clearCache(): void; } //# sourceMappingURL=registry-client.d.ts.map