StorybookBLOCK
🤖
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
[!TIP] This repository has moved to storybookjs/storybook as of Storybook v10.6.0. Please check there for updated documentation.
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.
📦 Packages
This monorepo contains four main packages:
- @storybook/mcp - Standalone MCP library for serving Storybook component knowledge (can be used independently)
- @storybook/addon-mcp - Storybook addon that runs an MCP server within your Storybook dev server, and includes the functionality of @storybook/mcp from your local Storybook
- @storybook/claude-code-plugin - Claude Code plugin with Storybook setup skills and MCP configuration
- @storybook/codex-plugin - Codex plugin with Storybook setup skills and MCP configuration
Each package has its own README with user-facing documentation. This document is for contributors looking to develop, test, or contribute to these packages.
🚀 Quick Start
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)
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)
claude plugin marketplace add storybookjs/mcp@main --scope user claude plugin install storybook@storybook --scope user
Verify the plugin and MCP server:
claude plugi
a9988223307eOBSERVED · 2026-10-07Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control.
claude mcp add addon-mcp -- npx -y @storybook/[email protected]
Exposed tools (28)
22 read · 5 write · 1 destructive. Blast radius: 1 tool can delete or overwrite — an agent that can be talked into calling a tool can be talked into calling this one.
| Tool | Risk | Description |
|---|---|---|
Button | read | A button |
Primary | read | The primary button variant. |
WithIcon | read | Button with an icon |
children | read | |
component-concise-reshaped-internal | read | Internal matrix for reshaped component tasks (901-907) using concise prompt variants. |
disabled | write | Disable the button |
js | write | Run JavaScript in a persistent Node-backed kernel with top-level await. This is the JavaScript execution tool for the |
js_add_node_module_dir | write | Add an absolute |
js_reset | destructive | Reset the persistent JavaScript kernel and clear all bindings created by prior |
label | read | From react-docgen-typescript |
onClick | read | Click handler |
preview-by-id-internal | read | Internal matrix for preview-by-id eval tasks (914-915) with prompt-variant combinations. |
preview_click | read | Click an element by CSS selector (e.g., |
preview_console_logs | read | Get browser console output (log, info, warn, error, debug). Use to check runtime behavior, debug values, or client-side errors. Use |
preview_fill | read | Fill an input, textarea, or select element with a value. For select elements, matches by value or text. |
preview_inspect | read | Inspect a DOM element by CSS selector. Returns text content, className, tagName, id, computed styles, and bounding box. BEST tool for verifying visual properties like colors, fonts, spacing, and dimensions — more accurate than screenshots. |
preview_list | read | List servers started with preview_start. Returns serverIds for use with other preview_* tools. |
preview_logs | read | Get server stdout/stderr output. Use to check for build errors, verify server behavior, or read debug output. Use |
preview_network | read | List network requests or inspect a specific response body. Without requestId, lists all requests with URL, method, status, and requestId. With requestId, returns the full response body for that request (useful for inspecting API payloads). |
preview_resize | read | Resize the preview viewport to test responsive layouts. Presets: mobile (375x812), tablet (768x1024), desktop (1280x800). Also supports custom dimensions and color scheme emulation for dark mode testing. |
preview_screenshot | read | Take a screenshot of the page. Good for checking layout and general appearance, but DO NOT rely on it for verifying colors, font sizes, or precise styles — use preview_inspect with specific CSS properties instead. Returns a compressed JPEG image. |
preview_snapshot | read | Get an accessibility tree snapshot of the page. Returns exact text content, roles, and element UIDs for use with click/fill/hover. PREFERRED over screenshot for verifying text, element presence, and page structure. |
preview_start | write | Start a dev server by name from .claude/launch.json. If .claude/launch.json doesn |
preview_stop | write | Stop a server started with preview_start. |
storybook-mcp-comparison | read | Compare eval performance with and without the Storybook Docs MCP Server enabled. |
testing-toolset-internal | read | Internal matrix for testing-toolset eval tasks (908-913) with prompt-variant combinations. |
textValue | read | Required when children are not plain text. |
variant | read | Button style variant |
Trust audit
BLOCKgrade D · trust 66/100 Do not install this without reading the findings. The audit found something that could harm you or your machine.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | FAIL |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | WARN |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- declared (6 observation(s))
- Network
- declared (6 observation(s))
- Shell
- declared (2 observation(s))
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (25)
exec(`npx msw init public`, {const mcpUrl = 'http://127.0.0.1:' + port + '/mcp';
const STORYBOOK_MCP_URL = 'http://127.0.0.1:6006/mcp';
p.log.message(`🧑⚖️ Judge: i️ ${pct}% (${judge.agent}, ${judge.model})`);js_reset
streamable-http
.mcp.inspect.json
.oxfmtrc.json
.oxlintrc.json
import { createMcpHandler } from '../../server.ts';import type { Agent, ClaudeModel } from '../../types.ts';import { CLAUDE_MODELS, CLAUDE_MODEL_MAP } from '../../types.ts';} from '../../templates/result-docs/transcript.types.ts';
import type { Agent, McpServerConfig, CodexModel } from '../../types.ts';fixtureUrl = `http://127.0.0.1:${address.port}/`;'curl http://127.0.0.1:6006/mcp/preview-stories --data \'{"params":{"arguments":{"stories":[{"storyId":"example-button--secondary"}]}}}\'',expect(isLocalDevServerUrl('http://127.0.0.1:4123/iframe.html?id=button--primary')).toBe(true);vercel, @tailwindcss/postcss, @types/react, @types/react-dom, postcss, tailwindcss
@acme/ui
@types/react, @types/react-dom, @vitejs/plugin-react, react, react-dom, tinyexec
@storybook/mcp, srvx, @types/node, typescript
@anthropic-ai/claude-agent-sdk, @commander-js/extra-typings, @radix-ui/colors, @radix-ui/react-popover, @radix-ui/react-toggle, @radix-ui/react-toggle-group, @tsconfig/node-ts, @tsconfig/node24
1. Load `.env` file using `loadEnvFile` from `node:process`
- **Sandbox access**: this suite is configured with `sandbox: 'auto'`, which uses Vercel Sandbox when access-token credentials (`VERCEL_PROJECT_ID`, `VERCEL_TEAM_ID`, and `VERCEL_TOKEN`) are present a
CI uses Vercel Sandbox through access-token credentials (`VERCEL_PROJECT_ID`,
Gates applied: no_behavioural_pass.
a9988223307efull audit observations/trust-audit/mcp-server/storybookjs__storybook-4.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-07 | a9988223307e | BLOCK | D | 66 | first audit |
Questions
What is the Storybook MCP server?
🤖
What tools does Storybook expose?
28 in total: 22 read-only, 5 that write, and 1 that can delete or overwrite (js_reset). Every one is listed on this page with its risk.
Is Storybook safe to connect to an agent?
No — not without reading the findings first. The audit graded it D (66/100) and found 1 critical or high issue in the source. Each one is listed on this page with the file and line it is on. Separately from the audit: 1 of its tools can destroy data, so scope the token you give it to what you actually need.
What credentials does Storybook need?
No credential environment variables were found in its source, so it appears to need none.
How does Storybook run?
It speaks streamable-http, so it runs as a service you connect to over the network. It is published on npm as @storybook/mcp at 0.8.0.
How current is this page?
The grade is for one exact copy of the source (a9988223307e), read on 2026-10-07. The repository is watched and re-audited when it changes.