Skip to main content

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
storybook_list_components List & search every component in your running Storybook
storybook_get_component Get stories, arg types, default args, and Storybook URLs for a component
storybook_create_component Scaffold a component + Storybook story from a plain-English description
storybook_compose_view Compose existing components into a higher-order page/view with layout, state, and wiring

Quick Start

Prerequisites

  • Python ≥ 3.10
  • A running Storybook instance (v7+)
  • uv installed

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 | sh

Note: 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.json
  • Claude CLI (Linux/macOS): ~/.config/claude/claude_desktop_config.json
  • Claude 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 uv is 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_components to see available components

Metadata

Release files for storybook-mcp 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for storybook-mcp 0.3.1
File Size Uploaded Provenance
storybook_mcp-0.3.1.tar.gz 81.4 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for storybook-mcp 0.3.1
File Interpreter ABI Platform
storybook_mcp-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 97.0 kB

Release files / storybook_mcp-0.3.1.tar.gz

Download URL storybook_mcp-0.3.1.tar.gz
Size 81.4 kB
Tags Source
SHA-256 checksum
How to use checksums
b3c901f59dcdac66bb45efc2e598306c4c404aa1a5d5d978447edfc8d742fe91
BLAKE2b-256 checksum
How to use checksums
7bd22e329c39784df0a9d997934dc9ddc9f124f1c7906a41080f813982f33168
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 13, 2026.

Transparency log

Release files / storybook_mcp-0.3.1-py3-none-any.whl

Download URL storybook_mcp-0.3.1-py3-none-any.whl
Size 15.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8e757e6c5ca9e9f98430cb8f05daf550e70b1714bc051ec5ef0d6c264235477e
BLAKE2b-256 checksum
How to use checksums
a6a22110554219d12b12b74328fcf6407fa2a576709929c71b4bd23e199f5e52
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 13, 2026.

Transparency log

Security for storybook-mcp 0.3.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for storybook_mcp-0.3.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 13, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page