About storybookjs/addon-mcp
storybookjs/addon-mcp is an MCP server published by storybookjs in the Communication category: help agents automatically write and test stories for your UI components. Conduid read 16 tools from its source: js, js_add_node_module_dir, js_reset, preview_click, preview_console_logs, preview_eval and 10 more. No package is published for it, so it installs from a source checkout.
The repository has 272 stars and 41 forks, and its last commit was on 7 Sep 2026. The latest release is @storybook/addon-mcp@0.7.0 (10 Jul 2026): Minor Changes 357 4a19151 Thanks @kasperpeulen. It follows @storybook/mcp@0.8.0 (8 Jul 2026), and the 5 most recent releases go back to @storybook/mcp@0.6.2 (2 Apr 2026). It passes all 1 static checks Conduid ran on the repository. Its topics include comms.
Install
git clone https://github.com/storybookjs/addon-mcpTools (16)
jsRun JavaScript in a persistent Node-backed kernel with top-level await. This is the JavaScript execution tool for the `node_repl` MCP server; use it whenever instructions say to use `node_repl`, the Node REPL MCP, or run Node REPL code. If `timeout_ms` is omitted, execution defaults to 30000 ms (30 seconds). Bindings persist across calls until `js_reset`.| Parameter | Type | Description |
|---|---|---|
| code * | string | JavaScript source to execute in the persistent Node-backed kernel. The code runs with top-level await and can use the `nodeRepl` helpers. Examples: `nodeRepl.write(nodeRepl.cwd)`, `const { chromium } = await import("playwright")`, or `await nodeRepl.emitImage(pngBuffer)`. |
| timeout_ms | integer | Optional execution timeout in milliseconds. Defaults to 30000 (30 seconds) when omitted. |
| title | string | Short user-facing description of what this code block is doing. Use a few words, for example `Inspect package layout`. |
js_add_node_module_dirAdd an absolute `node_modules` directory to the REPL-wide Node module search roots for future package imports. The directory stays available for this MCP server lifetime, including after `js_reset`. Returns `true` when the search root is newly added.| Parameter | Type | Description |
|---|---|---|
| path * | string | Absolute path to a node_modules directory to add to Node package resolution. |
js_resetReset the persistent JavaScript kernel and clear all bindings created by prior `js` calls. Use this when you need a clean state, or when reusing existing bindings, top-level `var` declarations, or fresh names cannot recover from conflicting declarations.preview_clickClick an element by CSS selector (e.g., 'button.primary', '#submit', '[data-testid="btn"]').| Parameter | Type | Description |
|---|---|---|
| doubleClick | boolean | Perform a double-click |
| selector * | string | CSS selector for the element to click |
| serverId * | string | Server ID |
preview_console_logsGet browser console output (log, info, warn, error, debug). Use to check runtime behavior, debug values, or client-side errors. Use 'level' to filter to errors or warnings only.| Parameter | Type | Description |
|---|---|---|
| level | string | Filter by level: 'all' (default), 'error' (errors only), 'warn' (warnings + errors) |
| lines | number | Max lines to return (default: 50, max: 200) |
| serverId * | string | Server ID |
preview_evalExecute JavaScript in the preview page for DEBUGGING and INSPECTION only. Use for reading page state, DOM queries, checking variables, navigation, page reload, hover/type/key events. Do NOT use this to implement UI changes the user requests — edit the source code instead. Any DOM modifications via eval are temporary and lost on reload. Wrap multi-step logic in an IIFE.| Parameter | Type | Description |
|---|---|---|
| expression * | string | JavaScript expression to evaluate in the page context. Return values are serialized as JSON. |
| serverId * | string | Server ID |
preview_fillFill an input, textarea, or select element with a value. For select elements, matches by value or text.| Parameter | Type | Description |
|---|---|---|
| selector * | string | CSS selector for the input element |
| serverId * | string | Server ID |
| value * | string | Value to fill |
preview_inspectInspect 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.| Parameter | Type | Description |
|---|---|---|
| selector * | string | CSS selector (e.g., '.button', '#header') |
| serverId * | string | Server ID |
| styles | array | CSS properties to return (e.g., ['padding', 'color']). Defaults to common properties. |
preview_listList servers started with preview_start. Returns serverIds for use with other preview_* tools.preview_logsGet server stdout/stderr output. Use to check for build errors, verify server behavior, or read debug output. Use 'level' to filter to errors only, or 'search' to filter for specific text. Use after preview_start.| Parameter | Type | Description |
|---|---|---|
| level | string | Filter by level: 'all' (default) shows all output, 'error' shows only lines containing error/exception/failed/fatal |
| lines | number | Max lines to return (default: 50) |
| search | string | Filter to lines containing this text (e.g., '[DEBUG]', 'POST /api') |
| serverId * | string | Server ID |
preview_networkList 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).| Parameter | Type | Description |
|---|---|---|
| filter | string | Filter: 'all' (default) shows all requests, 'failed' shows only 4xx/5xx and network errors. Ignored when requestId is provided. |
| requestId | string | If provided, returns the response body for this specific request instead of listing all requests. Get requestIds from the listing output. |
| serverId * | string | Server ID |
preview_resizeResize 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.| Parameter | Type | Description |
|---|---|---|
| colorScheme | string | Emulate prefers-color-scheme media feature for dark/light mode testing. |
| height | number | Viewport height in pixels |
| preset | string | Device preset. Overrides width/height if provided. |
| serverId * | string | Server ID |
| width | number | Viewport width in pixels |
preview_screenshotTake 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.| Parameter | Type | Description |
|---|---|---|
| serverId * | string | Server ID |
preview_snapshotGet 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.| Parameter | Type | Description |
|---|---|---|
| serverId * | string | Server ID |
preview_startStart a dev server by name from .claude/launch.json. If .claude/launch.json doesn't exist, create it first with this format:| Parameter | Type | Description |
|---|---|---|
| name * | string | Server name from .claude/launch.json. |
preview_stopStop a server started with preview_start.| Parameter | Type | Description |
|---|---|---|
| serverId * | string | Server ID to stop |
Security checks
- ✓README presentThe repository's README runs to about 1.1K words.
5 checks have not been run yet.
Releases
README
The repository's README runs to about 1.1K words. The original in the repository is authoritative.
Read full README