@adobe/design-data-agent-mcp

中文文档
1.15.15发布于 2026/11/10Apache-2.0ES Module构建来源已验证近 30 天下载 1716

MCP server and Claude Code skill for the design-data agent surface — read tools run in-process via wasm

原始使用文档
文档目录13 节
  1. Testing guideline content
  2. Install
  3. Claude Code (skill + optional MCP)
  4. Cursor (skill)
  5. npm (MCP server)
  6. Staying current
  7. MCP server
  8. Environment variables
  9. Example (Cursor .cursor/mcp.json )
  10. Example (Claude Desktop claude_desktop_config.json )
  11. Tools exposed
  12. Skill
  13. License

@adobe/design-data-agent-mcp

MCP server and Claude Code skill for the Spectrum Design Data agent surface. Read tools (primer, resolve_token, query_tokens, suggest_token, describe_component, describe_guideline, list_guidelines) run fully in-process via @adobe/design-data-wasm — no CLI binary required for those. suggest_token uses the wasm suggest API directly; authoring_session_step_intent still invokes the native binary for session-state-aware ranking within an authoring flow.

Testing guideline content

Run moon run design-data-agent-mcp:test. For the packaged content contracts only, after moon run sdk-wasm:build, run:

pnpm --filter @adobe/design-data-agent-mcp exec ava test/packaged-guidelines.test.js

The suite uses pnpm pack to test the agent's publishable files, extracts the tarball into a fresh private tree, and vendors local runtime dependencies using the MCPB packaging allowlists. It initializes the packed server over stdio with no data overrides, checks the catalog against the canonical manifest, compares every guideline response to source JSON, and checks invalid-slug errors. An import guard rejects ESM imports and CommonJS requires outside the private tree.

Dependencies come from the local build, not registry tarballs, so this is not a registry-install test. It does not assess model answer quality. The tests remove private staging trees afterward.

Install

Claude Code (skill + optional MCP)

Add the Spectrum Design Data marketplace, then install the spec-generic skill:

/plugin marketplace add adobe/spectrum-design-data
/plugin install design-data-agent@spectrum-design-data

For Spectrum tokens with zero setup (embedded snapshot), install design-data@spectrum-design-data instead — see tools/design-data-skill/.

Cursor (skill)

Cursor Settings → Rules → Add Rule → Remote Rule (GitHub) → paste:

https://github.com/adobe/spectrum-design-data/tree/main/tools/design-data-agent-mcp/skills/design-data

npm (MCP server)

npx @adobe/design-data-agent-mcp@latest

The design-data CLI binary (0.13.0 or newer) is needed for authoring_session_step_intent and whenever DESIGN_DATA_CONFIG is set, because the platform cascade runs design-data catalog export. All other tools run in-process. Install it with Homebrew:

brew tap adobe/spectrum-design-data https://github.com/adobe/spectrum-design-data
brew install adobe/spectrum-design-data/design-data

Set DESIGN_DATA_BIN if the binary is not on PATH.

Staying current

The embedded Spectrum snapshot is baked into the wasm at build time and travels with the package version — there's no separate data update to run. Pin @latest (as above) so npx fetches the newest published version rather than reusing whatever it last cached; -y alone only skips the install confirmation, it doesn't force a re-fetch. Already on /plugin? Run /plugin update design-data-agent@spectrum-design-data. Call the primer tool and check provenance.designDataVersion to see which dataset version is embedded. The primer tool also does a best-effort check against the latest published @adobe/spectrum-design-data version — if the embedded dataset is behind, it adds a provenance.datasetStatus field and logs a one-line warning to stderr. This is silent on any network failure (offline/air-gapped use is unaffected); set DESIGN_DATA_SKIP_VERSION_CHECK=1 to disable the check entirely.

MCP server

Configure your MCP client to run:

npx -y @adobe/design-data-agent-mcp@latest

Or from a repo clone:

node tools/design-data-agent-mcp/src/index.js

Environment variables

VariableDefaultDescription
DESIGN_DATA_BINdesign-dataPath to the design-data binary (authoring only)
DESIGN_DATA_ROOT—Absolute root that relative paths are anchored to
DESIGN_DATA_PATH.Dataset root path
DESIGN_DATA_COMPONENTS—Override components directory
DESIGN_DATA_GUIDELINES—Override guidelines directory
DESIGN_DATA_FIELDS—Override fields directory
DESIGN_DATA_SCHEMAS—Override schema path (for validate)
DESIGN_DATA_EXCEPTIONS—Override exceptions path (for validate)
DESIGN_DATA_CONFIG—Path to a .design-data.toml (or its directory) to resolve a platform cascade
DESIGN_DATA_PLATFORM—Select a named [platforms.<id>] entry (needs DESIGN_DATA_CONFIG)

