Loading...
Loading...
Storybook MCP server integration for component-aware AI development. Covers 6 tools across 3 toolsets (dev, docs, testing): component discovery via list-all-documentation/get-documentation, story previews via preview-stories, and automated testing via run-story-tests. Use when generating components that should reuse existing Storybook components, running component tests via MCP, or previewing stories in chat.
npx skill4agent add yonatangross/orchestkit storybook-mcp-integration@storybook/addon-mcp| Toolset | Tool | Purpose | Key Inputs |
|---|---|---|---|
| dev | | Guidance on writing stories + interaction tests | none |
| dev | | Returns preview URLs for stories (embeddable) | |
| docs | | Full component + docs manifest index | none |
| docs | | Props, first 3 stories, story index, docs | |
| docs | | Full story source + component docs | |
| testing | | Run component + a11y tests, pass/fail + violations | |
# Storybook 10.3+ with Vite builder (no webpack)
npx storybook@latest upgrade
# Install the addon
npx storybook add @storybook/addon-mcp
# Enable docs toolset (required for component discovery)
# In .storybook/main.ts:
# experimentalComponentsManifest: true
# Enable testing toolset (requires addon-vitest)
# npx storybook add @storybook/addon-vitest
# Register with Claude Code
npx mcp-add --type http --url "http://localhost:6006/mcp" --scope project# Probe for storybook-mcp tools
ToolSearch(query="+storybook list-all-documentation")
# If tools found → Storybook MCP is available
# If not found → fallback to filesystem-based component discoveryRead("${CLAUDE_SKILL_DIR}/rules/<file>")| Rule | Impact | Description |
|---|---|---|
| HIGH | Use list-all-documentation + get-documentation before generating new components |
| HIGH | Embed preview-stories URLs for visual confirmation |
| CRITICAL | Run run-story-tests with a11y:true after component generation |
X-MCP-Toolsets| Agent Role | Toolsets | Rationale |
|---|---|---|
| component-curator | | Inventory + props only, no testing |
| frontend-ui-developer | | Full access for gen → verify loop |
| design-system-architect | | Component metadata for governance |
https://<chromatic-storybook-url>/mcp| Storybook MCP | Fallback | Behavior |
|---|---|---|
| Available | — | Use MCP tools for component discovery, testing, previews |
| Unavailable | Filesystem | |
| Unavailable | 21st.dev | Search public registry via 21st-dev-magic MCP |
| Unavailable | Manual | Claude multimodal analysis of screenshots |
storybook-testingcomponent-searchdesign-to-codeui-components