@rpironato/mcp-reactbits-server
Version:
Enhanced MCP server for accessing ReactBits component library with GitHub API integration, advanced search, and comprehensive metadata - 107 components with real code access from DavidHDev/react-bits repository
71 lines • 2.78 kB
JavaScript
/**
* ReactBits Service - Core service for accessing ReactBits components
* This service will be fully implemented in Task 7
*/
/**
* Service class for accessing ReactBits component library
* Provides methods to read, search, and process ReactBits components
*/
export class ReactBitsService {
reactBitsPath;
constructor(reactBitsPath) {
// Default to relative path from mcp-reactbits-server to react-bits root
this.reactBitsPath = reactBitsPath ?? '../';
// Note: reactBitsPath will be used in Task 7 implementation
}
/**
* Get all available components with basic metadata
* @returns Promise resolving to array of component metadata
*/
async getAllComponents() {
// Implementation will be added in Task 7
throw new Error('ReactBitsService.getAllComponents() not yet implemented');
}
/**
* Get source code for a specific component and version
* @param name Component name
* @param version Component version
* @returns Promise resolving to component code and metadata
*/
async getComponentCode(name, version) {
// Implementation will be added in Task 7
throw new Error(`ReactBitsService.getComponentCode() not yet implemented for ${name}:${version}`);
}
/**
* Search components based on query parameters
* @param query Search and filter parameters
* @returns Promise resolving to array of matching components
*/
async searchComponents(query) {
// Implementation will be added in Task 7
// Note: query parameter will be used in the actual implementation
throw new Error(`ReactBitsService.searchComponents() not yet implemented: ${JSON.stringify(query)}`);
}
/**
* Get all categories with component counts
* @returns Promise resolving to array of category information
*/
async getCategories() {
// Implementation will be added in Task 7
throw new Error('ReactBitsService.getCategories() not yet implemented');
}
/**
* Check if a component exists
* @param name Component name
* @returns Promise resolving to boolean indicating existence
*/
async componentExists(name) {
// Implementation will be added in Task 7
throw new Error(`ReactBitsService.componentExists() not yet implemented for ${name}`);
}
/**
* Get available versions for a specific component
* @param name Component name
* @returns Promise resolving to array of available versions
*/
async getComponentVersions(name) {
// Implementation will be added in Task 7
throw new Error(`ReactBitsService.getComponentVersions() not yet implemented for ${name}`);
}
}
//# sourceMappingURL=index.js.map