Skip to main content
Glama

aurum-mcp

从你的 LLM 客户端与 Aurum 设计系统 对话。 组件 · Token · 图标 · Figma 节点 ID · 更新日志 — 全部可从 Claude Code、Cursor、Copilot CLI、Gemini 和 Claude Desktop 查询。

aurum-mcp 是一个 Model Context Protocol 服务器,它将 Aurum 设计系统目录呈现给 LLM。它读取一个捆绑的 JSON 清单(从 changejarapp.github.io/aurum-android 自动同步),并公开 9 个工具,LLM 可以调用这些工具来回答如下问题:

  • “展示如何使用 AurumChip。”

  • “我们有什么用于负面反馈文本的颜色 Token?”

  • “AurumTopAppBar 的 Figma 节点是什么?”

  • “给我找一个返回箭头的图标。”

  • “最近一次发布有什么变化?”


安装(一次粘贴,适用于所有客户端)

在下方选择你的客户端,将代码片段粘贴到对应的配置文件中,然后重启客户端。

Claude Code(项目根目录下的 .mcp.json,或 ~/.claude.json)

{
  "mcpServers": {
    "aurum": {
      "command": "npx",
      "args": ["-y", "github:atri-jar/aurum-mcp#latest-stable"]
    }
  }
}

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "aurum": {
      "command": "npx",
      "args": ["-y", "github:atri-jar/aurum-mcp#latest-stable"]
    }
  }
}

Copilot CLI (~/.copilot/mcp.json)

{
  "mcpServers": {
    "aurum": {
      "command": "npx",
      "args": ["-y", "github:atri-jar/aurum-mcp#latest-stable"]
    }
  }
}

Gemini CLI (~/.gemini/settings.json 中的 mcpServers 下)

{
  "mcpServers": {
    "aurum": {
      "command": "npx",
      "args": ["-y", "github:atri-jar/aurum-mcp#latest-stable"]
    }
  }
}

Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json)

结构相同 — 将上述片段放入 mcpServers 中。重启应用即可。

就是这样。无需 npm 注册表,无需 ~/.npmrc,无需 PAT,无需环境变量。 公开 Git,公开 npx。


Related MCP server: GDS MCP

版本控制

默认片段使用 #latest-stable — 这是一个由 CI 管理的 Git 标签,始终指向最新的稳定版本。其行为类似于 npm 的 @latest 发行标签:你在每次 npx 缓存失效时都会获得自动更新(取决于你的客户端缓存,大约 10 分钟到几小时不等)。

为了可复现性(自动化脚本、审计设置),请锁定到明确的标签:

"args": ["-y", "github:atri-jar/aurum-mcp#v0.1.0"]

aurum-mcp 的每个版本都附带了来自对应 Aurum 库版本的清单(@aurum-mcp:0.1.6 ⇄ aurum:0.1.6)。从你的 LLM 客户端调用 get_aurum_version 以查看你当前连接的具体版本。


工具

工具

用途

list_components

枚举所有 Aurum 组件,按系列分组

get_component

完整组件规范 — KDoc、签名、参数、Figma 深层链接

list_tokens

Token 表:颜色(语义 + 视觉)、间距、圆角、边框宽度、图标大小、海拔、排版

search_icons

通过名称片段或类别查找图标

get_icon

单个图标:可绘制对象、Compose 路径、线框+填充 Figma 深层链接

get_changelog

以 Markdown 格式获取各版本更新日志 — 默认为 [Unreleased]

lookup_figma_node

反向查找:Figma 节点 ID / URL → 匹配的 Aurum 组件和图标

search

在所有内容中进行全文搜索,并提供后续工具建议

get_aurum_version

清单来源:版本、SHA、生成时间戳

请参阅 docs/tools.md 获取完整的输入模式和示例响应。


为什么选择 npx-from-Git 而不是 npm?

我们考虑了三种分发渠道(公共 npm、GitHub Packages、npx-from-Git),并选择了第三种,因为对于一个优化了简洁性、完全所有权和零新基础设施的团队内部工具而言:

  • 无需管理新账户。 无需 npm 组织,无需轮换 NPM_TOKEN,无需 2FA 恢复,无需担心 72 小时发布持久性。仓库本身就是制品,端到端。

  • 免费的基于分支的测试。 想尝试一个功能分支?只需将片段更改为 #feat/branch-name 即可。使用 npm,你必须发布一个预发布标签,它将永远存在于注册表中。

  • 用户已有的身份验证。 该仓库是公开的;团队成员拥有 GitHub 访问权限;无需配置任何新内容。

  • 微小的安装延迟。 首次启动大约需要 5–10 秒的克隆 + 构建,而 npm 大约需要 2–5 秒。缓存后的启动速度相同。