Platform cascade. If DESIGN_DATA_CONFIG is set, the server shells out to the design-data CLI once at startup (design-data query --filter "" --format json, run from the config's directory) to resolve its .design-data.toml source (path/npm/github/git) and either its top-level manifest cascade or, if DESIGN_DATA_PLATFORM is also set, that named [platforms.<id>] entry's manifest — mirroring the CLI's own --platform/DESIGN_DATA_PLATFORM, then materializes the result to a temp dir and points primer / resolve_token / query_tokens / validate_usage / describe_component / describe_guideline / list_guidelines at it instead of the embedded Spectrum snapshot. Component and guideline catalogs come from design-data catalog export --out <dir> [--platform <id>], so extension components, implementation rows, and replacements come from the SDK cascade (this needs a design-data newer than 0.12.1). Relationships are still copied from the fallback dataset and overlaid with platform manifest extensions. If resolution fails (e.g. no network for a github source), the server logs a warning and falls back to the embedded/local dataset rather than crashing.

Path resolution. The MCP client launches this server with the working directory inherited from wherever the editor was opened — which may be a subdirectory of your repo (e.g. sdk/), not the repo root. To stay independent of that working directory, each data path is resolved in this order:

  1. Explicit env override. If DESIGN_DATA_PATH / DESIGN_DATA_COMPONENTS / DESIGN_DATA_FIELDS is set, it is used. Relative values are anchored to DESIGN_DATA_ROOT (absolute, recommended when launching via npx) or, if that is unset, to the server package's own location in the monorepo. Absolute values are used as-is.
  2. Resolved @adobe/spectrum-design-data package (zero config). When no env override is set, the server resolves the installed @adobe/spectrum-design-data package via Node module resolution and reads its tokens/, components/, and fields/ directories. In a pnpm workspace this follows the symlink to packages/design-data; when published it uses the installed dependency. This is independent of the working directory.
  3. Fallback. dataPath falls back to the (anchored) current directory; the component/field overrides fall back to null (not supplied), which means describe_component / describe_guideline will throw an error if @adobe/spectrum-design-data is not resolvable.

In a monorepo checkout you typically need no DESIGN_DATA_* env vars at all — resolution via the workspace package handles it.

Example (Cursor .cursor/mcp.json)

{
  "mcpServers": {
    "design-data-agent": {
      "command": "npx",
      "args": ["-y", "@adobe/design-data-agent-mcp@latest"],
      "env": {
        "DESIGN_DATA_ROOT": "/abs/path/to/your/repo",
        "DESIGN_DATA_PATH": "packages/design-data/tokens",
        "DESIGN_DATA_COMPONENTS": "packages/design-data/components",
        "DESIGN_DATA_FIELDS": "packages/design-data/fields"
      }
    }
  }
}

Example (Claude Desktop claude_desktop_config.json)

{
  "mcpServers": {
    "design-data-agent": {
      "command": "npx",
      "args": ["-y", "@adobe/design-data-agent-mcp@latest"],
      "env": {
        "DESIGN_DATA_BIN": "design-data",
        "DESIGN_DATA_PATH": "/path/to/your/dataset"
      }
    }
  }
}

Tools exposed

ToolDescription
primerLoad full token taxonomy, component list, and field definitions
resolve_tokenResolve a token property to its literal value
query_tokensFilter tokens by expression
suggest_tokenSuggest tokens matching a natural-language intent
describe_componentFetch component schema and token bindings
describe_guidelineFetch guideline documentBlocks content and metadata
list_guidelinesList guideline slugs and metadata, optionally by category
validate_usageValidate token usage and return a diagnostic report
diff_datasetsCompare two datasets and return a semantic diff
writeWrite agent-generated product context to the dataset

Skill

The Claude Code skill lives at skills/design-data/SKILL.md. It shells out to npx @adobe/design-data for validate, query, resolve, diff, and write operations against local datasets.

License

Apache-2.0

版本与发布记录

@adobe/design-data-agent-mcp 共发布 87 个版本,首次发布于 2026/05/31;过去 12 个月发布了 87 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
1.15.15latest2026/11/10今天
1.15.142026/11/09今天
1.15.132026/11/072 天前
1.15.122026/11/072 天前
1.15.112026/11/054 天前
1.15.102026/11/054 天前

其他发布通道:beta → 1.10.0-beta.2,size-token-taxonomy → 0.0.0-size-token-taxonomy-20261029173424。

关于 @adobe/design-data-agent-mcp 的常见问题

@adobe/design-data-agent-mcp 是什么?

MCP server and Claude Code skill for the design-data agent surface — read tools run in-process via wasm

如何安装 @adobe/design-data-agent-mcp?

在项目目录运行 npm install @adobe/design-data-agent-mcp,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 design-data-agent-mcp,可以用 npx design-data-agent-mcp 直接运行。

@adobe/design-data-agent-mcp 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/adobe__design-data-agent-mcp 是否存在。

@adobe/design-data-agent-mcp 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@adobe/design-data-agent-mcp 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=20.12.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@adobe/design-data-agent-mcp 可以商用吗?

@adobe/design-data-agent-mcp 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@adobe/design-data-agent-mcp 的下载量有多少?

根据 npm 官方下载统计,@adobe/design-data-agent-mcp 在 2026/10/05 – 2026/11/03 这 30 天内被下载 1,716 次,日均约 57 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@adobe/design-data-agent-mcp 还在维护吗?

最新版本 1.15.15 发布于 2026/11/10(今天);至今共发布 87 个版本,其中过去 12 个月发布了 87 个;首次发布于 2026/05/31。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。