mcp-server
v1.3.0MCP server for Veritheme UI component library — provides components, design tokens, themes, and snippets to AI assistants
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
get_project_system
Read the project system manifest (veritheme.system.json) and tokens from VERITHEME_PROJECT_DIR or cwd. Reports the actual theme revision, library version, normalized tokens and whether the token file changed. Call before generating UI; do not substitute preset tokens for this system.
list_components
List all Veritheme UI components grouped by category with descriptions. ALWAYS check this list (or use `search`) before hand-writing any UI markup — if a component exists for the element you need, use it instead of composing utility classes.
get_component
Get full details for a Veritheme component: CSS classes, variants, sizes, anatomy, states, its contract (what may be customized), and HTML snippet. Call this BEFORE writing markup for a component and use its classes exactly — pick variants/sizes from the listed classes rather than overriding with utility classes.
| Parameter | Type | Description |
|---|---|---|
name * | string | Component name or id, e.g. 'button', 'card', 'accordion' |
get_tokens
Get Veritheme design tokens (colors, spacing, radius, fontSize, shadow, etc.). With a project veritheme.system.json present, the active project system's tokens are returned instead of the presets.
| Parameter | Type | Description |
|---|---|---|
group | string | Token group to filter: colors, radius, spacing, fontSize, fontWeight, lineHeight, borderWidth, shadow, zIndex, transition. Omit for overview. |
get_theme
Get Veritheme theme configuration (the one shipped preset: default). With a project veritheme.system.json present and no name, the active project system is returned (name, revision, normalized tokens) instead of the preset list.
| Parameter | Type | Description |
|---|---|---|
name | string | Theme name: 'default' (the only preset; 'project' forces the project system). Omit to list the presets — or, with a project system installed, to get that system. |
get_snippet
Get a ready-to-use HTML snippet for a Veritheme component, or one of its named examples (underline tabs, a grouped menu…). The default answer lists the examples available.
| Parameter | Type | Description |
|---|---|---|
component * | string | Component name, e.g. 'Button', 'Card', 'Dialog' |
example | string | Named example from the list get_snippet or get_component shows, e.g. 'underline' |
get_figma_reader
Implementing a Figma frame drawn with Veritheme components? Start here. Returns a read-only script to run through the Figma MCP's use_figma; its result goes to figma_to_markup. Use this instead of get_design_context, which flattens instances and loses which component and variant each one is.
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | A Figma link with a node-id, or the frame id, e.g. '4:2'. Several, separated by commas, or a page id, read the states of one screen in one call |
part | integer | For a read that came back in parts (`parts` above 1): the part to read next, from 1 |
figma_to_markup
Translate a Figma frame (the result of the get_figma_reader script) into HTML with Veritheme classes: each instance becomes its component, a changed layer becomes a slot of its contract, frames become layout utilities. Lists what it could not translate instead of guessing, the icons to fill in and the components whose behaviour to wire.
| Parameter | Type | Description |
|---|---|---|
icons | string | How the design's own drawings (icons, mascots, logos) come: `inline` (default), each one in full where it is used; `sprite`, each drawing once as a `<symbol>` in an "Icon sprite" section, and a `<use>… |
parts | boolean | Inside a project component, give each layer one class of the component (`aw-sidebar__header`) and move its layout utilities and exact values into the component's CSS, instead of utilities in the marku… |
path | string | A file that holds the reader's result (absolute, or relative to the project). Use it when the client saved the use_figma result to a file, or to avoid retyping a large snapshot |
raw | boolean | Also write CSS for values the design sets as numbers (a width of 256, a gradient, text with no style): the element gets a `data-layer` and the exact value goes into a CSS section. Off by default: such… |
snapshot | What the reader script returned, as an object or a JSON string. For a large result prefer `path` | |
spriteHref | string | With `icons: "sprite"`: the file the sprite is saved as (`./icons.svg`), put before `#` in every `<use href>`. Empty (default): the sprite goes in the page |
check_figma_frame
Drew or changed a frame in Figma? Check it before you call it done. Pass what the get_figma_reader script returned for the frame (with the frame it opens from, to check its popups): the same rules and words as Check in the Veritheme plugin — instances drawn in a state, numbers not bound to variables, text without a style, controls resized, popups of your own or that resize their component, a click inside a click — each place with its layer id. Says what a read cannot show (pictures; the whole file is the plugin's Check).
| Parameter | Type | Description |
|---|---|---|
format | string | `text` (default) or `json`: { frames, findings: [{ rule, severity, title, say, count, places: [{ where, id }] }], notSeen } |
path | string | A file that holds the reader's result (absolute, or relative to the project) |
snapshot | What the reader script returned, as an object or a JSON string. For a large result prefer `path` |
figma_to_page
Build one page from the Veritheme plugin's Export for code of several artboards of one screen: regions drawn the same are written once, the rest per state with `data-vt-show`; project components get their own classes and CSS, the design's drawings one sprite, the prototype's transitions `data-vt-go`. The library's states.js switches the states, so the page needs no script of its own. Writes index.html, components.css, page.css and the library files into a directory inside the project, with handoff.json and HANDOFF.md: what the page is made of (states, transitions, components, sample data, open…
| Parameter | Type | Description |
|---|---|---|
out * | string | The directory to write the page into, inside the project (relative to it, or absolute) |
path * | string | The snapshot file the plugin saved (absolute, or relative to the project) |
debug | boolean | Add a State select and a Dark button in the corner, for reviewing the states. Off by default |
prefix | string | Before every project component's class, e.g. `aw-` → `aw-sidebar` |
semantics | boolean | Elements that mean what they are: a project component named Sidebar, Header, Footer or Nav is that element, and a layer that leads somewhere on a click and holds nothing clickable is a <button>. On by… |
sprite | string | `inline` (default): the drawings' sprite at the top of <body>; `file`: icons.svg next to the page (a page opened from disk cannot load it) |
figma_diff
What changed between two exports of one Figma design (the Veritheme plugin's Export for code, or a get_figma_reader read): frames added, removed and renamed; per layer, components added and removed, variants and texts changed, transitions, least and most sizes, placement, layout, fills and type; the library's components and the theme. One line per kind with a count, then each kind by the layer it is on (one layer on twenty frames is one line). When the new snapshot's reader reads more than the old one's, the changes of those kinds are marked as possibly read for the first time. A page built by…
| Parameter | Type | Description |
|---|---|---|
new * | string | The newer snapshot file (absolute, or relative to the project) |
old * | string | The older snapshot file (absolute, or relative to the project) |
search
Search across Veritheme components, CSS classes, design tokens, and snippets. Use this FIRST whenever you are about to build a UI element — search for what you need (e.g. 'badge', 'divider', 'avatar') and prefer the matching component over hand-rolled utility markup.
| Parameter | Type | Description |
|---|---|---|
query * | string | Search query, e.g. 'border', 'primary', 'spacing' |
list_patterns
List composition patterns — proven page skeletons (dashboard, settings, sign-in, chat, mail, …) distilled from real Veritheme screens. Call this FIRST when building a full page or screen, then fetch the closest one with `get_pattern`.
get_pattern
Get a composition pattern: the element/class skeleton of a proven Veritheme screen with content elided. Use it as the structural starting point for a page and fill it with real content — adapt the structure, keep the rhythm.
| Parameter | Type | Description |
|---|---|---|
id * | string | Pattern id from list_patterns, e.g. 'dashboard', 'settings', 'sign-in', 'task-detail' |
get_guidelines
The full Veritheme rulebook for AI generation: component-first rules, spacing scale, color semantics, JS bundle wiring, page rhythm, common mistakes and the self-review checklist. Call this ONCE at the start of any UI-building session — server instructions carry only a summary. Drawing in Figma instead of writing markup: topic `figma` — the rules for building a frame from the library's instances, each with how it is checked.
| Parameter | Type | Description |
|---|---|---|
topic | string | `markup` (default): the rules for writing HTML. `figma`: the rules for drawing in Figma through the Figma MCP |
get_starter
Ready-to-copy HTML page skeleton: Veritheme CSS+JS CDN links, dark-mode setup, theme activation, icon rules. Call this when starting a new page/document so includes and bootstrapping are exact instead of guessed.
validate_markup
Lint generated HTML against the Veritheme rules: off-scale/unknown vt-* classes (which silently render as nothing), sub-12px text, card-in-card nesting, multiple primary buttons, unlabeled icon-only buttons, component classes on composition children, hardcoded colors, dead hover-only controls. ALWAYS run this on your final markup and fix every error before returning it.
| Parameter | Type | Description |
|---|---|---|
html * | string | The HTML markup to validate |
format | string | 'text' (default) — the readable report; 'json' — structured findings {rule, line, snippet, fix} for applying fixes programmatically |
path | string | The file this markup is from (or its directory). Stylesheets the page links with a relative path are read from there, so the project's own custom properties are not reported as unknown. Defaults to th… |
derive_theme
Build a complete Veritheme theme from ONE brand colour (hex, hsl() or an HSL triplet): the brand ramp, hover/active/disabled, the text colour on every fill and the four intents' states are all derived by the library's own engine — the same one the builder at veritheme.com/studio uses. Returns theme.css (activate with data-theme="<name>"), a DTCG tokens.json for the Figma plugin, and the theme JSON for audit_contrast. Use this instead of hand-writing colour variables.
| Parameter | Type | Description |
|---|---|---|
brand * | string | Brand colour: '#1072ea', 'hsl(213 87% 49%)' or '213 87% 49%' |
font | string | font-family stack to use instead of the default preset's |
intents | object | Override intent fills (same colour formats). Omit to keep the default preset's. |
name | string | Theme name, becomes the data-theme value (default 'custom-theme') |
output | string | What to return (default 'both') |
audit_contrast
Score every colour pair the components actually put next to each other (text on surfaces, accents on surfaces, text on fills) by the WCAG 2.x contrast ratio against the AA thresholds, light and dark, for a preset theme or a theme JSON. Failing pairs come with the nearest step of the same ladder that meets the ratio. Run it on any theme you derived or edited before shipping it. The scores help you review a theme; they do not certify conformance with WCAG or with accessibility law.
| Parameter | Type | Description |
|---|---|---|
custom | string | Theme JSON (get_theme / derive_theme shape; {palette.family.step} refs allowed); overrides `name` |
name | string | Preset: 'default' (the only preset, also the default) |
explain_token
What a design token is FOR and what it resolves to: the role's purpose in one sentence, its light/dark values in the default theme, the palette step behind them, and which components read it. Accepts any spelling: '--vt-surface-subtle', 'surfaceSubtle', 'vt-bg-brand-fill', 'var(--vt-danger-fill-hover)'. Call it before picking a colour token you are not sure about.
| Parameter | Type | Description |
|---|---|---|
name * | string | Token name in any form |
get_theme_css
Generate the ready CSS custom-properties block for a Veritheme theme. Pass `name` for the preset ('default' — it already ships in veritheme.min.css, so normally nothing is needed), or `custom` with a theme JSON to derive a full custom theme (brand scale, hover/active states and on-accent colors are computed automatically).
| Parameter | Type | Description |
|---|---|---|
custom | string | Theme JSON, DTCG tokens.json, or a current system.json snapshot; overrides name |
name | string | Preset theme name: 'default' (the only preset) |
list_project_components
List CUSTOM components already built for THIS project (the project's own design-system layer on top of the library, stored in veritheme.project.json). Call this alongside list_components before building any custom block — if a similar block exists here, REUSE it verbatim instead of re-inventing a near-copy.
get_project_component
Get a registered project component's exact markup (and JS wiring). Reuse it VERBATIM — adapt content, never the structure/classes — so every instance of the entity looks identical.
| Parameter | Type | Description |
|---|---|---|
id * | string | Project component id or name, e.g. 'bank-card' |
register_project_component
Register (or update) a CUSTOM component you just built for this project, so it can be reused verbatim later — by you on the next page and by future sessions. MUST be called whenever you create a non-trivial custom block that could ever appear twice (a bank card, a KPI tile, a branded empty state). Re-register with the same id when the design changes — then update every existing usage too.
| Parameter | Type | Description |
|---|---|---|
description * | string | One line: what this block is |
html * | string | The exact reusable markup (content may be placeholder-ish, structure/classes are canonical) |
name * | string | Human name, e.g. 'Bank card' |
figma | object | Link to the Figma component this block is, so figma_to_markup places this markup for its instances |
id | string | Stable id (kebab-case); defaults to slugified name |
js | string | JS wiring the block needs, if any |
usage | string | When to reuse it, e.g. 'any place a payment card is shown' |