Catch Visual UI Bugs with SmartUI Visual Testing

Catch Layout, CSS, and Rendering Bugs across Browsers and Real Devices. Visual AI Filters Out Pixel Noise.

Try SmartUI free

Storybook MCP vs Skills in Storybook 11: Setup, Upgrade and Testing

Storybook 11 adds agent skills, a headless CLI and CSF 4. Learn when to use Storybook MCP vs skills, how to upgrade, and what the agent loop won't check.

Published

Summarise with AI

Storybook 11 (released 1st December 2026) gives the coding agents four official skills: component-docs, write-stories, test-stories and ui-review. It also includes a headless storybook tools CLI, type-safe CSF 4 stories, agent-ready docgen for React, Vue, Angular, Web Components and Svelte and a UI review page. The Storybook MCP server is still there, but Storybook now recommends the skills for most scenarios.

This is all the differences from Storybook 10 (when Storybook MCP was still in play), the upgrade and setup commands, the results of the fresh Storybook 11 project we ran the day after launch and the checks that are still open in an agent's own loop (e.g. cross-browser visual baselines for every Storybook story). The Storybook facts are taken from the Storybook 11 release post, the Storybook 11 docs and the repo's MIGRATION.md as of 2nd Dec 2026.

TL;DR

Storybook MCP is an MCP server, installed with @storybook/addon-mcp, that gives coding agents Storybook's component docs, story and test tools through MCP calls. In Storybook 11 it is optional: four official skills and the headless storybook tools CLI do the same work without a running Storybook, and Storybook recommends skills for most setups.

Storybook AI Setup: MCP vs Skills

  • Storybook skills: The component-docs, write-stories, test-stories and ui-review skills install into .claude/skills/ or .agents/skills/ with a Storybook section in AGENTS.md, and read component details from the CLI. Needs a running Storybook: no.
  • Storybook MCP server: The @storybook/addon-mcp server runs inside the Storybook dev server at localhost:6006/mcp and fits agents you want calling Storybook through MCP tools instead of CLI commands. Needs a running Storybook: yes.
  • Storybook upgrade: The npx storybook@latest upgrade command moves a Storybook 10.x project to 11, and the Storybook test runner gives way to the Storybook Vitest addon. Minimum Node.js: 22.12. TypeScript: 5.9 or 6.x.

What the Storybook 11 Agent Loop Checks

  • Storybook interaction testing: The test-stories skill runs stories with play functions as component tests in Playwright's Chromium by default, and the agent fixes the failures it caused before a human review.
  • Storybook accessibility testing: With the a11y addon, axe checks run on every story. Violations are warnings that do not fail the run unless the a11y test level is set to error. Fails by default: no.
  • Visual regressions: Storybook story tests do not compare screenshots, so a border-radius change on every button passed all 8 story tests in a Storybook 11.0.0 sample project. TestMu AI's SmartUI compares each story against an approved baseline in Chrome, Firefox, Safari and Edge.

What's New in Storybook 11?

