MCP server

Help AI agents use Primer Brand correctly with our Model Context Protocol server.

The Primer Brand MCP server (@primer/brand-mcp) helps AI agents understand and use Primer Brand (@primer/react-brand) correctly.

It is a version-aware, local (stdio) server that reads the docs and metadata of your installed @primer/react-brand dependency.

The MCP server requires Node.js 24 or later.

What it provides

The server exposes a set of tools that AI agents can call:

ToolWhat it does
primer_brand_setupConfigures Primer Brand first-time. Includes ThemeProvider, Mona Sans and RSC-directive configuration among other things
primer_brand_page_designPage-design conventions (header/footer, hero media, gridline aesthetic, card grids, labels) and the current-brand reference templates to start from.
primer_brand_componentGet a component API information like props, allowed values and named sub-components.
primer_brand_examplesReference examples taken from our Storybook.
primer_brand_tokensResolve design tokens by intent (color, space, typography) to CSS variables and values.
primer_brand_assetFind Octicons (@primer/octicons-react) and Octovisuals (@primer/octovisuals-react) more easily
primer_brand_docsSearch and read Primer Brand guidance, including principles, accessibility and getting started.
primer_brand_reviewCheck generated JSX and CSS against the design system for unknown components, invalid props, hardcoded values

Set up in VS Code

Add the server to your workspace’s .vscode/mcp.json (or your user mcp.json):

{ "servers": { "Primer Brand": { "type": "stdio", "command": "npx", "args": ["@primer/brand-mcp@latest"] } } }

Set up in other clients

For GitHub Copilot CLI and other stdio-enabled MCP clients, run the server directly:

npx @primer/brand-mcp@latest

Refer to the package README for the latest configuration details.