npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@akfm/storybook-mcp

v0.1.3

Published

MCP server for Storybook

Readme

@akfm/storybook-mcp

npm version License: MIT

An MCP server that provides comprehensive Storybook Story analysis including accessibility trees, screenshots, network request tracking, and console log capture.

Quick Start (Users)

  1. If you haven't installed Playwright browsers yet:
npx playwright install
  1. Add the MCP server to your .cursor/mcp.json, .mcp.json, or similar configuration:
{
  "mcpServers": {
    "storybook-mcp": {
      "command": "npx",
      "args": ["@akfm/storybook-mcp"]
    }
  }
}

Development Quick Start

  1. Install dependencies and build the MCP server:
npx playwright install
pnpm i
pnpm build
  1. Add the MCP server to your Cursor mcp.json with local path:
{
  "mcpServers": {
    "storybook-mcp": {
      "command": "node",
      "args": ["/{your-path}/akfm-storybook-mcp/dist/index.js"]
    }
  }
}

[!NOTE] storyName Parameter: The storyName parameter should be the export constant name from your story file, not the story object's name property.

For example, if your story file has:

export const Default = { ... }
export const Primary = { ... }

Use "Default" or "Primary" as the storyName, not the value of the story's name property.

MCP Specs

get_storybook_a11y_tree

Retrieves the accessibility tree from a Storybook Story.

Parameters:

  • title (string, required): Story title
    • Example: MyTest/SomeText, Button
  • storyName (string, required): Story export constant name (NOT the story object's name property)
    • Example: Default, Primary (these are the names after export const)
  • host (string, optional): Storybook host URL (default: http://localhost:6006)
  • timeout (number, optional): Timeout in milliseconds (default: 30000)

Example:

{
  "name": "get_storybook_a11y_tree",
  "arguments": {
    "title": "Button",
    "storyName": "Default",
    "host": "http://localhost:6006",
    "timeout": 30000
  }
}

Output example:

button "Submit"
  text "Submit"

get_storybook_screenshot

Takes a screenshot of a Storybook Story.

Parameters:

  • title (string, required): Story title
    • Example: MyTest/SomeText, Button
  • storyName (string, required): Story export constant name (NOT the story object's name property)
    • Example: Default, Primary (these are the names after export const)
  • host (string, optional): Storybook host URL (default: http://localhost:6006)
  • timeout (number, optional): Timeout in milliseconds (default: 30000)

Example:

{
  "name": "get_storybook_screenshot",
  "arguments": {
    "title": "Button",
    "storyName": "Default",
    "host": "http://localhost:6006",
    "timeout": 30000
  }
}

Output:

  • Text message indicating screenshot completion
  • Base64-encoded PNG image data (full page screenshot)

get_storybook_network_requests

Tracks and captures all network requests made during Storybook Story loading.

Parameters:

  • title (string, required): Story title
    • Example: MyTest/SomeText, Button
  • storyName (string, required): Story export constant name (NOT the story object's name property)
    • Example: Default, Primary (these are the names after export const)
  • host (string, optional): Storybook host URL (default: http://localhost:6006)
  • timeout (number, optional): Timeout in milliseconds (default: 30000)

Example:

{
  "name": "get_storybook_network_requests",
  "arguments": {
    "title": "Product",
    "storyName": "Default",
    "host": "http://localhost:6006",
    "timeout": 30000
  }
}

Output:

  • Summary of network activity (total, finished, failed, loading requests)
  • Detailed list of all network requests with URLs, HTTP methods, status codes, response times, and resource types
  • Raw network data in JSON format

get_storybook_console_logs

Captures all console messages (log, info, warn, error, debug) during Storybook Story loading.

Parameters:

  • title (string, required): Story title
    • Example: MyTest/SomeText, Button
  • storyName (string, required): Story export constant name (NOT the story object's name property)
    • Example: Default, Primary (these are the names after export const)
  • host (string, optional): Storybook host URL (default: http://localhost:6006)
  • timeout (number, optional): Timeout in milliseconds (default: 30000)

Example:

{
  "name": "get_storybook_console_logs",
  "arguments": {
    "title": "Product",
    "storyName": "Default",
    "host": "http://localhost:6006",
    "timeout": 30000
  }
}

Output:

  • Summary of console activity by log level (error, warning, info, log, debug)
  • Chronological list of all console messages with timestamps and source locations
  • Raw console data in JSON format