Skip to content
Back to search

storybook

MarketplaceWorks with Claude CodeGitHub

πŸ€–

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/storybookjs--mcp/badge.svg)](/listings/storybookjs--mcp)

HTML

<a href="/listings/storybookjs--mcp"><img src="/api/listings/storybookjs--mcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Testing the Claude and Codex plugins from GitHub

External testers can install the plugin marketplace directly from this repository's `main` branch. No local clone is required.

Codex ([more details](./packages/codex-plugin))

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 Code ([more details](./packages/claude-plugin))

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

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.

Prerequisites

- **Node.js 24+** - The project requires Node.js 24 or higher (see `.nvmrc`) - **pnpm 10.19.0+** - Strict package manager requirement (enforced in `package.json`)

# Use the correct Node version
nvm use

# Install pnpm if you don't have it
npm install -g pnpm@10.19.0

Installation

# 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

Development Workflow

# 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:

- The internal test Storybook instance on `http://localhost:6006` - The addon in watch mode, so changes are reflected automatically - MCP server available at `http://localhost:6006/mcp`

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json Β· Manifest Β· 33 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. {
  2. "name": "storybook",
  3. "owner": {
  4. "name": "Storybook"
  5. },
  6. "metadata": {
  7. "description": "Storybook plugins for Claude Code."
  8. },
  9. "plugins": [
  10. {
  11. "name": "storybook",
  12. "description": "Build, preview, and test UI components with Storybook.",
  13. "source": "./packages/claude-plugin",
  14. "author": {
  15. "name": "Storybook",
  16. "url": "https://storybook.js.org/"
  17. },
  18. "homepage": "https://storybook.js.org/docs/ai/mcp/overview",
  19. "repository": "https://github.com/storybookjs/mcp",
  20. "license": "MIT",
  21. "keywords": [
  22. "storybook",
  23. "mcp",
  24. "components",
  25. "stories",
  26. "design-systems",
  27. "testing",
  28. "preview"
  29. ],
  30. "category": "development"
  31. }
  32. ]
  33. }
