design-system-mcp: Add new package for design system MCP tooling#77159
Draft
design-system-mcp: Add new package for design system MCP tooling#77159
Conversation
|
Size Change: 0 B Total Size: 7.74 MB ℹ️ View Unchanged
|
|
Flaky tests detected in 3fa948b. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/24157043789
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Closes #77206
Implements a new package
@wordpress/design-system-mcpwhich serves as a local MCP server, providing a bridge between AI agents and the WordPress design system implementation.Related: #74626
Draft, pending:
Creating and linking related issue(edit: Design System: Provide MCP server tooling for design system resources #77206)Why?
Agents are a common part of many developer's workflow, but often struggle to achieve the consistency we hope to see with a design system in recommending guidance and offerings (components, tokens). The goal of this new package is to provide a simple setup experience for someone already using AI agents in development to make those guidance and offerings more readily available, while neither increasing our own maintenance burden nor favoring one documentation vehicle over another (see "How" below).
How?
This leverages existing resources that can be reliably assured as up-to-date:
It's implemented as a npm Node binary, which works well with
mcp.jsonconfiguration. This also avoids the need for external MCP server hosting. This is a common setup experience for other projects offering MCP (e.g. Chakra UI).I had explored an alternative approach leveraging WordPress Abilities API + mcp-adapter which, while an interesting example of "dog-fooding", may not be a great fit:
Testing Instructions
The ideal workflow (i.e. referencing the published npm package) is only possible to test once this is merged and published.
In the meantime, you can test a couple ways:
npm run buildto build filesnpx @modelcontextprotocol/inspector node packages/design-system-mcp/build-module/index.mjsget_components,get_component_details,get_design_tokensmcp.json, pointing to the local built file:claude mcp add wordpress-design-system -- node /path/to/gutenberg/packages/design-system-mcp/build-module/index.mjsScreenshots or screencast
MCP Inspector example:
Claude Code example:
Use of AI Tools
Claude Code + Claude Opus 4.6, plus a fair bit of back-and-forth and post-processing manual edits. Used for both research of approach and package implementation.