Skip to content

Makes it available even in versions below 9.12.0#19

Closed
penicillin0 wants to merge 3 commits into
storybookjs:mainfrom
penicillin0:fix/fallback-logger-debug-for-under-v-9-11
Closed

Makes it available even in versions below 9.12.0#19
penicillin0 wants to merge 3 commits into
storybookjs:mainfrom
penicillin0:fix/fallback-logger-debug-for-under-v-9-11

Conversation

@penicillin0
Copy link
Copy Markdown

@penicillin0 penicillin0 commented Oct 8, 2025

Related Issue

close: #14

Background

This mcp was unavailable in certain versions. (See the Related Issue for details.)
from this PR( storybookjs/storybook#31557 )
Upon my investigation, I discovered that storybook's v9.12.0 and later versions had added several methods to the logger, including debug.
This caused issues for users still using versions below 9.12.0, as the functionality did not work properly.

What to do

To resolve this, I created a wrapper function that evaluates logger.debug at runtime and falls back to logger.info if the method is not available.
I then modified all instances of logger.debug to use this wrapper function instead.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Oct 8, 2025

🦋 Changeset detected

Latest commit: 2f0216c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@storybook/addon-mcp Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@JReinhold
Copy link
Copy Markdown
Contributor

thank you for this! this was originally the direction we wanted to go with, but instead we've opted to drop support for v8 entirely, and soon also require v10.1 as we want to depend on upcoming features in Storybook core. Therefore I'm closing.

@JReinhold JReinhold closed this Oct 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Storybook instance crashes when MCP server attempts to connect

2 participants