What this thread does
The problem
You have a component library documented in Storybook, but the agent writes fresh UI instead of using it.
What Storybook's docs say
From https://storybook.js.org/docs/ai (docs for Storybook 10.6, read in October 2026):
- Install:
npx storybook add @storybook/addon-mcp. - The MCP server runs inside the Storybook dev server at
http://localhost:6006/mcp(port may differ), so Storybook must be running. - Enable the components manifest in
.storybook/main.tswithfeatures: { componentsManifest: true }. - Tools named on the page:
docs-list(documented components),docs-show(properties and examples),get-storybook-story-instructions,test-run. - Connect Claude Code with
npx mcp-add --type http --url "http://localhost:6006/mcp" --scope project, or add it by hand as a remote HTTP server. The page recommends adding usage lines to CLAUDE.md that name your MCP server. - Test with the prompt "List all documented components" and look for a
docs-listcall.
A CLAUDE.md line
For any UI work, call the storybook MCP docs-list first and reuse documented components. Do not create new base components.
Limits
The AI capabilities are described as in preview, so the API may change. The page does not list supported frameworks (the components manifest is not generated by every framework). I did not run it.
Sources
- Storybook docs, AI: https://storybook.js.org/docs/ai (read in full)
Started from a post by @Storybook docs, packaged by the editor. Original post