Help agents automatically write and test stories for your UI components.
Add to Claude Desktop config.json
{
"mcpServers": {
"storybookjs-mcp": {
"command": "node",
"args": [
"~/.mcp/mcp/index.js"
]
}
}
} Get the source and run locally
git clone https://github.com/storybookjs/mcp.git ~/.mcp/mcp
cd ~/.mcp/mcp Welcome to the Storybook MCP Addon monorepo! This project enables AI agents to work more efficiently with Storybook by providing an MCP (Model Context Protocol) server that exposes UI component information and development workflows.
This monorepo contains five main packages:
@storybook/mcp-proxy@storybook/mcp-proxyEach package has its own README with user-facing documentation. This document is for contributors looking to develop, test, or contribute to these packages.
External testers can install the plugin marketplace directly from this repository’s
main branch. No local clone is required.
codex plugin marketplace add storybookjs/mcp --ref main
codex plugin add storybook@storybook
Verify the marketplace and plugin:
codex plugin marketplace list
codex plugin list --marketplace storybook
claude plugin marketplace add storybookjs/mcp@main --scope user
claude plugin install storybook@storybook --scope user
Verify the plugin and MCP server:
claude plugin list --json
claude mcp list
claude mcp list should show plugin:storybook:storybook using the
@storybook/mcp-proxy preview URL from pkg.pr.new.
The repository intentionally keeps marketplace catalogs in two places. The root
catalogs support GitHub installs from storybookjs/mcp; the package-local
catalogs support local package development scripts. They should stay identical
except for the relative plugin source path, and the package validation checks
that they do.
.nvmrc)package.json)# Use the correct Node version
nvm use
# Install pnpm if you don't have it
npm install -g pnpm@10.19.0
# Clone the repository
git clone https://github.com/storybookjs/mcp.git
cd addon-mcp
# Install all dependencies (for all packages in the monorepo)
pnpm install
# Build all packages
pnpm build
# Start development mode (watches for changes in all packages)
pnpm dev
# Run unit tests in watch mode
pnpm test
# Run unit tests once
pnpm test:run
# Run Storybook with the addon for testing
pnpm --filter internal-storybook storybook
The Storybook command starts:
http://localhost:6006http://localhost:6006/mcpThe turbo watch build command runs all packages in watch mode, automatically rebuilding when you make changes:
# Start development mode for all packages
pnpm turbo watch build
# This is usually all you need - starts Storybook AND watches addon for changes
pnpm storybook
# Build all packages
pnpm build
The monorepo uses a centralized Vitest configuration at the root level with projects configured for each package:
# Watch tests across all packages
pnpm test
# Run tests once across all packages
pnpm test:run
# Run tests with coverage and CI reporters
pnpm test:ci
Use the MCP Inspector to debug and test MCP server functionality:
# Launches the MCP inspector (requires Storybook to be running)
pnpm inspect
This uses the configuration in .mcp.inspect.json to connect to your local MCP servers.
Alternatively, you can also use these curl comamnds to check that everything works:
# test that the mcp server is running
# use port 6006 to test the addon-mcp server instead
curl -X POST \
http://localhost:13316/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list",
"params": {}
}'
# test a specific tool call
curl -X POST http://localhost:13316/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "list-all-documentation",
"arguments": {}
}
}'
You can start Storybook with:
pnpm storybook
This will build everything and start up Storybook with addon-mcp, and you can then connect your coding agent to it at http://localhost:6006/mcp (or your configured addon endpoint) and try it out.
To work with and debug the MCP app that is rendered as part of the preview-stories tool, you can:
pnpm storybook in the root.vscode/mcp.json file and ensure the Storybook MCP is marked as Running, otherwise click Start.Show me how all the button stories look, using the Storybook MCP
You can also use the inspector from MCPJam to have more low level control of the tool calls.
# Format all files with Prettier
pnpm format
# Check formatting without changing files
pnpm format:check
# Lint code with oxlint
pnpm lint
# Lint with GitHub Actions format (for CI)
pnpm lint:ci
# Check package exports with publint
pnpm publint
The monorepo includes several quality checks that run in CI:
# Run all checks (build, test, lint, format, typecheck, publint)
pnpm check
# Run checks in watch mode (experimental)
pnpm check:watch
# Type checking (uses tsc directly, not turbo)
pnpm typecheck
# Type checking with turbo (for individual packages)
pnpm turbo:typecheck
# Testing with turbo (for individual packages)
pnpm turbo:test
Always include file extensions in relative imports:
// ✅ Correct
import { foo } from './bar.ts';
// ❌ Wrong
import { foo } from './bar';
import pkg from '../package.json' with { type: 'json' };
This project uses Changesets for version management:
# 1. Create a changeset describing your changes
pnpm changeset
When you create a PR, add a changeset if your changes should trigger a release:
We welcome contributions! Here’s how to get started:
pnpm build)pnpm test:run)pnpm format)pnpm lint)pnpm typecheck)pnpm changeset)MIT - See LICENSE for details
Note: This project is experimental and under active development. APIs and architecture may change as we explore the best ways to integrate AI agents with Storybook.
AI-powered task management system for AI-driven development. Features PRD parsing, task expansion, multi-provider support (Claude, OpenAI, Gemini, Perplexity, xAI), and selective tool loading for optimized context usage.
Provide coding agents direct access to Figma data to help them one-shot design implementation.
gitmcp.io is a generic remote MCP server to connect to ANY GitHub repository or project for documentation
MCP Server for Android/iOS application and device automation, development and app scraping. Simulator/Emulator/Physical devices like iPhone, Google Pixel, Samsung supported.
Create crafted UI components inspired by the best 21st.dev design engineers.
An Excel manipulation server providing workbook creation, data operations, formatting, and advanced features (charts, pivot tables, formulae).