design-system-mcp: Include component status notes in details response#78475
design-system-mcp: Include component status notes in details response#78475aduth wants to merge 2 commits into
Conversation
|
Size Change: 0 B Total Size: 7.98 MB ℹ️ View Unchanged
|
|
Flaky tests detected in 80ba805. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/26179161391
|
| ? REGISTRY[ packageName ]?.[ componentName ] | ||
| : undefined; | ||
|
|
||
| next[ id ] = status?.notes ? { ...entry, notes: status.notes } : entry; |
There was a problem hiding this comment.
This only includes the notes rather than the full status object. That should be okay based on what we're doing now because the manifest already only contains status: 'recommended' + whereUsed: 'global' components, but I've mentioned before that it could be useful for the MCP server to surface some of our "use-with-caution" components depending on the situation. So maybe it'd be more future-proof to pass through the whole object, or at least status + notes. Then again, it could be perfectly fine to add status as a sibling property, rather than maintain the componentStatus object wrapper.
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
What?
Builds upon: #78472
Why?
Component status notes are important context for understanding how a component's usage might change over time. This is already surfaced through the Storybook interface. By making it available through the MCP server, AI agents will have additional context to understand and recommend components accurately, and would be expected to relay relevant details to the user.
How?
experimental_manifeststo merge the component status notes into the manifest entry.Testing Instructions
The tricky part here is that the MCP server uses the hosted URL by default, and because the notes will not be present until after these changes are merged, you need to configure the MCP to use a local running server copy.
To serve a local manifest:
npm run storybook:buildcd storybook/build && python3 -m http.server 8000Testing with MCP Inspector:
npm run buildnpx @modelcontextprotocol/inspector node packages/design-system-mcp/bin/design-system-mcp.mjsCOMPONENTS_MANIFEST_URLwith a value pointing to the manifest on the local server you started above, e.g. http://localhost:8000/manifests/components.json"Button"(with quotes) in "name" textarea fieldTesting with a real AI agent:
npm run buildmcp.json, edit thecommandto"node"and theargsto["path/to/gutenberg/packages/design-system-mcp/bin/design-system-mcp.mjs"](replacepath/to/gutenbergwith absolute path to your Gutenberg directory). Afterargs, configure andenvlike such"env": {"COMPONENTS_MANIFEST_URL": "http://localhost:8000/gutenberg/manifests/components.json"}pointing to the local serverScreenshots or screencast
MCP Inspector
Claude Desktop
Use of AI Tools
Planned and implemented with Cursor + Claude Opus 4.7. Reviewed manually and iterated on code comments and response formatting accordingly.