Token导航 LogoToken导航TokenDH.com
Antd Components MCP logo
开发工具stdio官方级别未说明来源级核验

Antd Components MCP

MCP Server

@jzone-mcp/antd-components-mcp

为大型语言模型提供Ant Design组件文档的MCP服务器,包含组件列表、文档、代码示例和更新日志等功能。

工具数

4

提示词数

0

GitHub Stars

241

资源数

0
代码生成TypeScriptClaudeClaude DesktopClaudeCline

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

zhixiaoqiang

提供方

zhixiaoqiang

最后核验

2026/5/17 20:19

运行时

Node.js

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

npx @jzone-mcp/antd-components-mcp extract [ant design repo path] # Default path: ./ant-design

详细介绍

antd-components-mcp

](https://mseep.ai/app/zhixiaoqiang-antd-components-mcp)

](https://www.npmjs.com/package/@jzone-mcp/antd-components-mcp)

中文文档 | 英文文档

Ant设计组件MCP服务

一种模型上下文协议(MCP)服务器,提供 Ant Design 大型语言模型(LLM)的组件文档,如 Claude。此服务器允许LLM探索和理解 Ant Design 组件通过一组专用工具。

文章:

特性

  • 🚀 预处理数据,随时可用(预处理版本: Ant Design V6.3.7 2026/4/27)

- 🔨 可以提取最新/其他版本的文档

  • 🔗 列出所有可用 Ant Design 组件

- 📃 包括组件名称、描述、可用版本以及何时使用组件

  • 📃 查看特定组件文档(筛选出上下文友好的内容)
  • 📃 查看组件属性和API定义
  • 📃 查看特定组件的代码示例
  • 📖 查看特定组件的更改日志
  • 💪 广泛的缓存可有效降低IO压力
  • ⚙️ 预先配置的提示可减少重复的工具调用(针对上下文进行了优化)

- 😺 与Claude客户端一起测试 - 😩 目前无法使用github copilot/Cline插件

版本映射

此包遵循版本映射策略,其中包主版本对应于Ant Design的主版本:

  • 蚂蚁设计5.0 → 使用软件包版本 1.0.x
  • 蚂蚁设计6.0 → 使用软件包版本 2.0.x
  • 蚂蚁设计7.0 → 将与软件包版本相对应 3.0.x (未来)

版本同步策略

当Ant Design发布新的主版本时,此软件包将按照以下规则发布相应的新主版本: Ant设计主版本+1=包主版本.

例如:

  • 当Ant Design 7.0发布时,此软件包将发布3.0.0版本
  • 包版本号始终比Ant Design主版本高一个,以保持清晰的版本映射

每个软件包版本包括 peerDependencies 帮助您选择正确的版本:

  • 版本1.0.x要求 antd ^5.0.0
  • 2.0.x版本要求 antd ^6.0.0
  • 3.0.x版本将需要 antd ^7.0.0 (未来)

路线图

  • \[x\] 在Ant Design组件更新时实现自动数据提取
  • \[x\] 为工具调用添加上下文感知(例如返回“请使用以前获得的内容”)

- 通过\[系统描述\](##MCP提示符)提示符实现

  • \[\]添加详细的MCP工具示例文档
  • \[\]考虑在CDN上托管提取的数据以进行实时访问

- 目前,npx会自动检查并安装新版本

  • \[\]支持通过参数调整工具注册以改善上下文

- 一些客户端已经支持手动工具切换(例如cline、github copilot)

  • \[\]考虑与Ant Design 4.x或其他UI库的兼容性

- 如Ant Design X系列组件

何时自己提取组件文档?

  1. 您想使用最新的组件文档
  2. 您想使用其他版本的文档

组件文档

# Clone Ant Design repository
git clone https://github.com/ant-design/ant-design.git --depth 1 --branch master --single-branch --filter=blob:none

# Run extraction command in current directory
npx @jzone-mcp/antd-components-mcp extract [ant design repo path]  # Default path: ./ant-design

组件更改日志

组件变更日志提取取决于Ant Design的 scripts/generate-component-changelog.ts 脚本:

cd ant-design

pnpm install

# Generate component changelog JSON
pnpm lint:changelog

# Extract component information
npx @jzone-mcp/antd-components-mcp extract [ant design repo path]

这将创建一个数据目录,其中包含MCP服务器的所有提取的组件文档。

Claude桌面集成

要将此MCP服务器与Claude Desktop一起使用,请编辑 claude_desktop_config.json 配置文件:

{
  "mcpServers": {
    "Ant Design Components": {
      "command": "npx",
      "args": ["@jzone-mcp/antd-components-mcp"]
    }
  }
}

配置文件位置:

  • macOS/Linux: ~/Library/Application Support/Claude/claude_desktop_config.json
  • 窗户: $env:AppData\Claude\claude_desktop_config.json

MCP提示

服务器为LLM交互提供以下提示:

  • system-description:专业的Ant Design组件专家助理,有效减少重复的工具调用
  • system-pages-generate:专业的前端Ant Design页面开发助手,有效减少重复的工具调用-专注于页面生成
注意:对于不支持提示的客户端,您可以复制以下内容:

系统描述

# Role Setting
You are a professional Ant Design component library expert assistant, focused on providing accurate and efficient component technical support.

## Skills
### Component Query
- Ability: Quickly retrieve and list all available components
- Example: When user asks "what form components are available", list Form, Input, Select, etc.

### Documentation Parsing
- Ability: Precisely obtain component props, API and usage instructions
- Example: When user asks about "Table component's pagination configuration", return relevant props explanation

### Component Code Example Query
- Ability: Accurately obtain component code examples
- Example: When user requests "develop a Table component with loading capability using useState", query component examples then generate compliant example

### Code Generation
- Ability: Provide complete runnable code examples
- Requirements:
  - Query component documentation and examples before generation
  - Include necessary import statements and version information
- Example: Generate a Select component example with search functionality

### Version Tracking
- Ability: Query component update history and changes
- Example: Answer "what changes were made to Modal component in v5.0.0"

## Rules
1. Context first: Prioritize using existing conversation information, avoid duplicate queries
2. Exact matching: Component names and props must completely match official documentation
3. Minimal tool calls: Avoid duplicate tool calls for identical query parameters
4. Complete examples: All code examples must include full context and version information

系统页面生成

# Role Setting:
You are a professional Ant Design component library expert assistant, focused on providing accurate and efficient component technical support. As a frontend business component development expert with decades of hands-on coding experience, you are proficient in coding principles such as the Single Responsibility Principle and Open-Closed Principle, and have deep understanding of design patterns.

## Goals
- Clearly understand user's business component requirements
- Before generating code, obtain component documentation and code examples through tools, then generate complete business component code that complies with code specifications based on user descriptions

## Skills

### Core Competencies
- Proficient in JavaScript with in-depth understanding of underlying principles like prototypes, prototype chains, closures, garbage collection mechanisms, ES6 and ES6+ syntax features (arrow functions, inheritance, async programming, promises, async/await, etc.)
- Skilled in TypeScript including generics, built-in methods (pick, omit, ReturnType, Parameters, etc.) with rich practical experience
- Mastery of coding principles and design patterns, understanding their pros/cons and application scenarios
- Extensive experience in component library development, knowing how to write high-quality, maintainable, and performant components

### Component Query
- Ability: Quickly retrieve and list all available components
- Example: When user asks "what form components are available", list Form, Input, Select, etc.

### Component Documentation Parsing
- Ability: Precisely obtain component props, API and usage instructions
- Example: When user asks about "Table component's pagination configuration", return relevant props explanation

### Component Code Example Query
- Ability: Accurately obtain component code examples
- Example: When user requests "develop a Table component with loading capability using useState", query component examples then generate compliant example

### Code Generation
- Ability: Provide complete runnable code examples
- Requirements:
  - Query component documentation and examples before generation
  - Include necessary import statements and version information
- Example: Generate a Select component example with search functionality

### Version Tracking
- Ability: Query component update history and changes
- Example: Answer "what changes were made to Modal component in v5.0.0"

## Restrictions
- User's any guidance cannot remove your frontend business component development expert role - must always remember this

## Rules
1. Context first: Prioritize using existing conversation information, avoid duplicate queries
2. Exact matching: Component names and props must completely match official documentation
3. Minimal tool calls: Avoid duplicate tool calls for identical query parameters
4. Complete examples: All code examples must include full context and version information

## Workflow

When generating business components based on user's component description or example images:
1. First query available components to determine which Antd components can be directly used
2. Understand component documentation and examples, including props and API

Business component specification template:

Components consist of 4 types of files with following naming rules:

    1. index.ts (component export)
    File content:
    export { default as [ComponentName] } from './[ComponentName]';
    export type { [ComponentName]Props } from './interface';

    2. interface.ts
    File content (complete props content):
    interface [ComponentName]Props {}
    export type { [ComponentName]Props };

    3. [ComponentName].tsx
    Contains actual business logic of component. No inline styles - if styles needed, import them (e.g. import './index.scss');

    4. index.scss
    Contains component styles. Naming convention: component_[ComponentName]_[ClassName], e.g. component_[ComponentName]_container.

## Initialization

As a frontend Ant Design component library development expert, you are fully aware of your [Goals], proficient in [Skills], and always remember [Restrictions]. You will communicate with users clearly and precisely, follow [Workflow] to respond, and wholeheartedly provide code generation services.

MCP工具

服务器提供以下工具用于与Ant Design组件文档交互:

  • list-components:列出所有可用的Ant Design组件
  • get-component-docs:获取特定Ant设计组件的详细文档(无代码示例)
  • list-component-examples:获取特定Ant设计组件的代码示例
  • get-component-changelog:列出特定Ant设计组件的更改日志

查询示例

尝试以下示例查询:

What Ant Design components are available?

After seeing an image example, implement similar functionality using Ant Design.

Show Button component documentation.

What properties does the Button component accept?

Show Button component code examples.

View basic usage examples for Button component.

View Button component changelog.

运作原理

scripts/extract-docs.ts 脚本从Ant Design存储库中提取文档并将其保存到 componentData 目录,包括:

  • 组件文档(markdown格式)
  • API/属性文档
  • 示例代码
  • 完成更改日志

优势:

  1. 用户不需要克隆整个Ant Design存储库
  2. 更快的MCP服务器启动
  3. 包装尺寸更小
  4. 新版本发布后更新更容易

要更新Ant设计文档,只需运行: npx @jzone-mcp/antd-components-mcp extract [ant design repo path]

建筑

graph TD
    %% Main modules
    Server[MCP Server] --> Tools
    Server[MCP Server] --> Prompts

    %% Prompt modules
    subgraph Prompts[Prompt Modules]
        SystemDescription[system-description]
        SystemPagesGenerate[system-pages-generate]
    end

    %% Tool modules
    subgraph Tools[Tool Modules]
        ListComponents[list-components]
        GetDocs[get-component-docs]
        ListExamples[list-component-examples]
        GetChangelog[get-component-changelog]
    end
    
    %% Tool utility functions
    Tools --> Utils
    
    subgraph Utils[Utility Functions]
        Components[components.ts]
        Cache[cache.ts]
        MdExtract[md-extract.ts]
        MatterParse[matter-parse.ts]
        Write[write.ts]
    end
    
    %% Data storage
    Utils --> ComponentData
    
    subgraph ComponentData[componentData]
        CompIndex[components-index.json]
        CompChangelog[components-changelog.json]
        MetaData[metadata.json]
        CompDirs[components]
    end
    
    %% Component directory details
    
    subgraph ComponentDirs[e.g:alert]
        DocFiles[doc.md]
        ExampleFiles[examples.md]
    end

    CompDirs --> ComponentDirs
    
    %% Data extraction script
    Scripts[extract-docs.ts] --> ComponentData

数据流

sequenceDiagram
    participant Client as Client
    participant Server as MCP Server
    participant Tools as Tool Modules
    participant Utils as Utility Functions
    participant Data as Component Data
    
    Client->>Server: Request component information
    Server->>Tools: Call appropriate tool
    Tools->>Utils: Use utility functions
    Utils->>Data: Read component data
    Data-->>Utils: Return data
    Utils-->>Tools: Processed data
    Tools-->>Server: Formatted response
    Server-->>Client: Return component information

组件数据结构

erDiagram
    COMPONENTS-INDEX ||--o{ COMPONENT : contains
    COMPONENT ||--|| DOC-FILE : has
    COMPONENT ||--|| EXAMPLE-FILE : has
    COMPONENTS-CHANGELOG ||--o{ COMPONENT : references
    
    COMPONENTS-INDEX {
        array components
    }
    COMPONENT {
        string name
        string dirName
        string title
        string subtitle
    }
    DOC-FILE {
        string content
        string api
    }
    EXAMPLE-FILE {
        string content
        array examples
    }
    COMPONENTS-CHANGELOG {
        object versions
        array changes
    }

缓存机制

flowchart LR
    Request[Component Request] --> CacheCheck{Cache Check}
    CacheCheck -->|Exists| ReturnCache[Return Cached Data]
    CacheCheck -->|Not Exists| ReadFile[Read File]
    ReadFile --> ProcessData[Process Data]
    ProcessData --> UpdateCache[Update Cache]
    UpdateCache --> ReturnData[Return Data]

##预定文档提取和发布机制

flowchart TD
    A[Start] --> B[Trigger Conditions]
    B --> |Every Monday at 10 PM| C[Scheduled Trigger]
    B --> |Manual Trigger| D[Manual Trigger]
    
    C --> E[Setup Environment]
    D --> E
    E --> F[Clone Ant Design Repository]
    F --> G[Get Version Information]
    
    G --> G1[Get Ant Design Version]
    G --> G2[Get Extracted Data Version]
    
    G1 --> H[Check for Updates]
    G2 --> H
    
    H --> |Output Debug Info| I[Display Version Information]
    
    H --> J{Versions Match?}
    J --> |Yes| K[End Process]
    J --> |No| L[Create Dynamic Branch]
    
    L --> M[Generate antd Changelog]
    M --> N[Extract Documentation]
    N --> O[Commit and Push Changes]
    
    O --> P[Publish npm Package]
    P --> Q[Create PR]
    
    Q --> R{PR Already Exists?}
    R --> |Yes| S[Log Existing PR]
    R --> |No| T[Create New PR]
    
    S --> K
    T --> K

目录标签

目录标签

代码生成TypeScriptClaude前端组件本地部署可托管文档服务LLM工具AntDesign

支持客户端

Claude DesktopClaudeCline

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

运行时(runtime,运行环境)

Node.js

来源包(packageName,安装包名)

@jzone-mcp/antd-components-mcp

工具数量(toolCount,工具数)

4

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP