Brandrail – make Claude Code and Cursor follow your design system
Brandrail launched an open-source MCP server that feeds design tokens and component rules directly into Claude Code, Cursor, and other AI coding tools.
By Dillip Chowdary • Nov 14, 2026 • Source: github.com
In this post
Brandrail released an open-source Model Context Protocol server and command-line checker designed to feed design system rules directly into AI coding agents, according to github.com's report. The tool provides coding assistants with an organization's Brand Kit, interface guidelines, and approved components before code generation starts, and subsequently validates the output over local standard input and output channels so the assistant can apply corrections automatically.
This report examines Brandrail's tool architecture, configuration options, local privacy model, and developer setup workflows. It is intended for software engineers, frontend architects, and development leads looking to standardize automated user interface code across Claude Code, Cursor, GitHub Copilot, OpenAI Codex, Windsurf, and the Gemini CLI without leaking proprietary source code to external servers.
01What shipped in Brandrail – make Claude Code and Cursor
Brandrail ships an MIT-licensed package containing a local MCP server, a standalone CLI checker, and a pure TypeScript rules engine without runtime dependencies. The MCP integration exposes seven read-only tools: get_guidelines, get_design_tokens, find_component, get_component_docs, get_template, get_migration_map, and validate_snippet. These interfaces allow connected assistants to retrieve framework rules, query CSS variables for colors or typography, fetch component code examples, and inspect full page templates like dashboards or sign-in views.
The engine provides component guidance and validation across React, Angular, Vue, Web Components, and raw HTML. In addition, its syntax checker evaluates code written in Svelte, CSS, PHP, Twig, Mustache, Handlebars, Nunjucks, and Liquid. When an AI agent invokes validate_snippet, Brandrail scores the code snippet against the design kit and returns concrete remediation instructions directly to the model's context window.
Execution runs entirely on the local developer machine through stdio rather than external cloud endpoints. The software functions out of the box without requiring user account registration, operating on bundled starter design tokens. Developers wishing to enforce company-specific palettes and components can connect an existing free Brandrail organization account or provide a central API authentication key.
02What improved in Brandrail – make Claude Code and Cursor
Standard AI code generation frequently produces inconsistent colors, bespoke spacing scales, and arbitrary third-party component imports across different files. Brandrail changes this workflow by introducing automated pre-generation guideline discovery alongside post-generation verification, catching unapproved styling patterns before source files are committed to a project repository.
| Metric or Feature | Unassisted AI Coding | Brandrail MCP Integration |
|---|---|---|
| Design context | Generic model defaults | 7 dedicated read-only MCP tools |
| Token consistency | Arbitrary colors and margins | Exact CSS variables from Brand Kit |
| Snippet validation | Manual developer review | Automated score and inline fixes |
| Framework coverage | Inconsistent syntax | 5 core UI stacks plus 8 template formats |
| Privacy boundary | Cloud prompt context | Local stdio processing with zero code upload |
The addition of the get_migration_map endpoint allows teams to replace legacy UI libraries progressively. The tool maps third-party elements from Material UI, Bootstrap, Ant Design, Chakra UI, and PrimeNG directly into equivalent in-house design system components, giving AI assistants precise migration targets during major interface refactors.

03What you gain from Brandrail – make Claude Code and Cursor
Engineering teams gain a unified interface consistency layer across multiple independent developer workstations and editor setups. Because Brandrail checks code inside the local runtime, proprietary source code never leaves the workstation during automated reviews. Organization API keys are restricted exclusively to communications with official Brandrail domains or local development hosts, refusing to transmit keys if pointed elsewhere.
Developers can also run the checker directly from their terminal without initiating an interactive AI model session. The command-line utility supports targeted Git diff inspections against the default branch, dynamic accessibility and styling sweeps against live web servers running in real browsers, and legacy component audits across existing codebases.
Advertisement
Tech Pulse Daily
Get tomorrow's pulse first
Join engineers who read Tech Pulse before stand-up. Free, weekday mornings.
For cloud dashboard users, repository synchronizations, GitHub App integrations, and team access governance are available through Brandrail's web platform. Upload operations sent via the CLI's reporting flags pass only compliance scores and diagnostic messages to organization dashboards, preserving code isolation.
04How to get Brandrail – make Claude Code and Cursor
Teams can configure the Brandrail integration inside any repository by executing the command-line setup wizard, which provisions editor settings automatically:
npx brandrail connectFor manual configurations or headless environments, teams can define the server inside their MCP configuration file without authenticating:
{
"mcpServers": {
"brandrail": { "command": "npx", "args": ["-y", "brandrail", "mcp"] }
}
}Cursor users can install the tool directly using the deep link protocol string cursor://anysphere.cursor-deeplink/mcp/install?name=brandrail&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsImJyYW5kcmFpbCIsIm1jcCJdfQ==. When operating inside projects with custom Brand Kits, set the environment variable:
export BRANDRAIL_KEY="your-api-key"Terminal-based validations and migrations run through the standard package runner:
npx brandrail check --changed
npx brandrail scan http://localhost:3000 --pages 3
npx brandrail migrate05What to watch after Brandrail – make Claude Code and Cursor
During setup authentication, users must manually copy the verification code displayed on the approval page back to their terminal session. Because authentication hashes are computed locally and keys are stored outside the Git repository, teams should monitor workstation credential paths and verify that generated MCP configuration files remain safely committed without credentials.
Organizations with security policies restricting external endpoints should verify that custom API routing addresses match the default host checks. The CLI explicitly checks the API target on every execution, halting key transmission if redirected from official endpoints until signed in properly.
Engineers maintaining internal forks or contributing to the rules engine can build the CLI and execute the engine test suite directly using pnpm package workflows. As projects grow, teams should watch how often agents query the get_guidelines and get_template endpoints to ensure token context limits remain balanced during extensive code generation tasks.
Brandrail – make Claude Code and Cursor FAQ
Which AI coding assistants support the Brandrail MCP integration?
Brandrail writes MCP configuration and rule files for Claude Code, Cursor, GitHub Copilot, OpenAI Codex, Windsurf, and Gemini CLI.
Does Brandrail upload private source code to external servers?
No, Brandrail runs its MCP server and CLI rules engine locally over stdio, checking code on your machine without uploading source files.
Which UI frameworks and template engines can Brandrail check?
Brandrail supports UI generation in React, Angular, Vue, Web Components, and HTML, while its checker evaluates Svelte, CSS, PHP, Twig, Mustache, Handlebars, Nunjucks, and Liquid.
Can Brandrail be used without creating an account?
Yes, Brandrail functions without an account using a set of built-in starter tokens, while custom Brand Kits require an account connection or API key.
Sources
Author
Dillip Chowdary
Writes Tech Bytes coverage of AI, engineering, and the tools that actually ship. Editor of Tech Pulse Daily.
Related on Tech Bytes
Advertisement