Basecoat UI MCP

Basecoat UI MCP

Provides access to 77 pre-built, accessible Basecoat CSS UI components across forms, navigation, feedback, interactive, and layout categories, enabling AI assistants to retrieve HTML components and usage documentation for building user interfaces.

Category
访问服务器

README

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

git clone https://github.com/Sorbh/basecoat-ui-mcp.git
cd basecoat-ui-mcp
npm install

Option 2: Install via npm

npm install -g basecoat-ui-mcp

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

{
  "mcpServers": {
    "basecoat-ui": {
      "command": "node",
      "args": ["/absolute/path/to/basecoat-ui-mcp/server.js"],
      "env": {}
    }
  }
}

If installed globally via npm:

{
  "mcpServers": {
    "basecoat-ui": {
      "command": "basecoat-ui-mcp",
      "env": {}
    }
  }
}

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:

node server.js

Available Tools

The MCP server provides 7 tools that AI assistants can use:

list_components

List all available Basecoat components organized by category.

No parameters required

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
name string Yes Component name (e.g., "button-primary", "card-basic")

Example names:

  • button-primary, button-secondary, button-destructive
  • card-basic, card-with-icon
  • input-with-label, input-invalid
  • alert-success, alert-error

get_usage

Get comprehensive usage documentation for a component type.

Parameter Type Required Description
component 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.

No parameters required

Returns the HTML boilerplate to initialize Basecoat CSS in a new project:

<!-- Tailwind CSS -->
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>

<!-- Basecoat CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/basecoat-css@0.3.1/dist/basecoat.cdn.min.css">
<script src="https://cdn.jsdelivr.net/npm/basecoat-css@0.3.1/dist/js/all.min.js" defer></script>

get_theme_script

Get the theme switcher script for dark/light mode.

No parameters required

Returns a complete JavaScript implementation for theme switching with localStorage persistence.


search_components

Search for components by name or category.

Parameter Type Required Description
query 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
category string Yes One of: forms, navigation, feedback, interactive, layout

Component Library

Forms (20 components)

Component Description
button-primary Primary action button
button-secondary Secondary action button
button-destructive Destructive/danger button
button-ghost Ghost/transparent button
button-outline Outlined button
button-link Link-styled button
button-large Large sized button
button-small Small sized button
button-icon Icon-only button
button-icon-large Large icon button
button-group Grouped buttons
input-basic Basic text input
input-with-label Input with label
input-invalid Input with error state
input-group Grouped inputs
checkbox-basic Basic checkbox
checkbox-with-label Checkbox with label
checkbox-with-description Checkbox with description
radio-group Radio button group
select-basic Select dropdown
textarea-basic Text area input
switch Toggle switch
slider Range slider
label Form label

Layout (17 components)

Component Description
card-basic Basic card container
card-with-icon Card with icon
card-standard Standard card layout
table Data table
avatar-small Small avatar
avatar-medium Medium avatar
avatar-large Large avatar
avatar-fallback Avatar with fallback
pagination Pagination controls
skeleton-basic Basic loading skeleton
skeleton-profile Profile loading skeleton
skeleton-card Card loading skeleton
spinner Loading spinner
empty-state Empty state display
kbd Keyboard key element
item List item

Navigation (6 components)

Component Description
accordion Expandable accordion
breadcrumb-basic Basic breadcrumb
breadcrumb-advanced Advanced breadcrumb
sidebar Sidebar navigation
tabs Tab navigation
command Command palette

Feedback (13 components)

Component Description
alert-standard Standard alert
alert-error Error/destructive alert
alert-success Success alert
badge-primary Primary badge
badge-secondary Secondary badge
badge-destructive Destructive badge
badge-outline Outlined badge
dialog-standard Standard dialog
dialog-modal Modal dialog
dialog-alert Alert dialog
toast Toast notification
progress Progress bar

Interactive (8 components)

Component Description
combobox Searchable select
dropdown Dropdown menu
popover Popover element
tooltip Standard tooltip
tooltip-bottom Bottom tooltip
tooltip-right Right tooltip
theme-switcher 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:

  1. Get the input-with-label component for email/password fields
  2. Get the button-primary component for the submit button
  3. Get the checkbox-with-label for "Remember me"
  4. 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:

  1. get_usage with "toast" to get documentation
  2. get_component with "toast" to get the HTML
  3. get_setup to 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

npm start

Development mode (auto-restart on changes)

npm run dev

Run tests

npm test

Verbose test output

npm run test:verbose

Project Structure

basecoat-ui-mcp/
├── server.js                 # Main MCP server implementation
├── server.test.js            # Test suite
├── package.json              # Node.js configuration
├── style-guide.md            # Comprehensive styling guide
├── claude_desktop_config.json # Example Claude config
│
├── components/               # 77 HTML component files
│   ├── forms/               # Form components
│   ├── layout/              # Layout components
│   ├── navigation/          # Navigation components
│   ├── feedback/            # Feedback components
│   └── interactive/         # Interactive components
│
├── usage/                    # 25 markdown documentation files
│   ├── forms/
│   ├── layout/
│   ├── navigation/
│   ├── feedback/
│   └── interactive/
│
└── scripts/                  # Setup and theme scripts
    ├── setup.html           # CDN setup code
    └── theme-script.html    # Theme switcher script

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.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. 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:

npm test

License

MIT License - see LICENSE for details.

Author

Saurabh K. Sharma - GitHub

Links

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选