From a43690d29bacbd3d2202f938b3652761dd0e88c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kayla=20=E3=81=AF=E3=81=AA?= Date: Thu, 14 May 2026 12:40:23 -0600 Subject: [PATCH] chore: add storybook to .mcp.json (#25352) --- .mcp.json | 74 ++++++++++++++++++++++++++------------------------ site/AGENTS.md | 13 +++++++++ 2 files changed, 52 insertions(+), 35 deletions(-) diff --git a/.mcp.json b/.mcp.json index 3f3734e4fe..021da5e8a4 100644 --- a/.mcp.json +++ b/.mcp.json @@ -1,36 +1,40 @@ { - "mcpServers": { - "go-language-server": { - "type": "stdio", - "command": "go", - "args": [ - "run", - "github.com/isaacphi/mcp-language-server@latest", - "-workspace", - "./", - "-lsp", - "go", - "--", - "run", - "golang.org/x/tools/gopls@latest" - ], - "env": {} - }, - "typescript-language-server": { - "type": "stdio", - "command": "go", - "args": [ - "run", - "github.com/isaacphi/mcp-language-server@latest", - "-workspace", - "./site/", - "-lsp", - "pnpx", - "--", - "typescript-language-server", - "--stdio" - ], - "env": {} - } - } -} \ No newline at end of file + "mcpServers": { + "go-language-server": { + "type": "stdio", + "command": "go", + "args": [ + "run", + "github.com/isaacphi/mcp-language-server@latest", + "-workspace", + "./", + "-lsp", + "go", + "--", + "run", + "golang.org/x/tools/gopls@latest" + ], + "env": {} + }, + "typescript-language-server": { + "type": "stdio", + "command": "go", + "args": [ + "run", + "github.com/isaacphi/mcp-language-server@latest", + "-workspace", + "./site/", + "-lsp", + "pnpx", + "--", + "typescript-language-server", + "--stdio" + ], + "env": {} + }, + "storybook": { + "type": "http", + "url": "http://localhost:6006/mcp" + } + } +} diff --git a/site/AGENTS.md b/site/AGENTS.md index 4d39493e52..d89d2959c6 100644 --- a/site/AGENTS.md +++ b/site/AGENTS.md @@ -26,6 +26,19 @@ When investigating or editing TypeScript/React code, always use the TypeScript l - `pnpm playwright:test` - Run playwright e2e tests. When running e2e tests, remind the user that a license is required to run all the tests - `pnpm format` - Format frontend code. Always run before creating a PR +## Storybook MCP + +The `.mcp.json` at the repo root includes a Storybook MCP server +(`http://localhost:6006/mcp`). It provides tools for searching components, +reading stories, and capturing screenshots directly from Storybook. + +Because it is an HTTP-type MCP server, Storybook must already be running +before the MCP client can connect. Start it first: + +```sh +pnpm storybook --no-open +``` + ## Failure artifacts Playwright writes per-test failure artifacts to `site/test-results/` when