storybook-mcp-server is a TypeScript-based Model Context Protocol (MCP) server that enables AI assistants to interact comprehensively with Storybook instances. It allows AI agents to discover components, list and filter stories, retrieve detailed story information (including props and args), and capture screenshots across various viewports. The current stable version is 0.1.3, indicating it's in early development with a focus on feature completion and documentation. Release cadence appears to be driven by documentation updates and initial feature set completion rather than strict timeboxes, with all releases to date being pre-1.0. Key differentiators include its adherence to the MCP standard, direct integration with Storybook for metadata extraction, and leveraging Puppeteer for robust visual testing capabilities, making it a specialized tool for AI-driven component interaction and analysis.
npm install storybook-mcp-serverVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to launch the `storybook-mcp-server` as a command-line utility, connecting it to a specified Storybook instance and configuring an output directory for captured screenshots. This showcases the primary way developers interact with the server, enabling AI assistants to access Storybook content.
Refer to the latest release notes and official documentation for API changes when upgrading to new versions.
Ensure your Node.js environment is updated to version 18 or higher. Utilize a Node.js version manager like `nvm` to easily manage and switch between Node.js versions.
Verify that a compatible browser is installed on your system. For headless or CI/CD environments, ensure all necessary system dependencies for Puppeteer are present. Consult Puppeteer's troubleshooting guide for common browser launch issues.
Before starting `storybook-mcp-server`, ensure your Storybook application is running and accessible at the URL you provide (e.g., `http://localhost:6006`).
Upgrade your Node.js environment to version 18 or higher. For example, using `nvm`: `nvm install 18 && nvm use 18`.
Ensure your Storybook development server is actively running and accessible from where you're running the MCP server. Verify the `--storybook-url` argument matches your Storybook's actual address.
Install Google Chrome or Chromium on your system. For server environments, ensure that all headless browser dependencies are installed. In some cases, setting the `PUPPETEER_EXECUTABLE_PATH` environment variable might be necessary if the browser is in a non-standard location.