brand-mcp
v0.82.0MCP (Model Context Protocol) server that helps AI agents use Primer Brand (@primer/react-brand) correctly when building GitHub marketing and landing pages.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
primer_brand_setup Set up Primer Brand in a project
Set up Primer Brand in an existing React project. Call once before building a page; detects or accepts the framework and returns tailored root setup. Also updates `AGENTS.md` in the package that declares `@primer/react-brand` so future agents use Primer Brand tools and local docs.
| Parameter | Type | Description |
|---|---|---|
framework | string | Target framework. "auto" detects it from the project; override if detection is wrong. |
projectDir | string | Workspace-relative package folder whose package.json declares @primer/react-brand. Set this when several workspace packages declare it. |
primer_brand_page_design Page design patterns
Read before building a Primer Brand marketing or landing page. Returns page-level composition guidance and current-brand reference templates for combining components. Use `primer_brand_docs` or `primer_brand_component` for individual component APIs. These visual conventions are not fully enforced by `primer_brand_review`.
primer_brand_component Primer Brand component reference
Primer Brand (@primer/react-brand) component reference for GitHub marketing and landing pages. Omit `name` to list every approved component. Pass a `name` for its import, sub-components, props with allowed values, and a canonical example. The example is a real story snippet, so it may include Storybook `{...args}` spreads or imported demo assets to adapt rather than copy verbatim. Use this to avoid invented components or props. This is Primer Brand, not @primer/react product UI.
| Parameter | Type | Description |
|---|---|---|
name | string | Component name to look up (e.g. "Hero"). Omit to list every available component. |
primer_brand_examples Primer Brand usage examples
Get ranked, tested Primer Brand examples for a component or page goal. Use when you need a starting composition; page goals can include a current-brand full-page reference. Use `primer_brand_component` for exact component APIs.
| Parameter | Type | Description |
|---|---|---|
goal | string | What you are building, e.g. "education landing page" or "pricing section". Omit for a foundational starter set. |
primer_brand_tokens Primer Brand design tokens
Resolve Primer Brand design tokens to CSS variables and values, searching by intent. Use these CSS variables instead of hardcoded hex/px so pages adapt across light and dark themes.
| Parameter | Type | Description |
|---|---|---|
group | string | Filter by token category, matched against token names: e.g. "color", "canvas", "size", "spacing", "border", "radius", "font". Combine with query to narrow. |
limit | integer | Max results. |
query | string | What you need, e.g. "accent background", "danger text", "spacing", "border width", "border radius". Color words map to brand roles (red->danger, green->success, gray->neutral, background->canvas); spa… |
primer_brand_asset Primer Brand icons & illustrations
Find approved Primer Brand visuals as code imports: Octicons (@primer/octicons-react) and Octovisuals (@primer/octovisuals-react). Use these instead of emoji, clip art, or random icon sets - mismatched or emoji icons are off-brand.
| Parameter | Type | Description |
|---|---|---|
query * | string | What you are looking for, e.g. "arrow", "shield", "rocket", "logo". |
kind | string | Restrict to Octicons ("icon") or Octovisuals ("illustration"). |
limit | integer | Max results. |
primer_brand_docs Primer Brand guidance
Search and read Primer Brand guidance — principles, accessibility, content, and getting started. Prefers the version-pinned docs bundled with the installed @primer/react-brand, falling back to the live site (https://primer.style/brand) for general guidance. This is brand concepts and how-to, not component APIs (use primer_brand_component for those).
| Parameter | Type | Description |
|---|---|---|
path | string | Read a specific doc by its path (from a previous search result). |
query | string | Search guidance, e.g. "accessibility", "color usage", "getting started". |
primer_brand_review Review code against Primer Brand
The final on-brand gate for Primer Brand implementations. Run it after implementation on the complete JSX/TSX and CSS output to catch component, token, and visual-pattern issues. Flags non-compliant components or sub-components, invalid prop values, etc. Fix all reported findings before finishing.
| Parameter | Type | Description |
|---|---|---|
code * | string | Your COMPLETE output to check: the JSX/TSX AND all CSS/stylesheets together. Include App.css and any *.module.css — hardcoded px/hex usually live there. |
filename | string | Optional filename, used only to label the report. |