UNPKG

@juspay/neurolink

Version:

Universal AI Development Platform with working MCP integration, multi-provider support, voice (TTS/STT/realtime), and professional CLI. 58+ external MCP servers discoverable, multimodal file processing, RAG pipelines. Build, test, and deploy AI applicatio

130 lines (129 loc) 3.4 kB
/** * MCP Registry Client * * Client for discovering MCP servers from centralized registries. * Supports multiple registry sources including: * - Official MCP Registry * - NPM packages * - GitHub repositories * - Custom registries * * @module mcp/mcpRegistryClient * @since 8.39.0 */ import { EventEmitter } from "events"; import type { MCPServerInfo, MCPRegistryClientConfig, RegistryConfig, RegistrySearchOptions, RegistrySearchResult, McpRegistryEntry } from "../types/index.js"; /** * MCP Registry Client * * Provides methods to discover and install MCP servers from registries. * * @example * ```typescript * const client = new MCPRegistryClient(); * * // Search for servers * const results = await client.search({ query: "database" }); * * // Get server details * const entry = await client.getEntry("postgres"); * * // Convert to MCPServerInfo * const serverInfo = client.toServerInfo(entry); * ``` */ export declare class MCPRegistryClient extends EventEmitter { private config; private cache; private customEntries; constructor(config?: MCPRegistryClientConfig); /** * Search the registry */ search(options?: RegistrySearchOptions): Promise<RegistrySearchResult>; /** * Get a specific entry by ID */ getEntry(id: string): Promise<McpRegistryEntry | undefined>; /** * Get all available entries */ getAllEntries(): Promise<McpRegistryEntry[]>; /** * Get entries by category */ getByCategory(category: string): Promise<McpRegistryEntry[]>; /** * Get entries by tag */ getByTag(tag: string): Promise<McpRegistryEntry[]>; /** * Get all categories */ getCategories(): Promise<string[]>; /** * Get all tags */ getTags(): Promise<string[]>; /** * Convert registry entry to MCPServerInfo */ toServerInfo(entry: McpRegistryEntry): MCPServerInfo; /** * Add a custom registry entry */ addCustomEntry(entry: McpRegistryEntry): void; /** * Remove a custom registry entry */ removeCustomEntry(id: string): boolean; /** * Add a registry configuration */ addRegistry(config: RegistryConfig): void; /** * Clear the cache */ clearCache(): void; /** * Check if required environment variables are set */ checkRequiredEnvVars(entry: McpRegistryEntry): { ready: boolean; missing: string[]; }; /** * Get installation command for an entry */ getInstallCommand(entry: McpRegistryEntry): string | undefined; /** * Get popular servers */ getPopularServers(limit?: number): Promise<McpRegistryEntry[]>; /** * Get verified servers */ getVerifiedServers(): Promise<McpRegistryEntry[]>; /** * Get statistics */ getStatistics(): Promise<{ totalEntries: number; verifiedEntries: number; categories: number; tags: number; customEntries: number; }>; } /** * Global MCP registry client instance */ export declare const globalMCPRegistryClient: MCPRegistryClient; /** * Quick lookup function for well-known servers */ export declare function getWellKnownServer(id: string): McpRegistryEntry | undefined; /** * Get all well-known servers */ export declare function getAllWellKnownServers(): McpRegistryEntry[];