# Brandrail [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/brandrail-app/brandrail  
**GitHub Stars:** 3  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/brandrail

## Description
Design system guardrails for AI coding tools: tokens, components and a brand checker. Runs locally.

## Tools
Capabilities this server exposes over MCP:

- **get_guidelines** — The project's design system rules: components to use in its framework, allowed tokens, what the checker enforces. Called once before writing UI.
- **get_design_tokens** — Every colour, spacing, radius and type token with the CSS variable to use.
- **find_component** — Finds the component for a need ("date picker", "primary action") with its import, rules and an example.
- **get_component_docs** — Full docs for one component in the project's framework: import or tag, props, rules, example.
- **get_template** — A whole page (list, detail, form, settings, dashboard, sign-in) built from your components, with the files to create and the page's rules.
- **get_migration_map** — What replaces each piece of Material, MUI, Bootstrap, Ant, Chakra or PrimeNG.
- **validate_snippet** — Runs the checker on generated code and returns a brand score and each fix.

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/brandrail-app/brandrail), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Add to your MCP client:

```sh
npx brandrail connect
```

## Documentation

## What Brandrail does

Brandrail gives AI coding tools structured design-system context before they generate interface code. Its MCP server exposes seven read-only tools covering design rules, visual tokens, component selection, component documentation, page templates, library migrations, and code validation.

The server supports design-system workflows across React, Angular, Vue, Web Components, and plain HTML. Its checker can also inspect Svelte, CSS, PHP, Twig, Mustache, Handlebars, Nunjucks, and Liquid. This makes it useful for projects where UI code spans more than one framework or rendering format.

## How it works

The server runs locally through stdio, so generated code is checked on the developer's machine. Without an account, it starts with starter tokens. Connecting a free Brandrail account or supplying an API key lets it load an organisation's Brand Kit.

A typical agent workflow begins with `get_guidelines`, which returns the project's component rules, permitted tokens, and the checks that will be applied. The agent can then retrieve tokens, locate a suitable component, read its full documentation, or request a page template. After code generation, `validate_snippet` returns a brand score and individual fixes.

The same npm package also provides a command-line checker. `brandrail check --changed` checks changes against `origin/main`, `brandrail scan` checks pages in a running application through a browser, and `brandrail migrate` reports remaining usage from supported UI libraries.

## Setup and configuration

The quickest per-repository setup is:

```bash
npx brandrail connect
```

This signs in through a browser and writes MCP configuration and rule files for supported coding tools. The generated files contain no key. A manual stdio configuration can be used instead:

```json
{
  "mcpServers": {
    "brandrail": { "command": "npx", "args": ["-y", "brandrail", "mcp"] }
  }
}
```

To load an organisation's Brand Kit without running `connect`, set `BRANDRAIL_KEY` to an API key from the Brandrail dashboard. The key is sent only to `www.brandrail.com.au` or localhost. If `BRANDRAIL_API_URL` points elsewhere, the CLI reports that destination and does not send the key.

## Tools and capabilities

- `get_guidelines` returns framework component rules, allowed tokens, and checker coverage.
- `get_design_tokens` returns colour, spacing, radius, and typography tokens with their CSS variables.
- `find_component` matches a UI need to a component and provides its import, rules, and an example.
- `get_component_docs` provides a component's import or tag, props, rules, and example.
- `get_template` produces a page outline for list, detail, form, settings, dashboard, or sign-in screens.
- `get_migration_map` maps Material, MUI, Bootstrap, Ant, Chakra, and PrimeNG pieces to replacements.
- `validate_snippet` checks generated code and reports a brand score with fixes.

## Limitations and notes

Brandrail's MCP server and CLI run locally, and code is not uploaded during checking. With a key, the tools fetch the Brand Kit. Optional `--upload` and `--report` operations send scores and messages to the dashboard, but not code. The Brand Kit hosting service, repository sync, GitHub App, and team features are separate from the local package.

The project is licensed under MIT. The repository includes the CLI, MCP server, and checker engine, and can be built with pnpm after installing dependencies.

_Full upstream README: https://allmcps.com/mcp/brandrail/readme_

