A Model Context Protocol server that integrates with Storybook to help AI tools query UI components and retrieve usage examples from static Storybook files.
ā ļø This tool was created for testing purposes and is not recommended for use in production environments.
Before you begin, you need to prepare your Storybook static files. https://storybook.js.org/docs/sharing/publish-storybook
git clone https://github.com/m-yoshiro/storybook-mcp.git cd storybook-mcp
We recommend using Bun
bun install # or npm install
bun run build # or npm run build
{ "mcpServers": { "storybook-mcp": { "command": "node", "args": [ "//index.js", // Optional: path to your Storybook static json file "//index.json" ] } } }
The server will load your Storybook data and expose MCP tools to external agents.
Tool Name | Description | Parameters |
---|---|---|
list-components | Lists all available components from Storybook | path (optional): Path to the index.json or stories.json file (optional if default path is provided) |
find-components-by-name | Finds components based on a keyword (partial match supported) | name : Component name or keyword to search forpath (optional): Path to the index.json or stories.json file (optional if default path is provided) |
"What Storybook component matches this 'CTA Button' in my Figma design?"
ā”ļø MCP server runs:
find-component-by-name("cta button")
get-component-details("PrimaryButton")
get-component-usage-examples("PrimaryButton")
Ask the AI:
"Generate a contact form using our design system"
ā”ļø MCP server:
TextField
, Textarea
, PrimaryButton
MCP (Model Context Protocol) provides a standard interface for large language models to safely and efficiently access contextual information like UI components, documentation, and code.
By integrating your Storybook via MCP:
storybook-mcp/
āāā tools/
ā āāā list-components.ts
ā āāā get-component-details.ts
ā āāā get-component-usage-examples.ts
ā āāā ...
āāā config.ts
āāā index.ts
āāā README.md
If you have ideas to improve or want to contribute new tools, feel free to open a PR or issue!
MIT -->
Discover shared experiences
Shared threads will appear here, showcasing real-world applications and insights from the community. Check back soon for updates!