Getting Started

MCP Server

An AI coding agent that doesn't know this library guesses at it — inventing props, using icon names that don't exist, and rebuilding components that already ship. @jgastager/bundy-ui-mcp gives it the real thing: every component's API, the examples from this site, the design tokens, and a validator that checks the markup it writes back against what the components actually accept.

What it serves

Every component's real API

Props with their resolved allowed values and defaults, events with payload types, slots, and the TypeScript interfaces a prop expects — the item shape for a menu, a table column, a chat message.

Curated examples

The same reviewed samples rendered on every component page here, with the prose explaining what each one demonstrates.

Notes and gotchas

The hand-written, non-obvious behavior per component — the things a prop table can't tell you.

Design tokens

Color scales, semantic surface/text tokens, spacing and radius scales, breakpoints, and the preset's custom utilities.

All 254 icon names

Searchable, so an agent stops inventing names that silently render nothing.

Whole-screen recipes

App shell, auth page, searchable data table, confirm dialog, command palette, settings form, chat panel — each validated against the current API.

The payload is generated from this repo — component sources, the notes and examples on every component page, and preset.ts — and bundled into the package, so it works in any project without access to this repo.

Setup

This is a private package, so set up registry auth first — see Installation for the two npmrc entries. Skipping it is worth avoiding here in particular: the install fails with a 401 that most MCP clients swallow, so the server just goes quietly missing rather than reporting an error.

Then install it as a dev dependency in the project your agent works in:

bash
npm install -D @jgastager/bundy-ui-mcp

Then point your client at it. It speaks MCP over stdio — no server to run, no network access, no configuration beyond this:

.mcp.json
json
{
  "mcpServers": {
    "bundy-ui": {
      "command": "npx",
      "args": ["-y", "@jgastager/bundy-ui-mcp"]
    }
  }
}

Committed at the project root, so everyone on the team gets the same server.

Already wired up in this repo

BundyUI registers the server from its own working tree in .mcp.json, so an agent developing the library sees changes as soon as npm run data has been run.

Tools

Ten tools, described so an agent picks the right one without being told to.

Tool
What it answers
list_components
What exists, by category or keyword — the check to run before building any UI.
get_component
One component's full API: props with allowed values and defaults, events, slots, referenced interfaces, and notes.
search_docs
Ranked search across components, guides, recipes, examples and icons from a plain-English goal.
get_examples
Reviewed code samples for a component, with the prose explaining each.
validate_usage
Lints markup against the real API and reports every problem with the line it's on.
list_icons
The icon names every icon-style prop accepts.
get_tokens
Colors, semantic tokens, spacing, radius, breakpoints, custom utilities.
get_guide
Installation, theming, component defaults, icons, composables, forms, overlays, troubleshooting, authoring.
get_recipe
Complete multi-component compositions for a whole screen.
get_component_source
The component's full .vue source, when the documented API isn't enough.

The validator

Most Bundy UI mistakes don't throw. An icon name that doesn't exist resolves to nothing and renders blank; an invalid variant falls through to an undefined class lookup; a <template #actions> on a component with no such slot silently drops its content. None of that surfaces as an error — it just quietly doesn't work.

validate_usage catches all of it statically, before the code is ever run:

What the agent wrote

vue
<UiButton variant="glass" colour="primary" icon="sparkless">
  Go
</UiButton>

What it gets back

text
3 error(s), 0 warning(s). This markup will not work as written.

❌ line 1, <UiButton> — "glass" isn't a valid Button.variant.
   ↳ Allowed: "solid" | "subtle" | "soft" | "ghost".
❌ line 1, <UiButton> — <UiButton> has no prop "colour".
   ↳ Did you mean "color"?
❌ line 1, <UiButton> — "sparkless" isn't a bundled icon — icons
   resolve by name at runtime and a miss renders nothing.
   ↳ Did you mean "sparkles"?

It checks unknown components, misspelled props, invalid enum values, missing required props, unknown slot and event names, unbundled icon names, one-way v-model bindings, and overlays given both open and defaultOpen . Anything it can't resolve statically — a bound expression, a v-bind spread — is skipped rather than guessed at, so a clean result means something.

The same validator runs at build time over every recipe the server ships, so a composition can't drift from the component API without the build saying so.

Resources & prompts

Beyond tools, the same knowledge is addressable as MCP resources — useful for attaching a component's docs to a conversation directly:

bundy-ui://overviewbundy-ui://componentsbundy-ui://components/{name}bundy-ui://guides/{topic}bundy-ui://recipes/{id}bundy-ui://tokensbundy-ui://iconsbundy-ui://composables

And three prompts, each encoding the tool sequence that produces correct code so the discipline doesn't depend on the agent remembering it:

Prompt
What it does
build-with-bundy-ui
Plans and writes a piece of UI: search first, read the API, copy an example, style with tokens, then validate until clean.
audit-bundy-ui-usage
Audits existing markup for invalid usage, hand-rolled components the library already covers, and raw values that should be tokens.
theme-bundy-ui
Installs or rethemes a project through the two supported config surfaces, never by forking the package.

Keeping it current

The server reads a generated payload, not the live source. After changing a component, an example, a note, or the preset, regenerate it — the same npm run data that rebuilds this site's data:

bash
npm run data       # docs data + package manifest + MCP payload
npm run data:mcp   # just the MCP payload

Set BUNDY_UI_MCP_DATA to a directory holding a freshly generated bundy-ui.json to serve a working tree instead of the bundled snapshot. To verify the server itself:

bash
npm run mcp:test   # spawns the server, exercises every tool over real JSON-RPC

Without MCP

Agents that can't speak MCP still get a usable fallback: the package ships component-docs.json (every component's props, events and slots) and an AGENTS.md next to it, both readable straight out of node_modules .

ts
import components from "@jgastager/bundy-ui/component-docs.json";

const button = components.find((c) => c.name === "Button");

It's the same component data, without the examples, tokens, guides, recipes or validation.