import * as react from 'react'; import { ClientId, MCPConfigRegistry, RegistryOptions } from '@gleanwork/mcp-config-schema/browser'; /** * Props for the McpInstallButton component */ interface McpInstallButtonProps { /** Server URL. If not provided, uses plugin configuration. */ serverUrl?: string; /** Server name. If not provided, uses plugin configuration. */ serverName?: string; /** Button label. If not provided, shows only the MCP icon. */ label?: string; /** Optional className for styling */ className?: string; /** Clients to show. Defaults to all HTTP-capable clients from registry. */ clients?: ClientId[]; /** Header text shown at top of dropdown (default: "Choose your AI tool:") */ headerText?: string; } /** * A dropdown button component for installing MCP servers in various AI tools. * Uses Docusaurus/Infima CSS classes for consistent theming. * * @example * ```tsx * * ``` */ declare function McpInstallButton({ serverUrl: serverUrlProp, serverName: serverNameProp, label, className, clients: clientsProp, headerText, }: McpInstallButtonProps): react.JSX.Element | null; /** * Configuration from the plugin */ interface McpConfig { /** Full URL to the MCP server endpoint */ serverUrl: string; /** Name of the MCP server for configuration */ serverName: string; } /** * Registry options for the docs MCP server. * Similar to GLEAN_REGISTRY_OPTIONS in @gleanwork/mcp-config-glean */ declare function createDocsRegistryOptions(config: McpConfig): RegistryOptions; /** * Creates an MCPConfigRegistry pre-configured with the docs server settings. * * Similar to createGleanRegistry() from @gleanwork/mcp-config-glean * * @param config - The server configuration from plugin * @returns Object with registry instance and bound config */ declare function createDocsRegistry(config: McpConfig): { registry: MCPConfigRegistry; config: McpConfig; }; /** * Hook to access the pre-configured MCP registry and config. * * Reads configuration from plugin globalData and creates a registry * with the serverUrl and serverName pre-bound in the config object. * * @returns { registry, config } or undefined if plugin not configured * * @example * ```tsx * function MyComponent() { * const mcp = useMcpRegistry(); * if (!mcp) return null; * * const { registry, config } = mcp; * const builder = registry.createBuilder('claude-code'); * const json = builder.buildConfiguration({ * transport: 'http', * serverUrl: config.serverUrl, * serverName: config.serverName, * }); * } * ``` */ declare function useMcpRegistry(): { registry: MCPConfigRegistry; config: McpConfig; } | undefined; export { type McpConfig, McpInstallButton, type McpInstallButtonProps, createDocsRegistry, createDocsRegistryOptions, useMcpRegistry };