Back to blog

Storybook MCP, shadcn MCP and Figma MCP: how much MCP a design system needs

Storybook MCP, shadcn MCP and Figma MCP compared: what each one returns to a coding agent, the setup, and how much of it your design system needs.

Modeinspect

Storybook MCP, shadcn MCP and Figma MCP: how much MCP a design system needs

Storybook MCP, shadcn MCP and Figma MCP each hand a coding agent a different piece of a design system. Storybook's server returns your components' props, stories and test results. The shadcn MCP server returns registry items and the command that installs them. Figma's server returns a frame, described as React and Tailwind.

All three are lookups that an agent calls over the Model Context Protocol (MCP). None of them is your design system, and two of them return code. The component that ships is the one in your repo, so what the agent does with that code matters more than how many servers you connect. Most teams need one of them, and some need none.

Key takeaways

  • Storybook MCP documents and tests the components you already have. The shadcn MCP server finds and installs registry items. Figma's MCP server describes a frame.
  • Code that comes back from an MCP server is a reference. The agent reads it, then imports the component your repo already has.
  • An agent that works in the repo holding your components can read them directly. Start with typed props and a few lines in AGENTS.md, and add a server for a job the repo cannot do.
  • Storybook's AI features are in preview and its docs tools need a components manifest, so check your framework before you plan around it.

Storybook MCP vs shadcn MCP vs Figma MCP: what each one returns

The three servers answer different questions. Storybook answers "what does our Button accept?", shadcn answers "which item do I install?", and Figma answers "what is in this frame?".

ServerStorybook MCPshadcn MCPFigma MCP
ReadsYour Storybook: stories, prop types, docsThe registries in your components.jsonA Figma frame or selection
ReturnsProps, example stories, docs, story previews, test resultsItem lists, item source, usage examples, an install commandDesign context as React and Tailwind, variables, a screenshot
Whose componentsYoursThe registry's, until they are installedYours where Code Connect maps them
RunsInside your Storybook dev serverOn your machine, through the shadcn CLIHosted by Figma, or in the desktop app
NeedsStorybook 10.3 or newer. The docs tools also need a components manifestA components.json fileA Figma seat, with call limits by seat and plan
StatusPreviewNo preview label in the docsGenerally available, writing to the canvas in beta

Ask all three about a destructive button and you get three different things back.

Ask three servers about a destructive button and you get three answers. Only the import ships.

  1. Storybook MCP

    docs-show

    Button
      variant: "default" | "destructive" | "outline"
      size: "sm" | "md"
    Stories: Default, Destructive, Disabled

    Your component's props and stories

  2. shadcn MCP

    get_add_command_for_items

    npx shadcn@latest add @acme/button

    A command that copies registry source into your repo

  3. Figma MCP

    get_design_context

    <button className="bg-[#DC2626] px-4 py-2 text-white">
      Cancel plan
    </button>

    A frame, described as React and Tailwind

  4. Your feature file

    after any of the three

    import { Button } from "@/components/ui/button";

Example responses, shortened. The tool names are the ones each server registers.

Storybook MCP: your components' props, stories and tests

Storybook's MCP server "connects your Storybook to AI agents, allowing them to understand your components and documentation, generate stories, run tests, and more" (Storybook docs). It is the only one of the three that reads the components in your repo, through your own stories and prop types.

Its tools come in three toolsets. The main ones:

  • Docs. docs-list returns an index of components. docs-show returns one component's "props, the first three stories, an index of the remaining stories, and any additional documentation you've provided".
  • Development. get-storybook-story-instructions tells the agent how to write stories, and stories-preview shows a story in the chat, or a link to it.
  • Testing. test-run runs component and accessibility tests on stories and tells the agent to fix what fails. It needs Storybook Test.

Setup is two commands in a terminal at your project's root. The first adds the addon, and the second registers the server with your agent:

npx storybook add @storybook/addon-mcp
npx mcp-add --type http --url "http://localhost:6006/mcp" --scope project

The docs tools read a components manifest, "which is off by default". The manifest holds "information about the components you have documented, such as their names, descriptions, props, and usage examples" (Storybook docs). Turn it on in .storybook/main.ts:

features: {
  componentsManifest: true,
},

To check the connection, keep Storybook running and ask the agent to "List all documented components". You should see a call to docs-list.

Check three limits before you plan around it:

  • It is a preview. Storybook's docs page opens with "Storybook's AI capabilities are in preview. The API may change in future releases." It arrived in Storybook 10.3, for React first (Storybook blog).
  • The docs tools depend on your framework. Every React framework generates the manifest, and so does @storybook/angular-vite. @storybook/vue3-vite does too, once you also enable the experimentalDocgenServer feature. Angular on Webpack and every other framework have "No manifest support".
  • It runs with Storybook. The server is part of the dev server, so Storybook has to be running. Publishing through Chromatic shares it with other repos, but "Only the Docs tools are available in the published MCP server" (Chromatic docs).

