Kaava
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Kaava generates and maintains a project's design system.
You supply the brand color and pick a style; Kaava computes the full token set deterministically: OKLCH color ramps, semantic light/dark roles that are contrast-checked, type scale, spacing, radii, shadows, motion.
Typical flow:
kaava_create_system with a brief -> writes kaava.json (the source of truth) in the project root.
kaava_emit -> writes tokens for the project's stack (css, tailwind, scss, ts, dtcg) and DESIGN.md with usage rules.
Read DESIGN.md (or kaava_get_tokens) before writing UI, and use tokens instead of hard-coded values.
kaava_update_system to adjust the brief or override single tokens; previously emitted files are regenerated.
kaava_audit after color or size changes, and kaava_check_contrast before using any color pairing the system does not already promise.
Never edit kaava.json or emitted files by hand; they are regenerated.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| prompts | {
"listChanged": true
} |
| resources | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| kaava_create_systemA | Generate a complete design system from a short brief and save it as kaava.json in the project root. Only brandColor is required; style picks a hand-authored character for the rest (read kaava://styles for what each one is). Returns a summary and a contrast report. Follow with kaava_emit to write tokens for the project stack. |
| kaava_update_systemA | Change the existing design system: patch brief fields (everything is re-derived) and/or override individual tokens. Files written earlier by kaava_emit are regenerated. Overrides are keyed by token path, e.g. {"radius.control": "{radius.full}", "dark:color.primary": "#8b9cff", "font.size.base": "1.0625rem"}; prefix semantic colors with "light:" or "dark:" to target one theme. |
| kaava_get_tokensA | Look up tokens from the current design system. Without a path, returns the list of token groups. With a path prefix ("color", "color.primary", "palette.neutral", "font.size", "space", "radius", "shadow"), returns each token with its CSS variable and value. Semantic colors live under "color"; raw ramps under "palette". |
| kaava_emitA | Write the design system out for the project stack. Targets: "css" (custom properties, works with any framework), "tailwind" (Tailwind v4 @theme), "scss", "ts" (typed token object for React/Vue/Svelte/React Native), "dtcg" (W3C design tokens JSON for Figma/Style Dictionary), "design-md" (DESIGN.md in the open DESIGN.md format: tokens as YAML front matter plus usage rules, for agents and people), "preview" (self-contained preview.html showing the system in use, for the user to open in a browser). The choice is remembered, so later kaava_update_system calls regenerate the same files. |
| kaava_auditA | Accessibility audit of the current design system against WCAG 2.2 AA, in light and dark. Checks every promised foreground/background pairing (4.5:1 text, 3:1 UI, with APCA Lc for reference), whether solid fills have a visible boundary, whether status colors stay distinguishable with color-vision deficiencies (protanopia, deuteranopia, tritanopia), control target sizes and minimum text size. Run after overriding colors or sizes. It audits the tokens, not rendered pages. |
| kaava_check_contrastA | Check one foreground/background pair against WCAG 2.2 and report the APCA Lc value. Each color is a CSS color ("#767676", "rgb(0 0 0 / 0.6)") or a token of the current design system ("color.fg-muted", "--color-primary", "palette.neutral.400"). When the pair fails, returns the nearest passing color of the same hue and the system text colors that do pass on that background. Use it before introducing a pairing the system does not already promise. Works without a kaava.json when both colors are CSS colors. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| new-design-system | Interview the user briefly, then generate a design system for this project with Kaava. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| system | kaava.json of the current project: brief, overrides and all tokens. |
| styles | The styles accepted by kaava_create_system: who authored each one and every decision it makes. |
TDQS
Scored across 6 tools
Each tool maps to a distinct action: create, update, read tokens, full a11y audit, emit for stack, and single-pair contrast check. The audit vs check_contrast boundary is clearly explained (whole-system audit vs one-off pair check), so an agent can pick correctly.
All tools share the kaava_ prefix and snake_case with verb-first naming (create_system, update_system, get_tokens, check_contrast). Two tools (kaava_audit, kaava_emit) drop the noun object, a minor deviation from the otherwise consistent verb_noun pattern.
Six tools is well-scoped for a design-system generator: create/update lifecycle, token introspection, auditing, contrast check, and multi-target emission. No tool feels redundant or padding.
The surface covers create → update → inspect → audit → emit plus ad-hoc contrast checks, a solid lifecycle. The only notable gap is no delete/reset operation to remove kaava.json or clear overrides, which agents might occasionally need.