Back to Storybook

MCP server API

docs/ai/mcp/api.mdx

10.3.61.8 KB
Original Source
<Callout variant="info" icon="🧪"> While they are in [preview](../../releases/features.mdx#preview), Storybook's AI capabilities (specifically, the [manifests](../manifests.mdx) and MCP server) are currently only supported for [React](?renderer=react) projects.

Additionally, the API may change in future releases. We welcome feedback and contributions to help improve this feature. </Callout>

<If renderer={['react']}>

@storybook/addon-mcp options

The MCP server addon accepts the following options to configure the tools provided by the MCP server. You can provide these options when registering the addon in your main.js|ts file:

<CodeSnippets path="addon-mcp-options.md" />

toolsets

Type:

ts
{
  dev?: boolean;
  docs?: boolean;
  test?: boolean;
}

Default:

ts
{
  dev: true,
  docs: true,
  test: true,
}

Configuration object to toggle which toolsets are enabled in the MCP server. By default, all toolsets are enabled.

dev

Type: boolean

Default: true

The development toolset includes the get-storybook-story-instructions and preview-stories tools.

docs

Type: boolean

Default: true

The docs toolset includes the get-documentation, get-documentation-for-story, and list-all-documentation tools.

test

Type: boolean

Default: true

The testing toolset includes the run-story-tests tool.

</If>

More AI resources