@adobe/spectrum-design-data-mcp

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

DEPRECATED — use @adobe/design-data-mcp (in-process wasm) instead. Model Context Protocol server for Spectrum design data including tokens, schemas, and component anatomy

原始使用文档
文档目录28 节
  1. Overview
  2. Prerequisites
  3. Installation
  4. Verifying Package Integrity
  5. Usage
  6. Starting the MCP Server
  7. Available Tools
  8. Configuration
  9. MCP Setup
  10. Claude Desktop (Legacy Configuration)
  11. Other MCP Clients
  12. Examples
  13. Component Building Workflow
  14. Token Queries
  15. Troubleshooting
  16. Installation Issues
  17. MCP Connection Issues
  18. Package Verification
  19. Development
  20. Building from Source
  21. Testing
  22. Project Structure
  23. Security
  24. Supply Chain Security
  25. Best Practices
  26. License
  27. Contributing
  28. Support

Spectrum Design Data MCP Server

⚠️ Deprecated — This package is no longer actively maintained. New projects should use @adobe/design-data-mcp instead, which runs in-process via wasm and is the actively maintained successor. Note that @adobe/design-data-mcp is not a drop-in replacement — it has different tool names and does not include query-tokens-by-value, validate-component-props, or the component-schema tools. This package remains available for backward compatibility but will receive no new features.

A Model Context Protocol (MCP) server that provides AI tools with structured access to Adobe Spectrum design system data, including design tokens and component API schemas.

Overview

This MCP server enables AI assistants to query and interact with Spectrum design data through a standardized protocol. It provides access to:

  • Design Tokens: Color palettes, typography, layout tokens, and semantic tokens
  • Component Schemas: API definitions and validation schemas for Spectrum components
  • Future: Component anatomy, design patterns, and guidelines

Prerequisites

  • Node.js 20+

For compatibility, token tools project the canonical embedded dataset through @adobe/design-data-wasm instead of reading generated legacy token files. Tool names and response shapes are unchanged. This package remains deprecated. Workspace development requires moon run sdk-wasm:build before running its tests.

Installation

npm install -g @adobe/spectrum-design-data-mcp

Verifying Package Integrity

This package is published with npm provenance for enhanced supply-chain security. You can verify the package's attestations:

npm audit signatures

Or clone and run locally:

git clone https://github.com/adobe/spectrum-design-data.git
cd spectrum-design-data/tools/spectrum-design-data-mcp
pnpm install

Usage

Starting the MCP Server

# Start the server (default command)
spectrum-design-data-mcp

# Or explicitly start
spectrum-design-data-mcp start

The server runs locally and communicates via stdio with MCP-compatible AI clients.

Available Tools

Token Tools

  • query-tokens: Search Spectrum tokens by name, type, or category
  • query-tokens-by-value: Find tokens by direct or resolved value (follows aliases)
  • get-token-details: Get detailed information about a specific token
  • get-component-tokens: Get all tokens for a component name

Schema Tools

  • list-components: List available components (no schema payload)
  • get-component-schema: Full schema for one component
  • validate-component-props: Validate props against schema
  • search-components-by-feature: Find components by property name

Configuration

MCP Setup

Add to your MCP configuration (e.g., .cursor/mcp.json for Cursor IDE):

{
  "mcpServers": {
    "spectrum-design-data": {
      "command": "npx",
      "args": ["-y", "@adobe/spectrum-design-data-mcp"]
    }
  }
}

Option 2: Using global installation

{
  "mcpServers": {
    "spectrum-design-data": {
      "command": "@adobe/spectrum-design-data-mcp"
    }
  }
}

Option 3: Local development

{
  "mcpServers": {
    "spectrum-design-data": {
      "command": "node",
      "args": [
        "./path/to/spectrum-design-data/tools/spectrum-design-data-mcp/src/index.js"
      ]
    }
  }
}

Note: Using npx (Option 1) is recommended as it avoids PATH issues and ensures you always use the latest version. This approach mirrors other MCP servers like Browser MCP and resolves common NPX availability problems.

Claude Desktop (Legacy Configuration)

For older Claude Desktop configurations:

{
  "mcpServers": {
    "spectrum-design-data": {
      "command": "spectrum-design-data-mcp",
      "args": []
    }
  }
}

Other MCP Clients

The server uses stdio transport and follows the MCP specification. Refer to your client's documentation for configuration details.

Examples

Component Building Workflow

Component-Specific Token Discovery

Human: Show me all available button-related design tokens.

AI: I'll gather all button-related tokens from the Spectrum system.

[Uses get-component-tokens with componentName="button"]

Found button-related tokens across categories:
- Color tokens: floating-action-button colors
- Layout tokens: button sizing, padding, spacing
- Examples: radio-button-control-size-small, action-button-edge-to-hold-icon...

Finding Tokens by Value

Human: Which tokens resolve to 1px?

AI: I'll search for tokens whose value is 1px (direct or alias).

[Uses query-tokens-by-value with value="1px"]

Tokens with value 1px:
- border-width-100 (direct)
- picker-border-width (alias to border-width-100)

Token Queries

Querying Color Tokens

Human: What blue color tokens are available in Spectrum?

AI: I'll search for blue color tokens in the Spectrum design system.

[Uses query-tokens tool with query="blue" and category="color"]

The Spectrum design system includes several blue color tokens:
- spectrum-blue-100: #e6f3ff
- spectrum-blue-200: #b3d9ff
- spectrum-blue-300: #80bfff
...

Validating Component Props

Human: Is this button configuration valid according to Spectrum?

AI: I'll validate those button properties against the Spectrum schema.

[Uses validate-component-props tool with component="action-button"]

The configuration is valid! All required properties are present and the types match the expected schema.

Troubleshooting

Installation Issues

# Check Node.js version
node --version  # Should be 20+

# Clear npm cache if needed
npm cache clean --force

# Verify package installation
npm list -g @adobe/spectrum-design-data-mcp

MCP Connection Issues

  1. Verify the MCP configuration file path
  2. Check that Node.js path is correct
  3. Ensure the package is installed globally or use npx
  4. Restart your AI client after configuration changes

Package Verification

# Verify package integrity
npm audit signatures

# Check for security vulnerabilities
npm audit

Development

Building from Source

git clone https://github.com/adobe/spectrum-design-data.git
cd spectrum-design-data
pnpm install
cd tools/spectrum-design-data-mcp

Testing

pnpm test

Project Structure

src/
├── index.js              # Main MCP server
├── cli.js               # CLI interface
├── tools/               # MCP tool implementations
│   ├── tokens.js        # Token-related tools
│   └── schemas.js       # Schema-related tools
└── data/                # Data access layer
    ├── tokens.js        # Token data access
    └── schemas.js       # Schema data access

Security

Supply Chain Security

  • 🔐 NPM Provenance: Published with npm provenance attestations for verifiable builds
  • 🛡️ Security Audits: Regular dependency security audits
  • 📦 Verified Packages: All dependencies are audited and verified

Best Practices

  • Always verify package integrity using npm audit signatures
  • Keep the package updated to the latest version
  • Use npx -y for the most secure and up-to-date execution
  • Report security issues through the GitHub security advisory

License

Apache-2.0 © Adobe

Contributing

This project is part of the Spectrum Design System. Please see the main contribution guidelines for details on how to contribute.

Support

版本与发布记录

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

版本发布日期距今
1.1.93latest2026/11/071 天前
1.1.922026/11/071 天前
1.1.912026/11/053 天前
1.1.902026/11/053 天前
1.1.892026/11/053 天前
1.1.882026/11/053 天前

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

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

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

DEPRECATED — use @adobe/design-data-mcp (in-process wasm) instead. Model Context Protocol server for Spectrum design data including tokens, schemas, and component anatomy

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

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

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

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

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

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

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

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

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

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

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

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

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

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