Basecoat UI

io.github.Sorbh由 GitHub 帳號 Sorbh 發布v2.0.1更新於 Oct 29, 2026

Basecoat UI 1.0 components (shadcn/ui look in plain HTML + Tailwind) with usage docs and setup.

已驗證STDIO僅桌面知識與記憶開發者工具

概覽

AI 產生的概覽

提供 Basecoat UI 元件的 HTML、用法文件與初始化程式碼,讓助理寫出正確的 Basecoat 標記,而不是自行猜測類別名稱。

可以做什麼
  • 依名稱或分類列出、搜尋元件,並瀏覽某個分類下的所有元件
  • 取得指定元件或變體的現成 HTML 程式碼
  • 讀取元件的用法文件,包含 JS 需求與移轉說明
  • 取得含 CDN 連結的 CSS 初始化程式碼,以及深色/淺色主題切換腳本
適用情境
適合在使用 Basecoat CSS 框架(純 HTML 加 Tailwind 的 shadcn/ui 風格)建立介面時使用,讓助理直接取用真實的元件標記與文件,而不是自行編造類別名稱。
執行需求
以 stdio 方式在本機執行,通常透過 npx 啟動 basecoat-ui-mcp 套件,因此需要 Node.js 以及下載該套件的網路連線。未宣告任何帳號、API 金鑰或環境變數。
安裝前請注意
此伺服器只回傳元件程式碼與文件,產生的 HTML 仍由助理寫入你的專案,提交前請先檢查。它對應 Basecoat 1.0.2,標記與 0.3.x 不同,舊專案可能需要相容樣式表。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Basecoat UI,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

[ChatGPT Image Aug 15, 2025, 10_10_22 AM]

Basecoat MCP Server

[npm version] [npm downloads] [Basecoat] [MCP Registry] [License: MIT]

Give your AI assistant the full Basecoat UI component library (the shadcn/ui look in plain HTML + Tailwind, no React), so it writes correct Basecoat markup instead of guessing class names.

Kept in sync with Basecoat releases. Basecoat 1.0.2 shipped with breaking API changes; this MCP was updated to it the same day.

[Install in Cursor] [Install in VS Code]

[Demo: asking Claude for a Basecoat login page]

Story

While building my hobby project — turning old devices into a Digital Photo Frame — I struggled with UI components. I wanted to use Basecoat CSS, the HTML port of ShadCN UI, but there was no MCP server to easily pull components and docs into AI-assisted coding.

So I built one.
This is my first MCP server, and it’s here to make working with Basecoat (and ShadCN-style components) effortless for everyone. Feedback and contributions are welcome!


A Model Context Protocol (MCP) server that provides programmatic access to Basecoat CSS components and their usage documentation. This server allows AI assistants to help developers build HTML interfaces using the Basecoat CSS framework.

Features

  • Basecoat 1.0.2: All markup follows the 1.0 API (class="btn" data-variant="outline", .field, method-based JS).
  • 90+ Component Variants: Buttons, fields, input groups, cards, dialogs, command menus, drawers, charts and more.
  • Usage Documentation: Implementation guides for 30 components, including JS requirements and 0.x migration notes.
  • Setup Scripts: CDN links for any style pack (Vega, Nova, Maia, Lyra, Mira, Luma, Sera, Rhea) and the theme script.
  • Search & Discovery: Find components by name or category.
  • Accessibility Ready: All components include ARIA attributes and semantic HTML.

Quick Start

No install needed: every client runs the server with npx.

Claude Code

bash
claude mcp add basecoat-ui -- npx -y basecoat-ui-mcp

Claude Desktop

Add to claude_desktop_config.json:

json
{  "mcpServers": {    "basecoat-ui": {      "command": "npx",      "args": ["-y", "basecoat-ui-mcp"]    }  }}

Cursor

Click Install in Cursor above, or add to ~/.cursor/mcp.json:

json
{  "mcpServers": {    "basecoat-ui": {      "command": "npx",      "args": ["-y", "basecoat-ui-mcp"]    }  }}

VS Code (GitHub Copilot)

Click Install in VS Code above, or add to .vscode/mcp.json:

json
{  "servers": {    "basecoat-ui": {      "command": "npx",      "args": ["-y", "basecoat-ui-mcp"]    }  }}

Windsurf

Add to ~/.codeium/windsurf/mcp_config.json:

json
{  "mcpServers": {    "basecoat-ui": {      "command": "npx",      "args": ["-y", "basecoat-ui-mcp"]    }  }}

Codex CLI

Add to ~/.codex/config.toml:

toml
[mcp_servers.basecoat-ui]command = "npx"args = ["-y", "basecoat-ui-mcp"]

Other MCP clients

Run npx -y basecoat-ui-mcp as a stdio server.

Try it

Ask your assistant something like:

Build a sign-up page with Basecoat: a card with GitHub/Google buttons, email and password fields, and a dark mode toggle.

It will call get_setup, pull the matching components and usage docs, and return HTML that uses the real Basecoat 1.0 API.

