Provides access to a library of 77 pre-built Basecoat CSS UI components across forms, layout, navigation, feedback, and interactive categories, with comprehensive documentation and usage guides.
Enables retrieval of Basecoat CSS components built on Tailwind CSS v4, including setup code with CDN links and theme switching functionality for dark/light mode support.
Basecoat UI MCP
A Model Context Protocol (MCP) server that provides Claude and other AI assistants with access to a comprehensive library of Basecoat CSS UI components. This server enables AI assistants to retrieve pre-built, accessible HTML components and usage documentation for building user interfaces.
Features
77 Pre-built Components - Production-ready HTML components across 5 categories
7 MCP Tools - List, search, retrieve components and documentation
Comprehensive Docs - 25 detailed usage guides with examples
Dark/Light Mode - Built-in theme switching support
Accessibility First - All components include proper ARIA attributes
Requirements
Node.js >= 18.0.0
npm (included with Node.js)
Installation
Option 1: Clone from GitHub
Option 2: Install via npm
Configuration
Claude Desktop
Add the server to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
If installed globally via npm:
After updating the config, restart Claude Desktop to load the MCP server.
Other MCP Clients
The server uses standard I/O (stdio) transport and is compatible with any MCP-compliant client. Start the server with:
Available Tools
The MCP server provides 7 tools that AI assistants can use:
list_components
List all available Basecoat components organized by category.
Returns a complete inventory of all 77 components with names, categories, and filenames.
get_component
Retrieve the HTML code for a specific component.
Parameter | Type | Required | Description |
| string | Yes | Component name (e.g., "button-primary", "card-basic") |
Example names:
button-primary,button-secondary,button-destructivecard-basic,card-with-iconinput-with-label,input-invalidalert-success,alert-error
get_usage
Get comprehensive usage documentation for a component type.
Parameter | Type | Required | Description |
| string | Yes | Component type (e.g., "button", "card", "input") |
Returns detailed markdown documentation with examples, variants, and best practices.
get_setup
Retrieve Basecoat CSS setup code with CDN links.
Returns the HTML boilerplate to initialize Basecoat CSS in a new project:
get_theme_script
Get the theme switcher script for dark/light mode.
Returns a complete JavaScript implementation for theme switching with localStorage persistence.
search_components
Search for components by name or category.
Parameter | Type | Required | Description |
| string | Yes | Search term (e.g., "button", "form", "navigation") |
Returns matching components with match type (name or category match).
get_category
Get all components in a specific category.
Parameter | Type | Required | Description |
| string | Yes | One of:
,
,
,
,
|
Component Library
Forms (20 components)
Component | Description |
| Primary action button |
| Secondary action button |
| Destructive/danger button |
| Ghost/transparent button |
| Outlined button |
| Link-styled button |
| Large sized button |
| Small sized button |
| Icon-only button |
| Large icon button |
| Grouped buttons |
| Basic text input |
| Input with label |
| Input with error state |
| Grouped inputs |
| Basic checkbox |
| Checkbox with label |
| Checkbox with description |
| Radio button group |
| Select dropdown |
| Text area input |
| Toggle switch |
| Range slider |
| Form label |
Layout (17 components)
Component | Description |
| Basic card container |
| Card with icon |
| Standard card layout |
| Data table |
| Small avatar |
| Medium avatar |
| Large avatar |
| Avatar with fallback |
| Pagination controls |
| Basic loading skeleton |
| Profile loading skeleton |
| Card loading skeleton |
| Loading spinner |
| Empty state display |
| Keyboard key element |
| List item |
Navigation (6 components)
Component | Description |
| Expandable accordion |
| Basic breadcrumb |
| Advanced breadcrumb |
| Sidebar navigation |
| Tab navigation |
| Command palette |
Feedback (13 components)
Component | Description |
| Standard alert |
| Error/destructive alert |
| Success alert |
| Primary badge |
| Secondary badge |
| Destructive badge |
| Outlined badge |
| Standard dialog |
| Modal dialog |
| Alert dialog |
| Toast notification |
| Progress bar |
Interactive (8 components)
Component | Description |
| Searchable select |
| Dropdown menu |
| Popover element |
| Standard tooltip |
| Bottom tooltip |
| Right tooltip |
| Dark/light mode toggle |
Usage Examples
Example 1: Building a Form
Ask Claude:
"Create a login form using Basecoat components"
Claude will use the MCP tools to:
Get the
input-with-labelcomponent for email/password fieldsGet the
button-primarycomponent for the submit buttonGet the
checkbox-with-labelfor "Remember me"Combine them into a complete, accessible form
Example 2: Adding Notifications
Ask Claude:
"How do I add toast notifications to my app?"
Claude will use:
get_usagewith "toast" to get documentationget_componentwith "toast" to get the HTMLget_setupto ensure you have the required scripts
Example 3: Searching for Components
Ask Claude:
"What button components are available?"
Claude will use search_components with "button" to list all button variants.
Running the Server
Start the server
Development mode (auto-restart on changes)
Run tests
Verbose test output
Project Structure
About Basecoat CSS
Basecoat CSS is a modern component library built on Tailwind CSS v4. It provides:
Semantic HTML components with proper accessibility
CSS custom properties for theming
Dark mode support out of the box
Minimal JavaScript for interactive components
WAI-ARIA compliant components
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Fork the repository
Create your feature branch (
git checkout -b feature/amazing-feature)Commit your changes (
git commit -m 'Add some amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request
Testing
The project includes comprehensive tests covering:
Component retrieval and validation
Category filtering and organization
Search functionality
Documentation availability
Error handling and edge cases
Performance benchmarks
Run the full test suite:
License
MIT License - see LICENSE for details.
Author
Saurabh K. Sharma - GitHub