Storybook

Storybook

Interact with Storybook to automate UI component testing and documentation

119
Stars
11
Forks
20
Releases

Overview

Storybook MCP - Contributor Guide describes the MCP server provided by the Storybook MCP Addon monorepo. The project offers two packages: @storybook/mcp (a standalone MCP library for serving Storybook component knowledge) and @storybook/addon-mcp (an addon that runs an MCP server inside your Storybook dev server, incorporating the MCP functionality from your local Storybook). The MCP server exposes Storybook UI component knowledge and development workflows to AI agents and developers, and is accessible at the Storybook instance path /mcp (e.g., http://localhost:6006/mcp). It supports a JSON-RPC style Tools API (examples show methods like tools/list and tools/call, with a tool such as list-all-components) to discover components and perform actions. The README highlights debugging with the MCP Inspector (configurable via .mcp.inspect.json) and provides curl examples for validating the server (e.g., POSTing to /mcp). The setup emphasizes prerequisite tooling (Node.js 24+, pnpm 10.19.0+), build/dev/test commands, and a contributor-oriented workflow for developing and validating MCP functionality within the Storybook ecosystem.

Details

Owner
storybookjs
Language
TypeScript
License
MIT License
Updated
2025-12-07

Features

Standalone MCP library

A standalone MCP library for serving Storybook component knowledge that can be used independently of an addon.

Addon-integrated MCP server

An addon that runs an MCP server inside the Storybook dev server, exposing local component knowledge through MCP.

Exposes UI component knowledge and workflows

Provides access to Storybook UI component information and development workflows via the MCP server.

Tools API (JSON-RPC)

Offers a Tools API with methods like tools/list and tools/call to discover and invoke actions against the MCP server.

Example tool: list-all-components

Demonstrates how to enumerate Storybook components using the Tools API (e.g., tools/call with name 'list-all-components').

MCP Inspector integration

Supports debugging and testing MCP functionality via the MCP Inspector, configurable with .mcp.inspect.json.

Accessible MCP endpoint

MCP server is served from the Storybook instance at /mcp (e.g., http://localhost:6006/mcp) for easy integration.

Storybook-centric workflow

Designed to work with internal Storybook workflows, enabling AI agents and automation to navigate UI components and development tasks within Storybook.

Audience

AI agentsAccess Storybook component knowledge and development workflows to automate UI testing and documentation.
Developers & contributorsDevelop, test, and contribute to the MCP server and addon integration within the Storybook monorepo.

Tags

StorybookMCPModel Context ProtocolUI componentsAutomationAI agentsDevelopment workflowsAddon