html-library-mcp
v0.2.5MCP server for the HTML Library registry — 191 copy-paste components in plain HTML + Tailwind.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
get_design_guide Get design guide
Read the html-library design guide. Call this once before writing or editing component markup — it carries the measured design language (palette, type scale, radius rhythm, dark-mode strategy, state vocabulary) that the server instructions only summarise. Defaults to the design system.
| Parameter | Type | Description |
|---|---|---|
topic | string | One of: design-system, conventions, recipes, troubleshooting, registry-api, components, images, overview |
get_category_guide Get category guide
How one category behaves and looks — canvas size, radius rhythm, type scale, dark-mode strategy and the conventions specific to it. Call this when you are building inside apps, sites, agent or ui.
| Parameter | Type | Description |
|---|---|---|
category * | string | apps | sites | agent | ui | images |
list_components List components
List registry components, optionally filtered by category, surface or tag. Returns names and descriptions, not markup — use get_component_markup for that.
| Parameter | Type | Description |
|---|---|---|
category | string | images | apps | sites | agent | ui |
limit | integer | |
offset | integer | |
surface | string | Whole-screen items only. Omit for parts. |
tag | string | Exact tag match, e.g. "chat". |
search_components Search components
Search components by name, title, description and tags. Use when you know what you want but not what it is called.
| Parameter | Type | Description |
|---|---|---|
query * | string | e.g. "chat", "pricing", "loading spinner" |
category | string | |
limit | integer |
get_categories Get categories
List the registry categories with counts, what each is for, and the canvas each surface is drawn at.
get_component Get component
Get one component in full — metadata, the complete HTML in files[0].content, portability, and (for images) its recreation prompt. Pair with get_design_guide before adapting the markup.
| Parameter | Type | Description |
|---|---|---|
name * | string | Exact component name, e.g. "switch" or "agent-chat". |
get_component_markup Get component markup
Get just the copy-paste HTML for one or more components. This is the whole install step — there is no CLI and nothing to npm install. Call get_design_guide first if you will restyle or extend what you get back.
| Parameter | Type | Description |
|---|---|---|
names * | array | Component names, e.g. ["switch", "agent-chat"]. |
check_portability Check portability
Scan HTML for app-only Tailwind tokens that render invisible outside the html-library docs app, and return the corrected markup. Run this on any component markup before pasting it into another project.
| Parameter | Type | Description |
|---|---|---|
html * | string | The markup or class list to check. |
get_component_portability Get component portability
Check whether a registry component is safe to paste outside this repo, without fetching its markup first.
| Parameter | Type | Description |
|---|---|---|
name * | string | Exact component name. |
lint_html Lint HTML
Validate a fragment against html-library registry conventions — no JavaScript, no className, no external documents, unique ids, matching label/for. These are the exact rules CI enforces on the registry.
| Parameter | Type | Description |
|---|---|---|
html * | string | The markup to validate. |
id | string | Label for the messages, e.g. the intended component name. |
recommend_components Recommend components
Describe what you are building in plain language and get the components to reach for. Use this before search_components when you know the goal but not the vocabulary.
| Parameter | Type | Description |
|---|---|---|
need * | string | e.g. "a pricing page", "chat UI", "somewhere to show a loading state" |
get_recipe Get recipe
Get the composition order for a known pattern — which components nest inside which, and which single component already contains the rest.
| Parameter | Type | Description |
|---|---|---|
recipe * | string | One of: agent-chat-surface, marketing-landing-page, internal-dashboard |
get_interactivity_pattern Get interactivity pattern
Get the CSS-only mechanism for an interaction. This registry ships no JavaScript — if something looks like it needs JS, it does not.
| Parameter | Type | Description |
|---|---|---|
need * | string | One of: tabs, toggle, dismiss, dropdown, row-select |
get_image_prompt Get image prompt
Get the structured recreation brief for an image component — subject, composition, framing geometry, environment, lighting, camera and atmosphere — ready to hand to an image model.
| Parameter | Type | Description |
|---|---|---|
name * | string | Image component name, e.g. "image-sunlit-portrait". |