Storybook MCP: your components, in a language the agent understands
Storybook MCP gives the coding agent in your project access to your component library, so it can use your own buttons and fields instead of inventing new ones. In our test it answered in 1.04 seconds, ran eight stories in 11.1 seconds, but it loads about 5,500 tokens into every session before you even speak to it.

What it does
If you have ever worked with an agent on a user interface, you know the most common damage: the agent builds a button from scratch, with its own colors and its own field names, while the project already has a button.
To understand what this tool does, you only need three words. A component is the smallest piece of interface you build once and reuse everywhere: a button, a text field, a card with a title. A story is a recipe that shows the component in one specific state — the button while it waits for a reply, the same button when it is disabled, the card with a very long title. Storybook is the lab where these stories live: you open a page and see all your components running live, without spinning up the whole app just to inspect them.
MCP — Model Context Protocol — is the cable. It is a protocol that lets an agent discover and call tools offered by someone else. Storybook MCP runs such a server inside Storybook’s local development server, and the agent gets three groups of capabilities.
The documentation group answers the question “what components do I have, and how are they used?” docs-list returns the catalog, docs-show gives detailed fields for a component together with its first stories, and docs-show-story returns the full story when the first answer is not enough. The development group helps with writing new stories: get-storybook-story-instructions gives instructions, stories-preview shows the preview inside the conversation, stories-find-by-component finds which stories relate to a file, stories-changed detects what was affected by the latest changes, and review-create opens a review page. The testing group has one tool, test-run, which runs the stories and returns results, together with accessibility issues if you have enabled them.
The key point is where all of this comes from. The agent does not guess. It reads the components manifest, a file produced by Storybook itself that describes the components, their fields, and their usage. The manifest is off by default and you have to turn it on with componentsManifest in .storybook/main.ts — if you do not, everything else works, only the documentation group stays silent.
There is also a larger-scale trick. If you compose multiple Storybooks together — your own and the one from the component library you use — the MCP server automatically gathers the catalogs of all of them. Composition means, in practice, that the agent sees as one body of knowledge the components you wrote and the ones you inherited from elsewhere.
What it does not do
It does not create components from scratch and you should not ask it to “invent” fields or prop names that do not exist in the components manifest. The agent does not guess: if you do not enable the manifest (componentsManifest) or keep it updated, the documentation group stays silent. We tried giving it an incomplete description and it failed to produce reliable code — it will simply offer what is in the manifest, not creative design or refactoring.
It is not a tool for full visual verification or end-to-end testing. test-run runs stories and returns results and accessibility issues if you have enabled them, but it does not do pixel diffs, full integration tests, or automatic fixes. review-create opens a review page; it does not replace human approval.
It is not economical for very small projects. With two or three components, the token cost outweighs the benefit, as we saw ourselves. Agents also do not start using it on their own — you have to tell them to (AGENTS.md/CLAUDE.md). Composing many Storybooks can create overlapping components; that needs care and manifest cleanup, or the agent will get confused.
Who it is for
If you have a design system you have been maintaining for a while — or simply a folder where your buttons, forms, and cards collect — this tool changes the agent’s job from “produce unknown code” to “assemble what you already have.” When you ask it to build a login page, it will first look for which field and which button you already have, inspect their field names, and place them.
It also fits teams with more than one person, because the documentation you already write for your components becomes documentation for agents automatically. You do not need a second text just for AI.
It does not fit a small project with two or three components. There, the token cost will be higher than the benefit, because you pay for the knowledge in every session. It also does not fit teams that do not have Storybook yet — first you set up Storybook, then MCP.
Installation
Installation happens through Storybook’s official installer. Run the commands from the root of the project, the folder where package.json lives.
In our experiment, we did not even have to add the addon by hand: the installer recognized it and recorded it on its own.
npx storybook add @storybook/addon-mcp
Then turn on the components manifest. Add the features line to your .storybook/main.ts file, keeping the framework you already have:
const config: StorybookConfig = {
framework: '@storybook/react-vite',
stories: ['../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
features: {
componentsManifest: true,
},
};
If Storybook already exists and you want only the package, the usual path is:
npm i @storybook/addon-mcp
Finally, declare the server to the agent. The official guide gives a helper that writes the configuration for you:
npx mcp-add --type http --url "http://localhost:6006/mcp" --scope project
From that point on, the MCP server lives at http://localhost:6006/mcp while Storybook is running, and the port changes if you changed the development port. One warning we saw with our own eyes on Windows: the installer throws an error for wmic. It does not block anything, but it scares you for no reason — the installation completes normally.
And one step everyone forgets: agents do not read the tool unless you tell them to. Storybook suggests adding to AGENTS.md — or to CLAUDE.md if you work with Claude — a line that forbids them from inventing fields. One sentence is enough: before using any component property, ask Storybook MCP.
Use in each LLM
MCP is a standard, so it speaks to anything that speaks MCP. The difference is how much ready-made work each one has done.
Claude Code
Storybook provides an official plugin for Claude Code. This is not just a server setting: the plugin carries skills — short instructions that tell the agent when and how to use Storybook — together with the MCP server declaration. The plugin loads the server through @storybook/mcp-proxy, a stable address that does not change with your versions. According to the official repository, installation takes two commands, from any folder:
claude plugin marketplace add storybookjs/mcp@main --scope user
claude plugin install storybook@storybook --scope user
To verify that it landed correctly, use two more commands:
claude plugin list --json
claude mcp list
If you prefer not to add the plugin and want only the server, the manual declaration is one line:
claude mcp add --transport http storybook-mcp http://localhost:6006/mcp
We did not test the commands in the last three boxes on our own machine — we are quoting them as the manufacturer gives them in the repository. What we measured concerns the server and the protocol itself, which are shared by all clients.
Codex CLI
In Codex CLI, the official plugin is installed through the plugin marketplace hosted by the repository. The first command adds the marketplace from GitHub, the second installs the plugin:
codex plugin marketplace add storybookjs/mcp --ref main
codex plugin add storybook@storybook
Verification, again in two steps:
codex plugin marketplace list
codex plugin list --marketplace storybook
If you want manual setup, Codex reads MCP servers from ~/.codex/config.toml. There you declare the Storybook address as a remote HTTP server, with the name you want to see in the conversation.
Cursor
Cursor does not have an official plugin from Storybook, so here we are talking about the general MCP setup. The cleanest path is a file inside the project, at .cursor/mcp.json, so the configuration travels with the code:
{
"mcpServers": {
"storybook": {
"url": "http://localhost:6006/mcp"
}
}
}
If you prefer clicks, Cursor has MCP settings inside the app, where you add a new server with type HTTP and the Storybook address. In both cases, Storybook has to be running — the MCP server does not live on its own, it lives inside the development process. In both cases as well, we did not test it ourselves; the address and file shape are the documented product form.
Where it wins, where it loses
It wins on the most expensive mistake agents make. An agent that does not know your components produces code that looks right and is not: it uses properties that do not exist, names that do not match, colors that are off scale. Here it asks first and writes later. The second win is self-checking: the agent runs the stories, sees what broke, fixes it, and runs them again. The third is MIT and the fact that it now lives inside the Storybook repository — it is no longer one person’s experiment.
It loses in weight. Our test pulled down 719 MB of Playwright browsers for testing, left 220 MB in node_modules, and used more than 1.5 GB of memory while running. On a machine with 8 GB, you feel that.
It loses in coverage. The documentation group wants a components manifest, and today React frameworks, @storybook/angular-vite, and @storybook/vue3-vite generate one. Angular with Webpack does not generate one at all, and other frameworks still do not. The server itself works everywhere — the component knowledge does not.
It loses, for now, in stability. The documentation itself says these capabilities are in preview and the API may change. We add a small navigation annoyance from ourselves: the MCP repository moved into Storybook’s main repository as of version 10.6.0, and the old storybookjs/mcp is archived with 271 stars. Anyone following old articles will land in a repository that no longer accepts changes.
And it loses at a point that is not a bug but a habit: the local server does not ask for a key. Anything running on your machine can ask for your component knowledge. That is not a disaster — it stays local and disappears with Storybook — but it is something you want to learn before, not after, leaving Storybook open on a network.
Test
We set up a real React project with Vite, the way anyone would. The official installer added the addon on its own, without us adding it to the configuration file. Then it opened Storybook and the server appeared at localhost:6006/mcp.
The handshake with the server passed without a key, on the first try. The server declared eight tools — that is what you get when all three groups are active, with the components manifest turned on.
Measurements, on a machine with 12 GB of memory:
docs-list answered in 1.04 seconds and returned the real components of our project, not generic text. docs-show on one of them gave ready-to-use code, with the correct field names. test-run needed 11.1 seconds and returned eight passing stories, with a clean result for each story.
The most useful measurement is not time, it is size. The tools/list response — the catalog sent to the agent so it knows what it can call — is 21,903 characters. Using the usual estimate of about four characters per token, that is about 5,500 tokens added to every session before you ask anything. If you work with a subscription instead of measured tokens, you pay in context; if you pay by use, you pay in money on every message.
Two more observations from the test. The installer threw the wmic error on Windows, with no effect on operation. And the tests downloaded Playwright browsers — once, but 719 MB at a time.
What it costs
Money. Zero. Storybook is open-source software under the MIT license and its MCP comes with it — you do not pay a subscription, you do not buy a key. You only pay for the work the agent does on top of it.
Space. 220 MB for the project’s node_modules, and another 719 MB if you choose to download Playwright browsers — those are what run the test stories. Almost one gigabyte of disk space, in a tool that works locally.
Memory. More than 1.5 GB when the Storybook server and the browsers run together. You do not leave it open because you forgot; you close it, like the oven.
Time. docs-list returned the project’s components in 1.04 seconds. test-run needed 11.1 seconds to run eight stories and return eight successes. These are times that do not make you feel an agent in the middle.
Context — and this is the number I want you to remember. Its tools catalog is 21,903 characters, which means about 5,500 tokens loaded into context in every session, even if you never touch it. Yesterday we wrote about Fabric, which keeps two hundred and sixty-five instructions but loads one at a time. This one does the opposite: it loads the whole library together. That is not a mistake — it is deliberate, because the components of a project are something you touch all the time. It is not free, though: it is measured in context, and it is measured in every message.
The verdict on cost. It is worth it when your project already has Storybook and you work on its components every day — then the 5,500 tokens are cheaper than explaining to the agent, every time, which components you have and how they are used. And it is not worth it at all for a project without Storybook: there you pay for a tool catalog for a library that does not exist.
Verdict
It is worth it, with one condition and one limit. The condition: you need a real component library. The more components you have and the stricter your design system is, the bigger the gain, because the mistake it prevents is more expensive. If you have three components, the addon has nothing to learn.
The limit: the size of the tool catalog is the price of admission, and it is permanent. About 5,500 tokens in every session is like carrying a small manual with you. If you work with small models or a tight budget, turn off the group you do not need — the documentation lets you toggle groups, and that is a good design decision.
Otherwise, the tool does its job without theater. It is official, it is MIT, it has 9,635,598 monthly npm downloads, and it works with any client that speaks MCP. The fact that the documentation does not call it a finished product but a preview comes from the maker itself — and anyone building interfaces with agents should know that before putting it into the pipeline.
Score: 8 out of 10. It loses two points: one for token and resource cost, one for framework coverage, which still leaves a fair number of projects out today.
See also
We tested these in the same category:
Sources:
https://storybook.js.org/docs/ai/mcp/overview
https://www.npmjs.com/package/@storybook/addon-mcp
https://www.npmjs.com/package/@storybook/mcp
https://github.com/storybookjs/mcp
https://github.com/storybookjs/storybook
https://github.com/storybookjs/storybook/releases/tag/v10.6.0
https://storybook.js.org/addons/@storybook/addon-mcp
https://code.claude.com/docs/en/mcp
Εγκατάσταση
3 ΒΗΜΑΤΑ- npx storybook add @storybook/addon-mcp
- npm i @storybook/addon-mcp
- npx mcp-add --type http --url "http://localhost:6006/mcp" --scope project