Local Development

bash
git clone https://github.com/Sorbh/basecoat-ui-mcp.gitcd basecoat-ui-mcpnpm install

Point your client at the local copy:

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

Available Tools

ToolDescriptionParameters
get_componentGet HTML code for a specific component variantname: Component name (e.g., "button-outline", "field", "command"). Prefix with a category to disambiguate (e.g., "layout/pagination")
list_componentsList all available components organized by categoryNone
get_usageGet usage documentation for a componentcomponent: Component name (e.g., "button", "combobox"). Variant names fall back to their base doc ("button-primary" → "button")
get_setupGet Basecoat CSS setup code with CDN linksstyle (optional): vega (default), nova, maia, lyra, mira, luma, sera, rhea
get_theme_scriptGet theme switcher script for dark/light modeNone
search_componentsSearch for components by name or categoryquery: Search term (e.g., "button", "form", "navigation")
get_categoryGet all components in a specific categorycategory: combine, feedback, forms, interactive, layout, navigation

Component Categories

Forms

  • Button: default, secondary, outline, ghost, link, destructive, sizes, icon, with-icon, loading
  • Button Group: horizontal, vertical
  • Field / Fieldset: label, description, invalid state, grouped fields
  • Input / Input Group: basic, with-label, invalid, with icon, with button
  • Select: native select, JS select
  • Checkbox, Radio Group, Switch: with labels and descriptions
  • Slider, Textarea, Label, Form container

Navigation

  • Tabs, Accordion, Breadcrumb, Sidebar

Feedback

  • Alert: default, success, error
  • Alert Dialog, Dialog: confirmation and modal forms
  • Badge: primary, secondary, destructive, outline
  • Toast, Empty, Progress, Spinner

Interactive

  • Command: inline and dialog palettes
  • Combobox: input-first searchable select
  • Dropdown Menu, Popover, Tooltip
  • Drawer (beta): bottom and side
  • Theme Switcher

Layout

  • Card, Avatar, Item, Kbd, Scroll Area
  • Skeleton, Table, Pagination
  • Chart (beta)

Combine

Composed examples: chat, login, settings, interactive pagination.

Upgrading from 1.x of this MCP

Version 2.0.0 of this MCP targets Basecoat 1.0.2, which has breaking changes from Basecoat 0.3.x:

  • Variant classes became data attributes: btn-outline → class="btn" data-variant="outline", btn-sm-icon → data-size="icon-sm".
  • The .form wrapper was removed; wrap each label and control in <div class="field">.
  • Document events (basecoat:toast, basecoat:sidebar, basecoat:theme) were replaced by methods: toaster.toast(), sidebar.toggle(), window.basecoat.theme.toggle().
  • dialog-alert was renamed to alert-dialog.

If your project still has 0.x markup, load Basecoat's compatibility stylesheet after Basecoat while you migrate (@import "basecoat-css/compat";). See style-guide.md for the full migration guide.

Directory Structure

basecoat-mcp/├── components/           # HTML component files│   ├── combine/         # Composed page examples│   ├── feedback/        # Alerts, badges, dialogs, toasts│   ├── forms/           # Buttons, fields, inputs, selects│   ├── interactive/     # Command, combobox, dropdowns, tooltips│   ├── layout/          # Cards, tables, avatars, items│   └── navigation/      # Tabs, accordion, sidebar├── usage/               # Usage documentation (same categories)├── scripts/             # Setup and theme scripts├── style-guide.md       # Full Basecoat 1.0 style and migration guide├── server.js            # MCP server implementation├── package.json└── README.md

Categories are read from disk, so adding a folder under components/ or usage/ is enough to expose it.

About Basecoat CSS

Basecoat CSS is a comprehensive CSS framework that provides:

  • Accessible, semantic components
  • Dark/light theme support
  • Tailwind CSS integration
  • JavaScript-enhanced interactions
  • Mobile-responsive design

Learn more at basecoatui.com

License

MIT License - see LICENSE file for details.

Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes following our coding standards
  4. Test your changes thoroughly
  5. Commit with clear messages: git commit -m 'Add amazing feature'
  6. Push to your branch: git push origin feature/amazing-feature
  7. Open a Pull Request

Support


Built with ❤️ by Claude Code - Monitored & Prompted by Saurabh K. Sharma

來源:README.md,提交 adab251

工具

7

get_component

Get HTML code for a specific Basecoat component

輸入參數name必填

list_components

List all available Basecoat components organized by category

無需輸入參數。

get_usage

Get usage documentation for a component

輸入參數component必填

get_setup

Get Basecoat CSS setup code with CDN links

輸入參數style

get_theme_script

Get theme switcher script for dark/light mode

無需輸入參數。

search_components

Search for components by name or category

輸入參數query必填

get_category

Get all components in a specific category

輸入參數category必填

版本歷史

1
  1. v2.0.1最新Oct 23, 2026

評分

已滿足適用檢查項的 80%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。