The server does not make an agent use it. Storybook's docs tell you to add instructions to AGENTS.md or CLAUDE.md. Their sample includes the line "CRITICAL: Never hallucinate component properties!" The agent is told to call docs-list and docs-show before it uses any prop.

What it returns is only as good as your stories and doc comments. Chromatic's docs say "this context is not free. It consumes tokens, and excessive or misleading context can degrade performance", and give a !manifest tag for leaving a component out. What a component page should say is in design system documentation that agents read.

shadcn MCP server: a registry lookup that ends in an install command

The shadcn MCP server "allows AI assistants to interact with items from registries" (shadcn MCP docs). A registry is a hosted list of items, such as components, blocks and rules files. The default one is shadcn/ui, and a company can run its own.

Setup is one command, and Cursor, VS Code, Codex and OpenCode have their own --client value:

npx shadcn@latest mcp init --client claude

Restart Claude Code and run /mcp. The docs say "If you see Connected, you're good to go." To add the server by hand, put this in .mcp.json at your project's root:

{
  "mcpServers": {
    "shadcn": {
      "command": "npx",
      "args": ["shadcn@latest", "mcp"]
    }
  }
}

Your own registry goes into components.json, with a token for a private one:

{
  "registries": {
    "@acme": "https://registry.acme.com/{name}.json",
    "@internal": {
      "url": "https://internal.company.com/{name}.json",
      "headers": { "Authorization": "Bearer ${REGISTRY_TOKEN}" }
    }
  }
}

A registry needs no MCP work of its own. The docs for registry authors say "You do not need to do anything special to enable MCP support for your registry". It only has to serve an index file (shadcn registry docs).

The docs page lists no tools. The server's source registers seven. search_items_in_registries and list_items_in_registries find an item. view_items_in_registries returns its "files content". get_add_command_for_items returns the CLI command that installs it. The names come from the main branch and can change.

Have the agent finish on that last tool, so the item arrives through the CLI and not as pasted source. shadcn's model is that component source is copied into your repo once, and from then on it is yours.

Daniel Vaughan, who documents the Codex setup, lists the failure: "Agents sometimes generate a custom modal when Dialog is already installed" (Daniel Vaughan). shadcn's answer is not another server. Its skill runs shadcn info --json and gives the agent your "installed components" before it writes anything.

Figma MCP: a frame described as React and Tailwind

Figma's MCP server reads a frame someone points it at. Its main tool, get_design_context, returns the layout, and "By default, the output is React and Tailwind" (Figma developer docs).

Figma says what that output is for: "Its job is to give your agent design context, not production-ready code" (Figma developer docs). The server knows your code components only where Code Connect maps a Figma component to one.

Setup, seats and the call limits for each plan are in the Figma MCP server guide.

Never paste the code an MCP returns

Code that comes back from an MCP server is a description. The agent reads it, finds the component in your repo that does that job, and imports it.

Pasted, the server's markup is a second button. Imported, it is the one you already have.

app/billing/cancel-plan.tsx
+import { Button } from "@/components/ui/button";
−<button className="bg-[#DC2626] px-4 py-2 text-white">
− Cancel plan
−</button>
+<Button variant="destructive">Cancel plan</Button>
  1. A new button with a hardcoded red, #DC2626. The theme already has bg-destructive, and Button already uses it.

Example file. The removed lines are the markup a server returned for the frame.

The rule needs saying because two of the three servers return something that looks ready to paste. Figma returns markup for a frame. The shadcn server returns an item's source. Storybook's stories are code too, though they are your own components in use.

An agent that pastes that code creates a second copy of a component you already have. One Figma user described the split on Figma's forum: "sometimes I get code that uses our mapped design system components from Code Connect", and "other times I get raw React + Tailwind with the mapping ignored" (Figma Forum).

Storybook maintainer Jeppe Reinhold named the habit when he proposed the Storybook server. A team invests years in a design system, "but the LLM is constantly throwing all that away to use shadcn and Tailwind instead" (GitHub).

A rules file is where that rule lives. These lines are a starting point for your AGENTS.md or CLAUDE.md:

## Design system

- Import UI from `components/ui`. Check what exists there before you create a component.
- Code returned by an MCP server (Figma, a registry, a docs lookup) is a reference. Never paste it into a feature file.
- Map it to our components and theme tokens. If nothing matches, stop and ask.
- Add a registry item with its CLI command, once, into `components/ui`. Never re-add an installed one.

A rule is advice, and an agent can ignore advice. Lint is what rejects a pasted button, and typed props reject an invented variant. Both are in making generated UI use your real components.

How much MCP a design system needs

Most teams need one server or none. Start from where the agent works, not from which servers exist.

You may look after the design system and have a server or two connected already, because each setup guide said to add one. We hear the same thing on our calls with customers: the common stack is Claude Design and Cursor with Figma's MCP server. One product designer tried Storybook's server and got stuck connecting it.

The agent works in the repo that holds the components. It may need no server. Claude Code and Cursor read the files, so names, typed props and an example are already in reach. Billy Sweetman and Tim Gremore at Headway advise picking one context method, "and an agents file is a fine start" (Headway). The design system audit checks whether your files can carry that.