README.md Β· README Β· 322 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. > [!TIP]
  2. > This repository has moved to [storybookjs/storybook](https://github.com/storybookjs/storybook) as of Storybook v10.6.0. Please check there for updated documentation.
  3. ---
  4. # Storybook MCP
  5. 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.
  6. ## πŸ“¦ Packages
  7. This monorepo contains four main packages:
  8. - **[@storybook/mcp](./packages/mcp)** - Standalone MCP library for serving Storybook component knowledge (can be used independently)
  9. - **[@storybook/addon-mcp](./packages/addon-mcp)** - Storybook addon that runs an MCP server within your Storybook dev server, and includes the functionality of **[@storybook/mcp](./packages/mcp)** from your local Storybook
  10. - **[@storybook/claude-code-plugin](./packages/claude-plugin)** - Claude Code plugin with Storybook setup skills and MCP configuration
  11. - **[@storybook/codex-plugin](./packages/codex-plugin)** - Codex plugin with Storybook setup skills and MCP configuration
  12. Each package has its own README with user-facing documentation. This document is for **contributors** looking to develop, test, or contribute to these packages.
  13. ## πŸš€ Quick Start
  14. ### Testing the Claude and Codex plugins from GitHub
  15. External testers can install the plugin marketplace directly from this repository's
  16. `main` branch. No local clone is required.
  17. #### Codex ([more details](./packages/codex-plugin))
  18. ```bash
  19. codex plugin marketplace add storybookjs/mcp --ref main
  20. codex plugin add storybook@storybook
  21. ```
  22. Verify the marketplace and plugin:
  23. ```bash
  24. codex plugin marketplace list
  25. codex plugin list --marketplace storybook
  26. ```
  27. #### Claude Code ([more details](./packages/claude-plugin))
  28. ```bash
  29. claude plugin marketplace add storybookjs/mcp@main --scope user
  30. claude plugin install storybook@storybook --scope user
  31. ```
  32. Verify the plugin and MCP server:
  33. ```bash
  34. claude plugin list --json
  35. claude mcp list
  36. ```
  37. The repository intentionally keeps marketplace catalogs in two places. The root
  38. catalogs support GitHub installs from `storybookjs/mcp`; the package-local
  39. catalogs support local package development scripts. They should stay identical
  40. except for the relative plugin source path, and the package validation checks
  41. that they do.
  42. ### Prerequisites
  43. - **Node.js 24+** - The project requires Node.js 24 or higher (see `.nvmrc`)
  44. - **pnpm 10.19.0+** - Strict package manager requirement (enforced in `package.json`)
  45. ```bash
  46. # Use the correct Node version
  47. nvm use
  48. # Install pnpm if you don't have it
  49. npm install -g pnpm@10.19.0
  50. ```
  51. ### Installation
  52. ```bash
  53. # Clone the repository
  54. git clone https://github.com/storybookjs/mcp.git
  55. cd addon-mcp
  56. # Install all dependencies (for all packages in the monorepo)
  57. pnpm install
  58. ```
  59. ### Development Workflow
  60. ```bash
  61. # Build all packages
  62. pnpm build
  63. # Start development mode (watches for changes in all packages)
  64. pnpm dev
  65. # Run unit tests in watch mode
  66. pnpm test
  67. # Run unit tests once
  68. pnpm test:run
  69. # Run Storybook with the addon for testing
  70. pnpm --filter internal-storybook storybook
  71. ```
  72. The Storybook command starts:
  73. - The internal test Storybook instance on `http://localhost:6006`
  74. - The addon in watch mode, so changes are reflected automatically
  75. - MCP server available at `http://localhost:6006/mcp`
  76. ## πŸ› οΈ Common Tasks
  77. ### Development
  78. The `turbo watch build` command runs all packages in watch mode, automatically rebuilding when you make changes:
  79. ```bash
  80. # Start development mode for all packages
  81. pnpm turbo watch build
  82. ```
  83. ```bash
  84. # This is usually all you need - starts Storybook AND watches addon for changes
  85. pnpm storybook
  86. ```
  87. ### Building
  88. ```bash
  89. # Build all packages
  90. pnpm build
  91. ```
  92. ### Testing
  93. The monorepo uses a centralized Vitest configuration at the root level with projects configured for each package:
  94. ```bash
  95. # Watch tests across all packages
  96. pnpm test
  97. # Run tests once across all packages
  98. pnpm test:run
  99. # Run tests with coverage and CI reporters
  100. pnpm test:ci
  101. ```
  102. ### Debugging MCP Servers
  103. Use the MCP Inspector to debug and test MCP server functionality:
  104. ```bash
  105. # Launches the MCP inspector (requires Storybook to be running)
  106. pnpm inspect
  107. ```
  108. This uses the configuration in `.mcp.inspect.json` to connect to your local MCP servers.
  109. Alternatively, you can also use these `curl` comamnds to check that everything works:
  110. ```bash
  111. # test that the mcp server is running
  112. # use port 6006 to test the addon-mcp server instead
  113. curl -X POST \
  114. http://localhost:13316/mcp \
  115. -H "Content-Type: application/json" \
  116. -d '{
  117. "jsonrpc": "2.0",
  118. "id": 1,
  119. "method": "tools/list",
  120. "params": {}
  121. }'
  122. # test a specific tool call
  123. curl -X POST http://localhost:13316/mcp \
  124. -H "Content-Type: application/json" \
  125. -d '{
  126. "jsonrpc": "2.0",
  127. "id": 2,
  128. "method": "tools/call",
  129. "params": {
  130. "name": "list-all-documentation",
  131. "arguments": {}
  132. }
  133. }'
  134. ```
  135. ### Debugging with Storybook
  136. You can start Storybook with:
  137. ```bash
  138. pnpm storybook
  139. ```
  140. 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.
  141. ### Working with the MCP App
  142. To work with and debug the MCP app that is rendered as part of the preview-stories tool, you can:
  143. 1. Use the Insiders build of VSCode
  144. 2. Ensure the [chat.mcp.apps.enabled](vscode-insiders://settings/chat.mcp.apps.enabled) setting is enabled
  145. 3. Start up the repo's Storybook in watch mode by running `pnpm storybook` in the root
  146. 4. Restart VSCode and, open the [`.vscode/mcp.json`](./.vscode/mcp.json) file and ensure the Storybook MCP is marked as Running, otherwise click Start.
  147. 5. Open up a chat in VSCode and write a prompt like this:
  148. > Show me how all the button stories look, using the Storybook MCP
  149. 6. After this first prompt, whenever you make changes, Storybook automatically restarts. Wait for it to be fully ready, then you can prompt _"Run the tool again"_.
  150. You can also use [the inspector from MCPJam](https://docs.mcpjam.com/getting-started) to have more low level control of the tool calls.
  151. ### Formatting & Linting
  152. ```bash
  153. # Format all files with Prettier
  154. pnpm format
  155. # Check formatting without changing files
  156. pnpm format:check
  157. # Lint code with oxlint
  158. pnpm lint
  159. # Lint with GitHub Actions format (for CI)
  160. pnpm lint:ci
  161. # Check package exports with publint
  162. pnpm publint
  163. ```
  164. ## πŸ” Quality Checks
  165. The monorepo includes several quality checks that run in CI:
  166. ```bash
  167. # Run all checks (build, test, lint, format, typecheck, publint)
  168. pnpm check
  169. # Run checks in watch mode (experimental)
  170. pnpm check:watch
  171. # Type checking (uses tsc directly, not turbo)
  172. pnpm typecheck
  173. # Type checking with turbo (for individual packages)
  174. pnpm turbo:typecheck
  175. # Testing with turbo (for individual packages)
  176. pnpm turbo:test
  177. ```
  178. ## πŸ“ Code Conventions
  179. ### TypeScript & Imports
  180. **Always include file extensions** in relative imports:
  181. ```typescript
  182. // βœ… Correct
  183. import { foo } from './bar.ts';
  184. // ❌ Wrong
  185. import { foo } from './bar';
  186. ```
  187. - **JSON imports** use the import attributes syntax:
  188. ```typescript
  189. import pkg from '../package.json' with { type: 'json' };
  190. ```
  191. ## 🚒 Release Process
  192. This project uses [Changesets](https://github.com/changesets/changesets) for version management:
  193. ```bash
  194. # 1. Create a changeset describing your changes
  195. pnpm changeset
  196. ```
  197. When you create a PR, add a changeset if your changes should trigger a release:
  198. - Patch: Bug fixes, documentation updates
  199. - Minor: New features, backward-compatible changes
  200. - Major: Breaking changes
  201. ## 🀝 Contributing
  202. We welcome contributions! Here's how to get started:
  203. 1. **Fork the repository** and create a feature branch
  204. 2. **Make your changes** following the code conventions above
  205. 3. **Test your changes** using the internal Storybook instance
  206. 4. **Create a changeset** if your changes warrant a release
  207. 5. **Submit a pull request** with a clear description
  208. ### Before Submitting
  209. - [ ] Code builds without errors (`pnpm build`)
  210. - [ ] Tests pass (`pnpm test:run`)
  211. - [ ] Code is formatted (`pnpm format`)
  212. - [ ] Code is linted (`pnpm lint`)
  213. - [ ] Type checking passes (`pnpm typecheck`)
  214. - [ ] Changes tested with MCP inspector or internal Storybook
  215. - [ ] Changeset created if necessary (`pnpm changeset`)
  216. ### Getting Help
  217. - **Ideas & Feature Requests**: [Start a discussion](https://github.com/storybookjs/mcp/discussions/new?category=ideas)
  218. - **Bug Reports**: [Open an issue](https://github.com/storybookjs/mcp/issues/new)
  219. - **Questions**: Ask in [GitHub Discussions](https://github.com/storybookjs/mcp/discussions)
  220. ## πŸ“„ License
  221. MIT - See [LICENSE](./LICENSE) for details
  222. ---
  223. **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.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.