- Antd Components Mcp
Antd Components Mcp
Content
Ant Design 组件库 MCP 服务
一个模型上下文协议(MCP)服务器,用于向 Claude 等大型语言模型(LLMs)提供 Ant Design 组件文档。该服务器允许 LLM 通过一组专用工具探索和理解 Ant Design 组件。
功能特性
- 已预处理数据,开箱即用(预处理版本为
Ant Design V5.24.6 2025/4/12)- 可以自行提取最新的/其他版本的组件文档
- 列出所有可用的
Ant Design组件- 包含组件名称、描述、可用版本、何时使用当前组件信息
- 查看特定组件文档(已过滤无意义内容,对上下文友好)
- 查看特定组件属性和 API 定义
- 查看特定组件组件的代码示例
- 查看特定组件组件的更新日志
- 做了大量的缓存,有效缓解 IO 压力
后续计划
- 实现监听 Ant Design 组件库的更新,自动进行数据提取发版
- 添加详细的例子文档
- 考虑将提取的数据考虑放到CDN上,使用时实时获取
- 实际上 npx 执行时会检测新版并安装新版本使用,目前可以保证数据实时性
- 考虑支持通过传参调整 tool 的注册来改善上下文
- 目前部分 client 已支持手动开关单一工具:cline、github copilot等
- 考虑兼容 Ant Design 4.x 版本或者其他 UI 库
- 如 Ant Design X 等系列组件库
什么时候需要自行提取组件文档?
- 你想使用最新的组件文档
- 你想使用其他版本的组件文档
组件文档
# 克隆 Ant Design 仓库
git clone https://github.com/ant-design/ant-design.git --depth 1 --branch master --single-branch --filter=blob:none
# 在当前目录执行提取文档命令
npx @jzone-mcp/antd-components-mcp extract [ant design repo path] #默认提取路径为 ./ant-design
组件更新日志
组件更新日志提取依赖于 Ant Design 的 scripts/generate-component-changelog.ts 脚本,需要按照依赖后生成:
cd ant-design
pnpm install
# 生成组件更新日志 JSON
pnpm lint:changelog
# 提取组件信息
npx @jzone-mcp/antd-components-mcp extract [ant design repo path]
这将创建一个包含所有提取的组件文档的 data 目录,供 MCP 服务器使用。
Claude桌面版集成
在Claude桌面版中使用此MCP服务器,编辑 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 - Windows:
$env:AppData\Claude\claude_desktop_config.json
MCP Tools
服务器提供以下工具供LLM与Ant Design组件文档交互:
list-components: 列出所有可用的 Ant Design 组件get-component-docs: 获取 Ant Design 特定组件的详细文档,不包含代码示例list-component-examples: 获取 Ant Design 特定组件的代码示例get-component-changelog: 列出 Ant Design 特定组件的更新日志
查询示例
可尝试的示例查询:
Ant Design 有哪些可用组件?
上传图片示例后,使用 Ant Design 实现如图功能。
显示 Button 组件的文档。
Button 组件接受哪些属性?
显示 Button 组件的代码示例。
查看 Button 组件的基础用法。
查看 Button 组件的更新记录
工作原理
scripts/extract-docs.ts 脚本从 Ant Design 仓库提取文档并保存到 componentData 目录,包括:
- 组件文档(markdown格式)
- API/属性文档
- 示例代码
- 全量的更新日志
这种方法有几个优点:
- 用户无需克隆整个Ant Design仓库
- MCP服务器启动更快
- 包体积更小
- 新版本发布时更容易更新
当你要更新 Ant Design 文档时,只需执行 npx @jzone-mcp/antd-components-mcp extract [ant design repo path] 命令即可。
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
WindsurfThe new purpose-built IDE to harness magic
Tavily Mcp
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
DeepChatYour AI Partner on Desktop
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Playwright McpPlaywright MCP server
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题;
Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Serper MCP ServerA Serper MCP Server
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
CursorThe AI Code Editor
Amap Maps高德地图官方 MCP Server
ChatWiseThe second fastest AI chatbot™