Storybook MCP

v0.5.1Developer Toolsstable

MCP server for Storybook - provides AI assistants access to components, stories, properties and screenshots. Built with TypeScript and Model Context Protocol SDK.

anthropicclaudeclaude-desktopcomponent-librarycomponent-testing
Share:
13
Stars
0
Downloads
0
Weekly
0/5

What is Storybook MCP?

Storybook MCP is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to mcp server for storybook - provides ai assistants access to components, stories, properties and screenshots. built with typescript and model context protocol sdk.

MCP server for Storybook - provides AI assistants access to components, stories, properties and screenshots. Built with TypeScript and Model Context Protocol SDK.

This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • MCP server for Storybook - provides AI assistants access to

Use Cases

Access component library stories
AI-assisted component discovery and testing
mcpland

Maintainer

LicenseMIT License
Languagetypescript
Versionv0.5.1
UpdatedApr 29, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

NPM

npx -y storybook-mcp

Manual Installation

npx -y storybook-mcp

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Storybook MCP

Storybook MCP is a TypeScript MCP server that bridges AI assistants with a running Storybook instance, exposing component metadata, property definitions, and screenshots to tools like Claude. It lets developers ask their AI assistant to discover components, inspect props and types, and even extract custom data from Storybook pages using Puppeteer. Teams maintaining large component libraries will save significant time by letting AI navigate and understand the library on their behalf.

Prerequisites

  • Node.js 18 or later and npx
  • A running Storybook instance (v6 or later) accessible at a URL
  • Storybook's index.json (or stories.json for v3) must be accessible
  • An MCP-compatible client such as Claude Desktop or Cursor
  • Puppeteer browser for screenshot capabilities (install with npx -y storybook-mcp@latest install-browser)
1

Install the Puppeteer browser (first-time setup)

Storybook MCP uses Puppeteer to capture screenshots. Run this once to download the required browser binary.

npx -y storybook-mcp@latest install-browser
2

Ensure your Storybook is running

Start your Storybook development server. The MCP server needs to connect to it to read component metadata.

npx storybook dev -p 6006
3

Identify your Storybook index URL

The MCP server connects to Storybook via its index.json file. For Storybook v7 and later this is at /index.json; for v6 it is at /stories.json.

4

Configure Claude Desktop

Add the storybook-mcp server to your Claude Desktop configuration, pointing STORYBOOK_URL at your running Storybook instance's index file.

{
  "mcpServers": {
    "storybook": {
      "command": "npx",
      "args": ["-y", "storybook-mcp@latest"],
      "env": {
        "STORYBOOK_URL": "http://localhost:6006/index.json"
      }
    }
  }
}
5

Restart Claude Desktop

Save the configuration and restart Claude Desktop. The storybook-mcp server will launch on demand and connect to your Storybook instance.

6

Add custom tools for Storybook data extraction (optional)

Define custom tools using the CUSTOM_TOOLS environment variable to extract arbitrary data from Storybook pages using JavaScript DOM queries.

"env": {
  "STORYBOOK_URL": "http://localhost:6006/index.json",
  "CUSTOM_TOOLS": "[{\"name\": \"getIconList\", \"description\": \"Get all icons\", \"page\": \"http://localhost:6006/?path=/docs/icon--docs\", \"handler\": \"Array.from(document.querySelectorAll('.icon-name')).map(i => i.textContent)\"}]"
}

Storybook MCP Examples

Client configuration

Claude Desktop configuration for Storybook MCP pointing to a locally running Storybook instance.

{
  "mcpServers": {
    "storybook": {
      "command": "npx",
      "args": ["-y", "storybook-mcp@latest"],
      "env": {
        "STORYBOOK_URL": "http://localhost:6006/index.json"
      }
    }
  }
}

Prompts to try

Example prompts for exploring your component library through an AI assistant.

- "List all components available in the Storybook"
- "What props does the Button component accept? Show me required props and their types"
- "Find all form-related components in the Storybook"
- "Show me the props for Button, Input, and Avatar components"
- "What variants are available for the Card component?"

Troubleshooting Storybook MCP

getComponentList returns empty or errors with 'Cannot fetch index.json'

Verify Storybook is running and accessible at the URL set in STORYBOOK_URL. For Storybook v6, use /stories.json instead of /index.json. Confirm CORS is not blocking the request if Storybook is on a different origin.

Screenshot tool fails or Puppeteer browser not found

Run npx -y storybook-mcp@latest install-browser to download the Puppeteer browser binary. This step is required once before screenshot capabilities work.

STORYBOOK_URL environment variable not picked up

Ensure the env key is nested correctly inside the mcpServers object for your server. Restart Claude Desktop completely after changing the configuration file — hot-reload does not apply to MCP server env variables.

Frequently Asked Questions about Storybook MCP

What is Storybook MCP?

Storybook MCP is a Model Context Protocol (MCP) server that mcp server for storybook - provides ai assistants access to components, stories, properties and screenshots. built with typescript and model context protocol sdk. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Storybook MCP?

Install via npm with the command: npx -y storybook-mcp. Then add the server configuration to your AI client's JSON config file (e.g., claude_desktop_config.json or .cursor/mcp.json).

Which AI clients work with Storybook MCP?

Storybook MCP works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Storybook MCP free to use?

Yes, Storybook MCP is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.

Browse More Developer Tools MCP Servers

Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "storybook": { "command": "npx", "args": ["-y", "storybook-mcp"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Storybook MCP?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides