storybook-mcp
Allows browsing, inspecting, creating, and composing components in a running Storybook instance.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@storybook-mcp List all components in Storybook"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Storybook MCP Server
An MCP (Model Context Protocol) server that integrates with a running Storybook instance. It lets AI-powered coding tools browse your component library, inspect individual components, and scaffold brand-new components from natural language.
Features
Tool | Description |
| List & search every component in your running Storybook |
| Get stories, arg types, default args, and Storybook URLs for a component |
| Scaffold a component + Storybook story from a plain-English description |
| Compose existing components into a higher-order page/view with layout, state, and wiring |
Related MCP server: MCP Design System Extractor
Quick Start
Prerequisites
Python ≥ 3.10
A running Storybook instance (v7+)
uvinstalled
1. Install uv if needed (Python Package Manager)
# Install via Homebrew
brew install uv
# Or via curl
curl -LsSf https://astral.sh/uv/install.sh | shNote: The storybook-mcp package itself does NOT need to be installed separately. The MCP configuration uses uvx which automatically downloads and runs the package when needed.
Configuration by Editor
Configuration Format A: Project-Relative Paths
Use this configuration for Cursor, Windsurf, Roo Code, and Kilo Code.
{
"mcpServers": {
"storybook": {
"command": "uvx",
"args": ["storybook-mcp"],
"env": {
"STORYBOOK_URL": "http://localhost:6006",
"STORYBOOK_COMPONENTS_DIR": "relative/path/to/your/storybook/components",
"STORYBOOK_FRAMEWORK": "react",
"STORYBOOK_STYLE_TECH": "tailwind",
"STORYBOOK_TYPESCRIPT": "true"
}
}
}
}Configuration File Locations:
Cursor:
.cursor/mcp.json(project root - already created in this project)Windsurf:
.windsurf/mcp.json(project root)Roo Code:
.roo/mcp.json(project root)Kilo Code:
.kilocode/mcp.json(project root)
Configuration Format B: Absolute Paths
Use this configuration for Claude Desktop and Claude CLI.
{
"mcpServers": {
"storybook": {
"command": "uvx",
"args": ["storybook-mcp"],
"env": {
"STORYBOOK_URL": "http://localhost:6006",
"STORYBOOK_COMPONENTS_DIR": "/absolute/path/to/frontend/src/apps/core/shared/core-components",
"STORYBOOK_FRAMEWORK": "react",
"STORYBOOK_STYLE_TECH": "tailwind",
"STORYBOOK_TYPESCRIPT": "true"
}
}
}
}Configuration File Locations:
Claude Desktop (macOS):
~/Library/Application Support/Claude/claude_desktop_config.jsonClaude CLI (Linux/macOS):
~/.config/claude/claude_desktop_config.jsonClaude CLI (Windows):
%APPDATA%\Claude\claude_desktop_config.json
Note: Claude Desktop and Claude CLI require absolute paths for STORYBOOK_COMPONENTS_DIR.
Usage Examples
Once configured, you can use natural language commands:
List Components
"List all components in Storybook"
"Show me all button components"Inspect Component
"Show me the details for the Core/UI/Button component"
"What props does the DataTable accept?"Create Component
"Create a new AlertBanner component with info, warning, and error variants"
"Build a StatusIndicator component with online/offline/away states"Compose Page
"Compose a SettingsPage using Sidebar, Tabs, TextInput, Toggle, and Button"
"Build a DashboardView with Card, Chart, DataTable, and Badge components"Troubleshooting
MCP Server Not Connecting
✅ Ensure Storybook is running at http://localhost:6006
✅ Restart your editor/CLI after creating/modifying the MCP configuration file
✅ Verify
uvis installed:uv --version✅ Check that the configuration file is in the correct location for your tool
Components Not Found
✅ Check that Storybook is fully loaded in browser
✅ Component titles are case-sensitive
✅ Use
storybook_list_componentsto see available components
Available Tools
4 toolsstorybook_compose_viewA
Compose existing Storybook components into a higher-order page or view.
Fetches the Storybook component catalog, resolves the requested (or auto-discovered) child components, then scaffolds a new page/view file that imports and wires them together with layout, props, local state, and event handlers. Optionally generates a Storybook story for the view.
Use storybook_list_components first to see what's available, then storybook_get_component to inspect props/args before composing.
Args: params (ComposeViewInput): Validated input containing: - name (str): PascalCase page/view name, e.g. 'DashboardPage' - description (str): Natural-language description of the page - components (Optional[List[ComponentPlacement]]): Explicit component list - layout (Optional[str]): Layout strategy hint - include_state (bool): Generate useState/handlers (default True) - include_story (bool): Generate a story file (default True) - category (Optional[str]): Storybook category (default 'Pages')
Returns: str: Markdown summary with all generated file contents.
Inputs: params (required). Returns: result
storybook_create_componentA
Scaffold a new component with Storybook story from a natural-language description.
Generates a component file and a corresponding .stories. file based on the configured framework (React/Vue/Svelte), language (TS/JS), and styling approach. Files are written into the configured STORYBOOK_COMPONENTS_DIR.
Args: params (CreateComponentInput): Validated input containing: - name (str): PascalCase component name - description (str): Natural-language description of the component - category (Optional[str]): Storybook hierarchy category - props (Optional[List[PropDefinition]]): Explicit prop definitions
Returns: str: Summary of the generated files with their full contents.
Inputs: params (required). Returns: result
storybook_get_componentARead-onlyIdempotent
Get detailed information about a specific Storybook component.
Returns every story registered under the given title, including story IDs, arg types, default args, and the direct Storybook URL for each.
Args: params (GetComponentInput): Validated input containing: - component_title (str): Exact component title path, e.g. 'Components/Button' - response_format (ResponseFormat): 'markdown' or 'json'
Returns: str: Detailed component information in the requested format.
Inputs: params (required). Returns: result
storybook_list_componentsARead-onlyIdempotent
List all components registered in the running Storybook instance.
Fetches the Storybook index and returns component titles grouped by hierarchy, with their story counts. Optionally filter by a substring.
Args: params (ListComponentsInput): Validated input parameters containing: - search (Optional[str]): Case-insensitive filter substring - response_format (ResponseFormat): 'markdown' or 'json'
Returns: str: Component listing in the requested format.
Inputs: params (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool has a distinct purpose: listing components, getting component details, creating components, and composing views from existing components. No overlap or ambiguity.
All tools follow a consistent 'storybook_verb_noun' pattern (list_components, get_component, create_component, compose_view). Convention is uniform and predictable.
With 4 tools, the server covers the essential operations for Storybook without being excessive. The count is well-scoped for its domain.
Core operations are covered: discovery, inspection, creation, and composition. Missing update/delete for components, but these are typically handled via filesystem, not Storybook API.
Maintenance
Related MCP Connectors
Serves your design system and coding standards to coding agents, so they stop guessing.
Run accessibility, contrast, and design token audits and file QA issues from your AI coding tool.
Find UI components and themes, retrieve code, and generate with hosted 21st AI when enabled.
Live React design-system APIs, patterns, and code validation so AI agents build real UI, not slop.
Related MCP Servers
- AlicenseBqualityDmaintenanceA Model Context Protocol server that integrates with Storybook to help AI tools query UI components and retrieve usage examples from static Storybook files.221MIT
- AlicenseAqualityBmaintenanceServer that enables AI assistants to interact with Storybook design systems. Extract component HTML, analyze styles, and help with design system adoption and refactoring.9424 npm73MIT

Storybook MCPofficial
AlicenseNot gradedqualityFmaintenanceEnables AI agents to interact with Storybook by exposing UI component information and development workflows through the Model Context Protocol.272MIT- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to search, understand, and generate code for design system components by syncing and indexing a component library.ISC