Storybook 11 is all about the 'agent experience' according to the release post which describes it as a 'shared UI workshop' in which 'agents can build and check their work and people can review the results'. That's what Storybook 11 is doing for agents:

  • Four official skills. component-docs will look up existing components, their APIs and stories. write-stories will write stories for states and variants (including interactive flows with play functions). test-stories will run stories as component tests, with accessibility checks and will fix any failures. ui-review will assemble a grouped review of the agent's changes.
  • Headless CLI. A new storybook tools command gives agents the same tools as the MCP server from the shell, and most of the tools will run without a dev server. The CLI docs have the command marked as experimental, so the options and output could change in 11.x.
  • CSF 4 uses a factory API (preview.meta, meta.story) which is fully type-safe, and addons can extend the types. New projects get CSF 4 stories by default (we've checked, see below).
  • Docgen: React is moving to react-component-meta, Vue to vue-component-meta and Web Components are getting the slot, event and CSS variable controls from the Custom Elements Manifest. Svelte is now a core framework.
  • Smaller package. Release post reports a 29% smaller package and "up to 19x faster context delivery than v10".

For a quick visual walkthrough of this concept, watch the video below from TestMu AI.

Youtube thumbnail

Subscribe to the TestMu AI YouTube channel for more tutorials on testing and automation.

Storybook 10 vs Storybook 11

AreaStorybook 10Storybook 11Sources
Agent integrationMCP addon (@storybook/addon-mcp, React first on 10.3, March 2026), plus one stories skill and Claude Code/Codex pluginsFour official skills (component-docs, write-stories, test-stories, ui-review) installed into the repo; MCP still supported for all core frameworksMIGRATION.md, MCP for React, SB11 beta
Review of agent changesExperimental agentic review (review-create), behind features.experimentalReview for most MCP clientsAlways on; UI review page built by ui-reviewMIGRATION.md, UI review docs
Agent setup commandstorybook ai setupstorybook skills setup, plus headless storybook toolsMigration guide, CLI options
Story formatCSF Factories in Preview, React onlyCSF 4 factories (preview.meta / meta.story), type-safe; CSF 3 still supportedSB10, Upgrade to CSF 4
Test runnerJest + Playwright test runner availableTest runner removed; migrate to addon-vitestMigration guide
React docgenreact-docgen / react-docgen-typescriptreact-component-meta, server-side by defaultSB11 beta, migration guide
SvelteNot a core frameworkCore framework (Svelte 5, SvelteKit 3)SB11 beta
Minimum Node.js20.16+, 22.19+ or 24+22.12SB10, migration guide
storybook devOpens a browserNo longer opens a browser automaticallyMigration guide

Is Storybook MCP Still Required in Storybook 11?

Storybook MCP is an MCP server that's installed via the @storybook/addon-mcp addon and runs inside the Storybook dev server. It provides coding agents with the same component-docs, story and test tools as the Storybook 11 skills. In Storybook 11 it's optional.

The connect docs describe the MCP server as "an alternative way for your agent to interact with your Storybook instance" and the MCP server reference states: "For most setups, we recommend skills."

Skills can read component details from the CLI without a running Storybook. The MCP server is at http://localhost:6006/mcp and requires the dev server to be running. MCP still requires shell access as the server will instruct the agent to read each workflow step via npx storybook skills <id> --mcp.

QuestionStorybook skillsStorybook MCP server
InstallInstalled by npm create storybook@latest, or npx storybook automigrate skills in an existing projectnpx storybook add @storybook/addon-mcp, then register the server with your agent
Needs a running StorybookOnly for tools that need the browser (stories preview, review create)Yes, always
Where it lives.claude/skills/ for Claude Code, .agents/skills/ for other agents, plus a section in AGENTS.mdAgent's MCP config; the server tells the agent when to use its tools
Agents named in the docsClaude Code and Codex plugins; repo-level skills for other agentsSetup guides for Claude Code, Gemini CLI, Codex and VS Code Copilot
Storybook's recommendation"For most setups, we recommend skills."Use it if you want MCP tool calls instead of CLI commands

If you've used Storybook MCP on Storybook 10, then the connect docs tell you to run 'storybook remove @storybook/addon-mcp', remove the server from your agent's config and delete the MCP bits from AGENTS.md (so the agent doesn't get two sets of instructions). You can also have both routes point at a published Storybook (the connect docs say "You can also connect your agent to a published Storybook instead of running it locally").

The Storybook docs make absolutely no mention of Cursor at all. They just tell you to install the skills for the agents other than Claude Code into the .agents/skills/ folder. So don't go relying on that just yet; make sure your Cursor setup is actually picking up that folder.

How to Set Up Storybook MCP in Storybook 11

Storybook MCP setup takes two commands from the MCP server reference:

npx storybook add @storybook/addon-mcp

npx mcp-add --type http --url "http://localhost:6006/mcp" --scope project

Start Storybook and then ask your agent to "List all documented components". It should invoke the docs-list tool. The docs tools all read a components manifest; most frameworks which generate a manifest will have it turned on by default, so if docs-list returns nothing, check the manifest framework support.

You won't get anything back if there's no manifest; the other tools will still work in that case. If you're reaching Storybook via a different hostname (e.g. via a reverse proxy) then you'll need to add that to core.allowedHosts.

How Do You Upgrade to Storybook 11?

Upgrading to Storybook 11 is one command plus the manual changes that the automigrations report. Check the prerequisites first from the migration guide and MIGRATION.md:

  • Storybook 10.x is already installed. The Storybook 11 upgrade no longer ships the automigrations for 8.x, 9.x or 10.0, so if you're on an older version, you'll need to upgrade to 10 first.
  • Node.js 22.12 or later.
  • TypeScript 5.9 or 6.x. TypeScript 7.0 has no API that Storybook's docgen can use. npm and pnpm will install TypeScript 7 to satisfy the new typescript peer dependency, which docgen can't use; the typescript-dependency automigration will add typescript@^6 if your project has no TypeScript.
  • React 18+, Angular 21+, Vite 6.3+, Next.js 15+, SvelteKit 3+, Vitest 4.0+ for @storybook/addon-vitest.
  • No Create React App preset and no Yarn Plug'n'Play (nodeLinker: node-modules is required).
  • Community addons or builders that import storybook/internal/babel will stop loading until they publish a Storybook 11 release.

Then:

  • Dry-run the upgrade to see what it will change: npx storybook@latest upgrade --dry-run
  • Run the upgrade from the repo root. Automigrations will deal with the majority of the breaking changes and will list the ones you need to fix by hand. npx storybook@latest upgrade. The migration guide still outputs storybook@next. Since 11.0.0 shipped, npm's next tag has been pointing to an 11.1 alpha (11.1.0-alpha.0 as of December 2), so use @latest.
  • If you're using the Storybook test runner, then switch to the Vitest addon. The test runner is removed in 11: npx storybook add @storybook/addon-vitest
  • Accept the skills automigration when prompted or install them later (see next section).
  • Optionally move stories to CSF 4, one file at a time or all at once: npx storybook automigrate csf-factories

The big breaking changes that most teams will run into: storybook ai setup is now storybook skills setup; the setProjectAnnotations calls in your vitest setup files have all moved into .storybook/preview; reading argTypes from the story context now throws; and the Web Components argTypes keys for events, slots and parts all require a category suffix. The migration guide has the full list.

How Do You Set Up the Storybook 11 Agent Loop?

The Storybook 11 agent loop is four steps: read the component docs, write the stories, test them and then show the human the review.

  • Install the skills. For a new project, just run npm create storybook@latest. In an existing project you'd run npx storybook automigrate skills from the project root. That will create /component-docs, /write-stories, /test-stories, /ui-review and three setup skills in .claude/skills/ (for Claude Code) or .agents/skills/ (for other agents), create skills-lock.json and add a Storybook section to AGENTS.md. Commit all of that so the team is all on the same version.
  • Add the Vitest addon if you haven't already. Story tests need it, and it needs the Vite builder: npx storybook add @storybook/addon-vitest
  • Add the accessibility addon if you want test-stories to run a11y checks. Set a11y: { test: 'error' } if you want violations to cause the run to fail (our test below is a good example of why).
  • Check the AGENTS.md section. For every UI change, it has the agent use /component-docs prior to editing, /write-stories for any new or altered component and run the tests, then to let you know about /ui-review. You can of course edit the steps once you've removed the markers around the section; it's just that Storybook will then stop keeping it in sync.
  • Let the agent test its stories via the headless CLI: npx storybook tools test run --changed. --changed will test stories which are affected by uncommitted changes. You can pass in story files to test just those, or pass in nothing to test everything.
  • Review the result with /ui-review. The agent will start the dev server if it's not already running and open up a review page which will group the affected stories (into two to five groups) with a summary of what's changed.

To see what the agent can read, list your components the way it will:

npx storybook tools docs list

npx storybook tools docs show --input '{"id":"button"}'

We Ran It: Storybook 11 on a Fresh Project

We installed Storybook 11.0.0 onto a fresh React + Vite app on 2nd December 2026 (IST) and ran the agent's test command directly (no agent at all driving the session). The machine was a 2vCPU Linux cloud sandbox running Node 22.23.5.

Commands, in order:

npm create vite@latest sb11-sample -- --template react-ts --no-interactive

cd sb11-sample && npm install

npm create storybook@latest -- --yes --no-dev

npx storybook tools test run

npx storybook tools test run --changed
Storybook 11 init output listing seven skills copied into .claude/skills and .agents/skills

What we saw:

  • Setup took 44.8 seconds (including a browser download that failed in our sandbox) for npm create storybook@latest and added 132 packages. As our sandbox runs under Claude Code, init detected an agent and used its "agentic installation flow" to install the skills (no prompting required). If you ran it interactively, init would ask first with 'yes' as the default. It installed 7 skills (component-docs, storybook-init, storybook-setup, storybook-upgrade, test-stories, ui-review, write-stories) into both .claude/skills/ and .agents/skills/ (approx. 60KB each) and pinned them in skills-lock.json to storybookjs/skills v11.0.0. It also wrote out the AGENTS.md section, configured the Vitest and a11y addons and created the example stories in CSF 4.
  • The Vite React template now ships with TypeScript 7.0.2. Storybook flagged that TypeScript 7 doesn't have the compiler API that it needs for Controls and the args table, so it's using react-docgen as a fallback and has output the fix (install typescript@^6, or install TypeScript 7 and 6 side by side). The tools docs list still had all three components listed and took 1.7 seconds to load.
  • The test step ran 8 stories with axe checks in 7.8 to 9.1 seconds over three runs: "Passed: 8 component tests passed. Accessibility: 8 stories checked, no violations."
  • A big visual change went through. We changed the border radius on all the buttons from 3em to 0 and increased the medium button's padding from 11px 20px to 24px 48px. Test run: still reported 8 passed and no violations, exit code 0. That's as expected. Storybook's test step looks at behavior and accessibility, and the docs trigger the visual tests.
  • A serious contrast failure occurred with the default settings. We changed the primary button text to #7b80d6 on #555ab9 (1.66:1 contrast ratio). Axe flagged color contrast (serious) on 3 stories, with the output stating that the violations were "reported as warnings which do not fail the run" and the exit code was 0. The output also advised the agent to "ask before changing the design" for any visual issues such as contrast.
  • With a11y: { test: 'error' }, the same change failed: "Failed: 3 accessibility checks failed", exit code 1.
  • The storybook package is 27.5% smaller unpacked than 10.6.9 (16.1MB vs 22.3MB on npm). The release post refers to 29% but doesn't state what the baseline is.
Storybook tools test run output reporting color-contrast violations as warnings with all 8 tests passingStorybook tools test run failing three accessibility checks after the a11y test level is set to error

What we couldn't test: the sandbox blocked Playwright's browser downloads so the init browser step failed (a non-blocking error) and we were unable to install Firefox or WebKit. We did, however, point Vitest's Playwright provider at the sandbox's pre-installed Chrome for Testing 158 with a single launchOptions.executablePath. All the results above are from that one Chromium build. We didn't run an agent session or the /ui-review page.

What Does a Type-Safe CSF 4 Story Look Like?

A CSF 4 story is constructed from the preview object so meta and stories are typed without casting. Here's an example from the Storybook 11 release post:

import preview from '../.storybook/preview';
import { Button } from './Button';

const meta = preview.meta({
  component: Button,
  parameters: {
    // 👇 Type-safe!
    a11y: { test: 'error' },
  },
});

// 👆👇 No type casting for meta or stories!
export const Primary = meta.story({ args: { primary: true } });

The a11y: { test: 'error' } parameter is important for agent-written stories as it determines whether a contrast failure passes or fails in our run. The test stories skill will never change your accessibility test level to make a test pass, so the level you set remains as you set it.

Before you use CSF 4 in an existing project, you'll need to update .storybook/main and .storybook/preview (preview now exports definePreview({...}) with an addons array). You cannot mix CSF 3 and CSF 4 in the same file.

What Does '19x Faster Context Delivery' Mean?

"Up to 19x faster context delivery than v10" is what the release post says; it doesn't say how the 19x figure was measured. The beta post from 9th November stated "up to 10x" and did provide one actual case: around 10x faster cold-start docgen on Chromatic's own Storybook, with another 2x to be expected once TypeScript 7.1 has stabilized. 19x is the upper bound in that case - the only actual case that Storybook has ever described is cold-start docgen.

Storybook's benchmark for the skills covers 650 runs with Opus 5. An app with a design system and Storybook skills was "up to 41% faster" on the tasks, used "up to 31% fewer tokens" and produced "up to 16% leaner code" than the same app without the skills. Storybook also found that agents made half as many mistakes reusing design system components (~4% with Storybook vs ~8% in the control).

What Does Storybook 11's Agent Loop Check and What Does It Leave Open?

Storybook 11's loop is all about component reuse, story writing, browser tests with accessibility checks and a grouped review. The same agent is in charge of determining which states get stories, writing the assertions, fixing the failures and building the review. The Storybook docs make it clear that the review "is a curated selection, not a complete list of affected stories" and you're expected to look at the groups and the summary the agent has produced.

A passing run only tells you that the agent's own stories have all passed. It doesn't tell you which states actually need stories (that's still a decision for a human or a separate system).

Story tests run in one browser engine by default. The Vitest addon uses Playwright's Chromium (Vitest addon docs), and you can change the browser via the Vitest config. Our run above has two additional limits: visual changes don't cause the test step to fail, and accessibility violations only cause the test step to fail when a11y.test is 'error'.

CheckWhat Storybook 11's loop doesWhat still needs an independent check
Component reusecomponent-docs lists components and props before the agent editsNothing extra; this is a Storybook strength
Story coverageAgent writes stories for the states it choosesA human or separate system deciding which states must exist
Interaction and play-function teststest-stories runs them in a real browser (Chromium by default)Running the same stories in Firefox, Safari and Edge
AccessibilityAxe checks per story; warnings by default, failures with a11y.test: 'error'; agent fixes only issues it causedPage-level WCAG scans and screen-reader checks on real devices
Visual regressionsNot checked by the test step (a border-radius change on every button and a larger medium-button padding passed in our run); Storybook points to visual tests with Chromatic, its team's cloud serviceApproved image baselines per story, per browser and viewport
User flows across pagesOut of scope (component workshop)End-to-end tests of the pages the components build
Reviewui-review groups changes; curated by the agentDiffs against a baseline the agent didn't write

Each row in the right-hand column requires a check whose pass/fail isn't coming from the model that wrote the code.

How Do You Add Independent Verification Into a Storybook Agent Loop?

TestMu AI adds that layer with SmartUI for story-level visual checks, Accessibility Testing for page-level WCAG scans and Kane CLI for end-to-end flows. These all run after the Storybook loop against baselines and criteria that the agent itself didn't write.

Visual Baselines for Every Story With SmartUI

SmartUI visual testing runs on each Storybook story and each variant individually, compares it against an approved baseline and flags the one component that's changed. It's a single CLI step that runs after your Storybook build. The commands below are from the SmartUI Storybook setup guide (which requires Node.js 20.3+ for SmartUI CLI v4).

npm install @lambdatest/smartui-storybook -g

smartui config create .smartui.json

Set the browsers and viewports for each story in .smartui.json:

{
  "storybook": {
    "browsers": ["chrome", "firefox", "safari", "edge"],
    "viewports": [[1920, 1080]],
    "include": [],
    "exclude": []
  }
}

Set your project token, then run SmartUI against a static build:

export PROJECT_TOKEN="<your SmartUI project token>"

npm run build-storybook

smartui storybook ./storybook-static --config .smartui.json

Copy the project token from your SmartUI project settings. If you're pointing SmartUI at a running Storybook URL rather than a static build, then you'll also need to export LT_USERNAME and LT_ACCESS_KEY.

The first run creates baselines. Later runs show per-story diffs for a reviewer to approve or reject in the SmartUI dashboard, so the baseline doesn't come from the agent that changed the story. The border-radius and padding change that passed every story test in our run is the kind of diff this step is built to show.

SmartUI Storybook CLI comparing a Storybook 11 build with its baseline and finding changes in all 32 story screenshots after a border-radius change

The setup guide lists Storybook versions above 6.4.0 and supports play functions from Storybook 9 onward. Tested with Storybook 11.0.0 on December 2, 2026.

To have your agent wire this up, the SmartUI agent skills docs will install the skill from GitHub. The docs list Claude Code, GitHub Copilot, Cursor, Gemini CLI, Codex CLI, OpenCode and Claude.ai:

git clone https://github.com/LambdaTest/agent-skills.git

# For Claude Code
cp -r agent-skills/smartui-skill .claude/skills/

# For Cursor
cp -r agent-skills/smartui-skill .cursor/skills/

# For GitHub Copilot
cp -r agent-skills/smartui-skill .github/skills/

# For Gemini CLI
cp -r agent-skills/smartui-skill .gemini/skills/
Note

Note: Start free: the SmartUI free plan comes with 2,000 screenshots (valid for life, SmartUI pricing as at 2026-12-02). Just point it at your Storybook build, and it'll tell you which stories change across the browsers.

Accessibility Beyond the Story

Storybook's a11y checks run per story. Once the components have been assembled into pages, the WCAG a11y checks on real devices cover what a story can't cover - full pages and sitemaps against WCAG 2.2, ADA, Section 508 and the European Accessibility Act. The issues are confirmed on real devices and screen readers.

End-to-End Flows With Kane CLI

Kane CLI tests the pages that your components end up in. The Kane CLI end-to-end testing agent runs from the Claude Code, Cursor, Codex or Gemini CLI. You describe the flow in plain English, and it runs in a real browser, and returns pass/fail with steps, screenshots and logs.

As the Kane CLI page puts it, "a separate verification step decides the verdict", so the coding agent's account of the run doesn't count as a pass. Kane CLI doesn't run Storybook stories. Use it on the flows that those components make up.

npm install -g @testmuai/kane-cli

Where This Fits With Your Other Storybook Tests

This article is about the agent workflow. Our full guide to Storybook testing covers the interaction, snapshot and test runner approaches and the Storybook visual regression tutorial walks you through the baselines step by step.

Note

Note: Start free: run your Storybook build through SmartUI on the free plan (2,000 screenshots, valid for lifetime) and compare every story across Chrome, Firefox, Safari and Edge.

Conclusion

Start with the skills: run npx storybook automigrate skills in an existing project, add the Vitest and accessibility addons, and set the a11y test level to error so a contrast failure fails the run. Keep Storybook MCP only if you want your agent calling Storybook through MCP tools, and remove one route if you run both.

Then add the checks the agent doesn't grade itself: a visual baseline for every story before you gate merges, page-level accessibility scans and end-to-end flows on the pages your components build.

Did your last release break the UI? TestMu AI's SmartUI catches visual regressions by comparing every screen to its baseline.

To run your first test, start free, or
for a full walkthrough of the product.

Was this helpful?

Authors

Sushobhit Dua

Sushobhit Dua

Author · 10 posts

Sushobhit Dua is an Engineering Manager at TestMu AI, leading SmartUI, the visual regression and visual testing product. He manages the team that builds and ships SmartUI and maintains and cuts releases of the open-source SmartUI CLI. He works primarily in Core Java, Spring Boot, and Gradle, and is an AMCAT Certified Software Engineer. He brings over 10 years of software engineering experience, with earlier work as a Software Engineer at ecare Technology Labs. Sushobhit owns the SmartUI roadmap and the engineering decisions behind it.

Parth Mistry

Parth Mistry

Reviewer

Parth Mistry is a Member of Technical Staff at TestMu AI, building SmartUI, the visual regression testing product. He developed and owns the SmartUI CLI, a modular TypeScript tool built on Playwright for multi-browser automation, and built the Storybook CLI for visual regression of UI components. He maintains cross-language SDKs in Python, Java, Ruby, C#, and Node.js, and engineered a Node-based visual rendering service on Kafka, Redis, MySQL, and S3. His migration of that service to an event-driven, KEDA-autoscaled architecture improved execution speed by 60% and cut annual infrastructure cost by $9,600. He also built the end-to-end SmartUI integration with KaneAI. Parth is a Google Summer of Code 2024 contributor and an alumnus of IIT Jodhpur.

Storybook MCP FAQs

TestMu AI forEnterprise

Get access to solutions built on Enterprise
grade security, privacy, & compliance

  • Advanced access controls
  • Advanced data retention rules
  • Advanced Local Testing
  • Premium Support options
  • Early access to beta features
  • Private Slack Channel
  • Unlimited Manual Accessibility DevTools Tests