html-library-mcp

v0.2.5
html-library-mcp Checked 3 days ago Published 4 months ago

MCP 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.

ParameterTypeDescription
topicstringOne 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.

ParameterTypeDescription
category *stringapps | 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.

ParameterTypeDescription
categorystringimages | apps | sites | agent | ui
limitinteger
offsetinteger
surfacestringWhole-screen items only. Omit for parts.
tagstringExact 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.

ParameterTypeDescription
query *stringe.g. "chat", "pricing", "loading spinner"
categorystring
limitinteger

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.

ParameterTypeDescription
name *stringExact 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.

ParameterTypeDescription
names *arrayComponent 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.

ParameterTypeDescription
html *stringThe 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.

ParameterTypeDescription
name *stringExact 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.

ParameterTypeDescription
html *stringThe markup to validate.
idstringLabel 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.

ParameterTypeDescription
need *stringe.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.

ParameterTypeDescription
recipe *stringOne 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.

ParameterTypeDescription
need *stringOne 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.

ParameterTypeDescription
name *stringImage component name, e.g. "image-sunlit-portrait".