Brandrail

au.com.brandrail由 brandrail.com.au 发布v0.10.1更新于 Nov 7, 2026

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

已验证STDIO仅桌面开发者工具媒体与设计

概览

AI 生成的概览

本地 MCP 服务器,为 AI 编程工具提供设计系统规则、令牌与组件,并检查生成的 UI 代码是否符合规范。

可以做什么
  • 读取项目的设计系统规则,以及颜色、间距、圆角、字体等令牌及其 CSS 变量
  • 按需求或名称查找组件,返回导入方式、属性、规则和示例
  • 获取由你的组件搭建的整页模板(列表、详情、表单、设置、仪表盘、登录)
  • 获取迁移对照表,了解 Material、MUI、Bootstrap、Ant、Chakra、PrimeNG 各部分应替换为什么
  • 校验生成的代码片段,返回品牌评分和逐项修复建议
适用场景
适合在遵循 Brandrail 品牌套件或既定设计系统的仓库中让助手编写前端界面,使生成的标记使用已批准的组件和令牌而非随意样式。也适用于从第三方 UI 库迁移的场景。
运行要求
以 stdio 在本地运行,通常通过 npx brandrail mcp 启动,需要 Node.js 和 npm。无需账号即可使用入门令牌;可选环境变量 BRANDRAIL_KEY(或 connect 命令保存的登录状态)用于加载组织的品牌套件。仅支持桌面端。
安装前请注意
可选的 BRANDRAIL_KEY 是密钥;connect 流程会把 API 密钥保存在本地凭据文件中,仅将其哈希发送给 Brandrail。代码在本地检查、不会上传,但 report 选项会发送评分,CLI 的 upload 标志会把结果发送到仪表盘。scan 命令会驱动真实浏览器,并可为登录后的页面使用已保存的认证状态文件。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Brandrail,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

brandrail

Keep AI-generated UI on-brand. brandrail checks code and live pages against your design system (Brand Kit), and writes your rules into the files AI coding tools read.

bash
npx brandrail init            # brandrail.config.json, src/brandrail.tokens.css + AGENTS.md, CLAUDE.md, Cursor/Copilot/Windsurf/Gemini rulesnpx brandrail check           # violations + brand score for this reponpx brandrail scan <url>      # check a running page in a real browser

With a Brandrail account

bash
npx brandrail connect                     # sign in through the browser; sets up the Brand Kit, AI rule files,                                          # the MCP server for Claude Code / Cursor / Copilot, and the UI kitnpx brandrail check --changed --upload    # only changed lines, results in the dashboard

connect makes an API key on your machine and saves it in ~/.config/brandrail/credentials.json (mode 600); Brandrail only ever receives its hash, and the files it writes into the repo hold no key. AI tools start npx brandrail mcp, which checks code on your machine: code is never uploaded. In CI, set BRANDRAIL_KEY instead.

MCP server

brandrail mcp is an MCP server for Claude Code, Cursor, Copilot, Codex, Windsurf and any other MCP client. It runs on your machine over stdio; code is checked locally and never uploaded. It works without an account, using starter tokens; connect an account (or set BRANDRAIL_KEY) to use your own Brand Kit.

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

npx brandrail connect writes this config for you, plus the rule files each AI tool reads.

ToolWhat it does
get_guidelinesThe project's design system rules: components to use in its framework, allowed tokens, what the checker enforces. Called once before writing UI.
get_design_tokensEvery colour, spacing, radius and type token with the CSS variable to use.
find_componentFinds the component for a need ("date picker", "primary action") with its import, rules and an example.
get_component_docsFull docs for one component in the project's framework: import or tag, props, rules, example.
get_templateA 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_mapWhat replaces each piece of Material, MUI, Bootstrap, Ant, Chakra or PrimeNG.
validate_snippetRuns the checker on generated code and returns a brand score and each fix.

All tools are read-only. Docs: https://www.brandrail.com.au/docs/connect

Commands

Command
check [paths]--format pretty|json|markdown|github, --fail-below 80, --changed [base], --upload
scan <url>--pages 3, --storage-state auth.json (pages behind a login), --wait 2000, --upload. Needs npm i -D playwright && npx playwright install chromium
init--from-api, --mcp, --tokens-css <file>, --no-rules, --force. Writes the Brand Kit as CSS variables; import that file once at your app entry
import <tokens.json>DTCG, Tokens Studio or Figma variables JSON into the config. --replace, --primitives
rulesList the rules
connect--no-browser, --no-install, --remote (hosted MCP server), --framework, --force (sign in again)
mcpThe MCP server over stdio, for AI tools. --framework, --report (send scores, never code)
migrate [paths]What's left on the way to the design system: other UI libraries (Material, MUI, Bootstrap, Ant Design, Chakra, PrimeNG) per library and per file. --json, --top 30, --upload
reportA shareable HTML handover report (paths and counts, never code). --out file.html
whoami, logoutShow or remove the saved sign-in

Nothing is uploaded unless you pass --upload, and code snippets are never uploaded.

Licence

MIT. The Brandrail web app and dashboard are a separate, paid service: https://www.brandrail.com.au/pricing

来源:packages/cli/README.md,提交 e498958

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.10.1最新Nov 7, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分