You have a Storybook and want the agent's work checked. Add Storybook MCP. Reading the files does not render a story or run its tests. Storybook's test-run tool does, and hands the failures back to the agent. Storybook's Kyle Gach wrote that "MCP is required for back-and-forth communication with agents to power self-healing testing" (Storybook blog).

The library ships as a package to other repos. There the agent sees compiled code and no stories. A published Storybook server, or the library's own server, is the better lookup. This is the case where reading the repo does not work.

You distribute components through a registry. Add the shadcn MCP server in the consuming repos, so the agent can search your registry and install from it.

Work starts as Figma frames. Add Figma's server, and set up Code Connect, if your plan has it, for the components you use most.

Where the agent works decides what to connect. The first row needs no server.

  • In the repo that holds the componentsNothing yet. Typed props and a few lines in AGENTS.md.
  • Same repo, and you want its work testedStorybook MCP, running with your Storybook.
  • In another repo, with the library as a packageA published Storybook MCP, or the library's own server.
  • In a repo that installs from your registryThe shadcn MCP server.
  • From a Figma frameFigma's MCP server, with Code Connect where your plan has it.

Context cost is a smaller reason to hold back than it was. In Claude Code, "Tool search keeps MCP context usage low by deferring tool definitions until Claude needs them" (Claude Code docs). What a server returns still counts. Claude Code warns when one tool's output passes 10,000 tokens and limits it to 25,000 by default.

One more route skips the question. Modeinspect runs Next.js React codebases that use Tailwind in a cloud environment. Its coding agent works in the repo, finds your React components after setup and follows your CLAUDE.md and AGENTS.md, with no MCP server needed. A library that ships to other repos still needs one of the lookups above.

Design system MCP: does yours need its own server?

A design system rarely needs an MCP server you write yourself. If you use a public library, it probably ships a server already. MUI's gives "the official Material UI docs and code examples in your AI client" (MUI), and Mantine's "lets AI agents search and read Mantine documentation on their own" (Mantine). The scorecard of ten public design systems lists which ones publish a server or an llms.txt.

For your own library, Storybook MCP and the shadcn MCP server cover it. A Storybook with the manifest on is a design system MCP for your components, and Chromatic or the @storybook/mcp package shares its docs tools with other repos. A shadcn registry gets the shadcn server for free. Whichever you pick, the order in the guide to building a design system in code holds: the code first, then the lookup.

This week, do three things. Open the last pull request an agent wrote and search it for a component you already have. Add the four rules above to your rules file. Then connect one server, for the one job your repo cannot do.

Frequently asked questions

What is Storybook MCP?

Storybook MCP is an addon, @storybook/addon-mcp, that runs an MCP server inside your Storybook dev server. A coding agent can list your documented components, read a component's props and stories, write new stories, and run component tests (Storybook docs). It is in preview, so tool names can still change.

Does Storybook MCP work with Vue or Angular?

Partly. Storybook's docs say "The development and testing toolsets have no framework requirements at all". The docs tools need a components manifest, which every React framework and @storybook/angular-vite generate. @storybook/vue3-vite also needs the experimentalDocgenServer feature. Angular on Webpack and other frameworks have no manifest support yet (Storybook docs).

What is the shadcn MCP server?

It is an MCP server built into the shadcn CLI. It lets an agent browse, search and install items from the registries in your components.json: shadcn/ui, third-party registries and private ones (shadcn MCP docs). You set it up with npx shadcn@latest mcp init --client claude, or the value for your client.

Does the shadcn MCP server work with a private registry?

Yes. Add the registry under registries in components.json, with a URL and an Authorization header that reads a token from an environment variable. The registry needs an index file at its root and nothing else to work with the server (shadcn registry docs).

Can I use Storybook MCP, shadcn MCP and Figma MCP together?

Yes. They do different jobs, so they do not conflict. Figma's server describes the frame, the shadcn server installs a missing item, and Storybook's checks props and runs tests. Each one adds responses to the agent's context, so connect the ones whose job you actually have.

Do MCP servers use up the context window?

Less than they used to in Claude Code, where "Tool search is enabled by default" and tool definitions load when needed (Claude Code docs). Responses still count. A large Figma frame or a long component manifest can fill the window, so ask for one section at a time.

Do coding agents need a design system MCP server?

Not when the agent works in the repo that holds the components, because it can open and import them there. A server helps when the agent cannot see the source, when you want stories and tests run, or when components come from a registry or a Figma file.

How do Claude design systems work?

Claude Design's design systems are a separate feature from the three servers above. There, a design system is a saved set of colors, type, components and layout patterns. "Claude extracts them from the assets you provide, like codebases, slide decks, or other design references" (Claude Help Center). For React components, you run /design-sync in Claude Code, which "reads your tokens and components directly". The feature is in beta on paid plans. Standalone Claude Design closes in December 2026 (Claude Help Center). Once moved into Claude, "Each design system becomes an artifact Claude can use in any chat, including in Claude Code". Claude Design and its alternatives covers the product.