[RFC] Add support for a Model Context Protocol (MCP) server integration #31788
Replies: 4 comments 1 reply
-
Interesting! Thanks for writing this all down. btw What is Backstage and how is it relevant to Storybook? |
Beta Was this translation helpful? Give feedback.
-
Thanks for submitting @jfrazier08 , I'd be stoked to help enable agentic workflows with an MCP server. The requirements are shaping up but there are still lots of unknowns. For instance, you mention exposing source code from the MCP server. Do you envisage the MCP client does not already have access to the component and story source code? It would be helpful if you could share some prompts along with the agent behavior that you'd like to see enabled by a Storybook MCP server! |
Beta Was this translation helpful? Give feedback.
-
I think it would be cool if the storybook dev server basically had some remote mcp endpoints and had stuff like
I started doing some simpler stuff in my own mcp server but tighter integration is needed to do some of the more useful stuff however the playwright mcp together with a simple mcp like this can already navigate storybook pretty well, take screenshots and check console output etc |
Beta Was this translation helpful? Give feedback.
-
For anyone landing here, we're starting a research project about using agents with Storybook and/or design systems: #32276 Feel free to leave thoughts, feedback or input in there if you want to. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Proposal: Add support for a Model Context Protocol (MCP) server integration in Storybook. This would enable Storybook to expose structured, machine-readable context from stories and documentation, allowing AI systems and developer tools to generate UI code and designs more effectively.
Problem Statement
Non-goals
Implementation
We propose the development of a native MCP server integration for Storybook that exposes structured context from stories and documentation. This would include:
This MCP server would expose a REST or GraphQL API that conforms to the Model Context Protocol specification, enabling AI systems to query and consume Storybook content as structured context for generation tasks.
High-Level Architecture
Introduce a new @storybook/mcp-server package.
This package runs alongside Storybook and exposes an MCP-compliant API endpoint (e.g., /mcp) that returns structured story data.
The server would hook into Storybook’s internal APIs to extract:
Prior Art
Deliverables
Risks
Mitigations:
Unresolved Questions
Using a to do list makes it easy to resolve the questions as we move the RFC along.
Should the MCP server be a standalone service or a plugin within the Storybook runtime?
What authentication or access control mechanisms should be supported?
Alternatives considered / Abandoned Ideas
Beta Was this translation helpful? Give feedback.
All reactions