Allows deployment of the MCP server to Cloudflare Workers for hosting and serving the MCP functionality
Generates production-ready React components with TypeScript support, responsive design, and accessibility features based on natural language descriptions
Incorporates Tailwind CSS classes in generated components for modern styling with CSS Grid and Flexbox
Provides full TypeScript support for generated components including type definitions, interface declarations, and type-safe props
Utilizes Zod for schema validation in the MCP server implementation
Enhanced Reablocks MCP Server
A powerful Model Context Protocol (MCP) server that provides intelligent React component generation and composition using the Reablocks design system. This server combines natural language processing with deep component knowledge to generate production-ready React components.
🚀 Features
- 🧠 Natural Language Processing - Describe what you want in plain English
- ⚛️ Intelligent Component Generation - Generates complete React components with TypeScript
- 📚 Comprehensive Component Knowledge - Deep understanding of 50+ Reablocks components
- 🎨 Smart Code Composition - Automatically combines components with proper props and patterns
- 📱 Responsive Design - Generated components include mobile-first responsive layouts
- ♿ Accessibility Built-in - WCAG 2.1 AA compliant components with ARIA labels
- 🔧 Production Ready - Includes error handling, loading states, and TypeScript definitions
📦 Installation
Prerequisites
- Node.js 18+
- Cloudflare Workers account
- Claude Desktop or MCP-compatible client
Setup
- Clone or create your MCP server project
- Install dependencies
- Replace your
src/index.ts
with the enhanced server code - Deploy to Cloudflare Workers
- Configure Claude Desktop
Add to your claude_desktop_config.json
:
🛠️ Available Tools
1. generate_intelligent_dashboard
Generate complete dashboard components from natural language descriptions.
Parameters:
description
(string): Natural language description of what you want to buildrequirements
(array, optional): Specific requirementsstyling
(object, optional): Theme and styling preferences
Example:
2. explore_reablocks_components
Discover and explore available Reablocks components by category or search.
Parameters:
category
(enum, optional): Elements, Form, Layout, Layers, Data, Typographysearch
(string, optional): Search term to filter components
Examples:
3. ask_about_components
Ask questions about components in natural language and get intelligent recommendations.
Parameters:
question
(string): Your question about components
Examples:
4. get_component_documentation
Get comprehensive documentation for any Reablocks component.
Parameters:
componentName
(string): Name of the component (e.g., "Button", "Input")
Example:
5. list_all_components
Get a complete overview of all available Reablocks components organized by category.
Parameters: None
💡 Usage Examples
Creating a Login Form
Building a Dashboard
Data Display Components
🎨 Generated Component Features
All generated components include:
✅ React Best Practices
- Functional components with hooks
- Proper state management
- Event handling
- Component composition
✅ TypeScript Support
- Full type definitions
- Interface declarations
- Type-safe props
- Generic type support where applicable
✅ Responsive Design
- Mobile-first approach
- Flexible grid layouts
- Breakpoint-aware styling
- Touch-friendly interactions
✅ Accessibility
- ARIA labels and roles
- Keyboard navigation
- Screen reader support
- Focus management
- Color contrast compliance
✅ Error Handling
- Loading states
- Error boundaries
- Graceful degradation
- User feedback
✅ Modern Styling
- Tailwind CSS classes
- CSS Grid and Flexbox
- Consistent spacing
- Theme-aware colors
📋 Component Categories
Elements (UI Building Blocks)
- Button - Primary, secondary, and text variants
- IconButton - Icon-only buttons with accessibility
- Badge - Status indicators and counts
- Avatar - User profile images and initials
- Chip - Tags, labels, and selectable items
Form Components
- Input - Text, email, password, and other input types
- Select - Dropdown selection with search and multi-select
- Textarea - Multi-line text input
- Checkbox - Single and group checkboxes
- Radio - Radio button groups
- Toggle - Switch controls
- Calendar - Date selection with range support
Layout Components
- Card - Content containers
- Stack - Flexible spacing and alignment
- Divider - Visual separation
- Tabs - Tabbed interfaces
- Breadcrumbs - Navigation trails
- Stepper - Step-by-step processes
Data Display
- DataSize - Human-readable file sizes (1.2 MB, 3.4 GB)
- DateFormat - Flexible date formatting
- Duration - Time duration display
- Ellipsis - Text truncation with expansion
- Pager - Pagination controls
- Sort - Sortable column headers
Overlay Components (Layers)
- Dialog - Modal dialogs and popups
- Drawer - Slide-out panels
- Notification - Toast messages and alerts
- Tooltip - Contextual help text
- Popover - Rich contextual content
- Menu - Dropdown and context menus
🔧 Customization
Styling Options
Component Props
All generated components support standard Reablocks props:
variant
- Visual style variantssize
- Small, medium, large sizingcolor
- Theme-based color schemesdisabled
- Disabled statesclassName
- Custom CSS classes
🤖 Natural Language Processing
The server understands various ways to describe component needs:
Intent Recognition
- Dashboard: "dashboard", "admin panel", "overview", "metrics"
- Form: "form", "input", "submit", "validation", "contact"
- Table: "table", "list", "data grid", "rows and columns"
- Navigation: "menu", "nav", "sidebar", "breadcrumbs"
Component Mapping
- Buttons: "button", "click", "action", "submit"
- Data: "display data", "show information", "file size"
- Layout: "card", "container", "section", "organize"
- Interactive: "select", "choose", "toggle", "check"
📖 Example Conversations
Building a Contact Form
Creating a Data Dashboard
Component Discovery
🚨 Error Handling
The server provides helpful error messages for:
- Invalid component names
- Missing required parameters
- Incompatible component combinations
- Malformed requests
🔄 Updates and Maintenance
Keeping Components Current
The server's component database is based on the latest Reablocks documentation. To update:
- Review new Reablocks releases
- Update component schemas in the code
- Add new examples and use cases
- Test generated components
Performance Optimization
- Component metadata is cached in memory
- Generated code is optimized for bundle size
- Minimal runtime dependencies
- Tree-shakeable imports
🤝 Contributing
Adding New Components
- Add component schema to
ENHANCED_REABLOCKS_COMPONENTS
- Include comprehensive prop definitions
- Add usage examples and use cases
- Update category mappings
Improving NLP
- Extend intent patterns in
ComponentNLP
- Add new keyword mappings
- Improve component suggestion logic
- Test with various user inputs
📄 License
This MCP server is built for use with the Reablocks component library. Please refer to Reablocks licensing for component usage terms.
🔗 Related Links
🆘 Support
For issues related to:
- Generated components: Check Reablocks documentation
- MCP server functionality: Review this README and error messages
- Deployment: Consult Cloudflare Workers documentation
Built with ❤️ for the React and Reablocks community
This server cannot be installed
A Model Context Protocol server that generates production-ready React components using the Reablocks design system through natural language processing.
Related MCP Servers
- AsecurityAlicenseAqualityA production-ready template for creating Model Context Protocol servers with TypeScript, providing tools for efficient testing, development, and deployment.Last updated -1712JavaScriptMIT License
- AsecurityAlicenseAqualityA production-ready template for building Model Context Protocol servers in TypeScript, offering fast development with Bun, Biome linting, and automated version management.Last updated -17JavaScriptMIT License
- AsecurityFlicenseAqualityA Model Context Protocol server that enables AI agents to generate, fetch, and manage UI components through natural language interactions.Last updated -3194TypeScript
- -securityAlicense-qualityA Model Context Protocol server that enables interaction with Foundry tools through natural language, allowing users to create projects, build contracts, run tests, and manage Ethereum development environments.Last updated -1PythonMIT License