我们接受的权衡:版本锁定体验较不完善(Git 标签 vs. semver 范围),且没有公共 npm 的可发现性。完整的理由在 docs/architecture.md 中。


本地开发

git clone https://github.com/atri-jar/aurum-mcp.git
cd aurum-mcp
pnpm install
pnpm dev          # run the server via tsx + stdio
pnpm inspect      # spawn the official MCP Inspector UI
pnpm build        # tsc → dist/
pnpm smoke        # end-to-end tools/list + tools/call test

服务器读取 data/manifest.json(已提交)。要从实时 Aurum 画廊拉取最新清单并更新捆绑副本:

make manifest-fetch

CI 会自动执行此操作(请参阅 .github/workflows/sync-manifest.yml)。


架构概述

Aurum 设计系统位于 Changejarapp/aurum-android(私有),并在 changejarapp.github.io/aurum-android 发布了一个公共画廊。其 tooling/gallery/generate.py 脚本从一组解析器中聚合组件、Token、图标、Code Connect 映射和更新日志。我们添加了一个 --emit-manifest 标志,用于生成相同数据的结构化 JSON 投影 — 契约是 aurum-android 中的 tooling/manifest/schema.json。此 MCP 服务器是该 JSON 的读取端:它在启动时加载清单、建立索引并提供上述 9 个工具。单一事实来源,两个渲染目标(面向人类的 HTML,面向代理的 JSON)。当 aurum-ios 发布时,其清单将作为同级源插入 — MCP 代码与平台无关。

完整流水线图:docs/architecture.md。


贡献

欢迎提交 Issue 和 PR。请参阅 docs/contributing.md 了解工作流程(清单同步、漂移检查、发布流程)。代码风格:TypeScript 严格模式,Prettier 默认设置;Markdown 格式化程序中不包含业务逻辑。

许可证

MIT — 请参阅 LICENSE。

Available Tools

9 tools
get_aurum_versionA

Return the Aurum library version, manifest SHA, generation timestamp, and platform coverage. Use this to verify which Aurum snapshot you are reasoning about before answering version-specific questions.

Inputs: no named parameters.

get_changelogA

Return one or more Aurum changelog entries as markdown. Default returns the [Unreleased] section. Pass a specific version (e.g. 0.1.5) for that release, or all for the full history.

Inputs: version.

get_componentA

Fetch the full details of a single Aurum component by name: KDoc, Compose signature, every parameter (with types, defaults, and per-param docs), preview function names, Figma deeplink, Code Connect path, and gallery URL. Use after list_components or search to get the canonical snippet for a component.

Inputs: name (required), platform.

get_iconA

Fetch full details for a single Aurum icon by name: drawable resource paths, Compose path (AurumIcons.<Category>.<Name>), paired line/fill Figma node IDs, and deeplinks. Pass weight to focus on one variant.

Inputs: name (required), weight.

list_componentsA

List every Aurum component in the current manifest, with one-line descriptions and family grouping. Optionally filter to a specific platform (android, ios, or all). Use this as a starting point for navigation; follow up with get_component for full details.

Inputs: platform.

list_tokensA

List Aurum design tokens by category: color (semantic + visual palette), spacing, radius, borderWidth, iconSize, elevation, typography. Omit category to get a summary of all categories with counts. Pass a category for the full table.

Inputs: category.

lookup_figma_nodeB

Reverse-lookup: given a Figma node ID (5126:2507 or 5126-2507) or a full Figma URL, return the matching Aurum components, Code Connect mappings, or icons. Designed for the designer workflow: 'I'm looking at this Figma node, what code is it?'.

Inputs: nodeIdOrUrl (required).

search_iconsA

Search Aurum's icon catalog by name fragment or category. Returns matching icons with their drawable resource names, paired line/fill Figma node IDs, and deeplinks. Use this when a designer or engineer is looking for the right icon to use.

Inputs: query (required), category.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 9 tools

    Disambiguation5/5

    Each tool targets a distinct resource or action: version, changelog, component details, icon details, components listing, tokens listing, Figma lookup, general search, and icon search. No overlap in purposes.

    Naming Consistency5/5

    All tools use consistent snake_case with clear verb-noun patterns (get_, list_, search, lookup_). The naming logically distinguishes operations like retrieving single items (get_component) vs listing all (list_components).

    Tool Count5/5

    With 9 tools, the server is well-scoped for a design system reference library. Each tool covers a necessary aspect (components, icons, tokens, changelog, version, Figma integration, and search) without excess.

    Completeness4/5

    The tool set covers the core read operations for components, icons, tokens, changelog, and Figma lookup. A minor gap is the lack of a dedicated 'list all icons' tool (only search_icons is available, requiring a query), but the overall surface is thorough.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers