reactbits-mcp-server
Version:
MCP Server for React Bits - Access 99+ React components with animations, backgrounds, and UI elements
62 lines (61 loc) • 2.15 kB
TypeScript
/**
* Component metadata interface
*/
export interface ComponentMetadata {
name: string;
category: string;
description?: string;
dependencies?: string[];
props?: Record<string, any>;
examples?: string[];
}
/**
* Component information interface
*/
export interface ComponentInfo {
name: string;
category: string;
path: string;
metadata?: ComponentMetadata;
}
/**
* Get all available components from the file system
* @param category - Optional category filter
* @returns Promise with array of component information
*/
export declare function getAvailableComponents(category?: string): Promise<ComponentInfo[]>;
/**
* Get component source code
* @param componentName - Name of the component
* @param category - Optional category to narrow search
* @returns Promise with component source code
*/
export declare function getComponentSource(componentName: string, category?: string): Promise<string>;
/**
* Get component demo code
* @param componentName - Name of the component
* @param category - Optional category to narrow search
* @returns Promise with demo source code
*/
export declare function getComponentDemo(componentName: string, category?: string): Promise<string>;
/**
* Get component metadata by analyzing the source code
* @param componentName - Name of the component
* @param category - Optional category to narrow search
* @returns Promise with component metadata
*/
export declare function getComponentMetadata(componentName: string, category?: string): Promise<ComponentMetadata>;
/**
* Search components by name or description
* @param query - Search query
* @param category - Optional category filter
* @returns Promise with array of matching components
*/
export declare function searchComponents(query: string, category?: string): Promise<ComponentInfo[]>;
/**
* Check if a component exists
* @param componentName - Name of the component
* @param category - Optional category to narrow search
* @returns Promise with boolean indicating if component exists
*/
export declare function componentExists(componentName: string, category?: string): Promise<boolean>;