> **Version 10.4 (beta)** — **React** / **TypeScript**
> Also available:
- `?language=js` for JavaScript
- `?codeOnly=true` for code snippets only
- other versions: Version 10.3 (latest) (`/docs/ai/mcp/api.md`), Version 9 (`/docs/9/ai/mcp/api.md`), Version 8 (`/docs/8/ai/mcp/api.md`)

# MCP server API

While they are in [preview](https://storybook.js.org/docs/10.4/releases/features.md#preview), Storybook's AI capabilities (specifically, the [manifests](https://storybook.js.org/docs/10.4/ai/manifests.md) and MCP server) are currently only supported for [React](https://storybook.js.org/docs/10.4/ai/mcp/?renderer=react.md) projects.

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

## `@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:

```ts
// .storybook/main.ts — CSF 3
// Replace your-framework with the framework you are using (e.g., react-vite, vue3-vite, angular, etc.)

const config: StorybookConfig = {
  framework: '@storybook/your-framework',
  stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
  addons: [
    // ... your existing addons
    {
      name: '@storybook/addon-mcp',
      options: {
        toolsets: {
          dev: false,
        },
      },
    },
  ],
};

export default config;
```

```ts
// .storybook/main.ts — CSF Next 🧪
// Replace your-framework with the framework you are using (e.g., react-vite, nextjs, nextjs-vite)

export default defineMain({
  framework: '@storybook/your-framework',
  stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
  addons: [
    // ... your existing addons
    {
      name: '@storybook/addon-mcp',
      options: {
        toolsets: {
          dev: false,
        },
      },
    },
  ],
});
```

### `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`](https://storybook.js.org/docs/10.4/ai/mcp/overview.md#get-storybook-story-instructions) and [`preview-stories`](https://storybook.js.org/docs/10.4/ai/mcp/overview.md#preview-stories) tools.

#### `docs`

Type: `boolean`

Default: `true`

The docs toolset includes the [`get-documentation`](https://storybook.js.org/docs/10.4/ai/mcp/overview.md#get-documentation), [`get-documentation-for-story`](https://storybook.js.org/docs/10.4/ai/mcp/overview.md#get-documentation-for-story), and [`list-all-documentation`](https://storybook.js.org/docs/10.4/ai/mcp/overview.md#list-all-documentation) tools.

#### `test`

Type: `boolean`

Default: `true`

The testing toolset includes the [`run-story-tests`](https://storybook.js.org/docs/10.4/ai/mcp/overview.md#run-story-tests) tool.

**More AI resources**

- [Agentic setup](https://storybook.js.org/docs/10.4/ai/setup.md)
- [MCP server overview](https://storybook.js.org/docs/10.4/ai/mcp/overview.md)
- [Sharing your MCP server](https://storybook.js.org/docs/10.4/ai/mcp/sharing.md)
- [Best practices for using Storybook with AI](https://storybook.js.org/docs/10.4/ai/best-practices.md)
- [Manifests](https://storybook.js.org/docs/10.4/ai/manifests.md)