MagicSchool AI · design-system tooling
Spellbook MCP Server
The design system, made legible to AI. An MCP server that lets coding agents build UI against Spellbook's real component APIs instead of inventing markup.
- The problem
- Ask an AI for a destructive button and it reaches for a raw Tailwind red that isn't registered in the app: it compiles, renders nothing, and nobody notices until someone looks. Ask whether the system has an inline alert and it invents one. The root cause is the same everywhere: guessing instead of checking what actually exists in the design system.
- The build
- Nine tools over 70+ React component specs, resolved design tokens, icon catalogs, and real Storybook examples. Discovery is semantic: keyword matching fused with an embedding index baked at build time, traced query expansion so a search for a snackbar finds the Toast, and one entry-point tool that fans out across components, tokens, and guidelines in a single call. A compiler-backed validator type-checks generated JSX against the real APIs, and the manifest is derived by walking the TypeScript export graph on every release, so the tools can never drift from source. Remote connections authenticate over OAuth.
- The test
- A 25-task evaluation across three Claude model tiers: same tasks, same models, only the MCP connection toggled. First-attempt success rose from 4–36% to 72–88% depending on the model, and cost per shipped task fell 35–41%. The sharpest finding: not one baseline failure was cleanly fixed by a round of review comments; with the MCP connected, there is rarely a mistake to review.
What the tools cover
- component specs
- resolved design tokens
- icon catalog
- curated examples
- JSX type-checking
- release-synced manifest
- OAuth
TypeScript · Node.js · MCP · React · DTCG Design Tokens · LLM Evaluation
Spellbook MCP · before / after
scripted · no live model
TaskBuild a small feature UI from a ticket.
Filesystem only
- grepGreps the component library for likely names.
first attempt lands 4–36% of the time
With Spellbook MCP
- get-design-contextOne call fans out across components, design tokens, and guidelines for the task.
72–88% first-attempt · −35–41% cost
A scripted reconstruction of how a run works, not a recorded transcript
- First-attempt success
- 36% → 88%
- Cost per shipped task
- −35–41%
- Evaluation
- 25 tasks · 3 model tiers
- Surface area
- 9 tools · 70+ components
Success and cost from the 25-task, three-tier study, shown for the model with the strongest unaided baseline; every difference statistically significant (p<0.001).

