Access comprehensive documentation for Ant Design components, including examples, API references, and best practices.
一个基于 Model Context Protocol (MCP) 的 Ant Design 组件服务器,为 AI 助手提供丰富的 Ant Design 组件文档、示例和最佳实践。
# 克隆仓库
git clone <repository-url>
cd antd-MCP
# 安装依赖
npm install
# 构建项目
npm run build
构建完项目后可以选择在本地的客户端配置MCP。
具体配置方法可以参考客户端说明。
以cursor为例,可以在Cursor Settings中的Tools中配置:
// 从本地导入(推荐,后面也许就不推荐了)
{
"mcpServers": {
"antd-components-local": {
"command": "node",
"args": [
"<repository-url>/antd-MCP/dist/cli.js"
]
}
}
}
// 从npm导入
{
"mcpServers": {
"antd-components-local": {
"command": "npx",
"args": [
"antd-mcp"
]
}
}
}
如果需要从本地的 Ant Design 仓库提取最新数据:
# 先克隆antd仓库到本地
git clone https://github.com/ant-design/ant-design
# 执行脚本
npm run extract
# 可能会出现更新日志无法正常获取的现象(如果docs文件夹下没有components-changelog.json文件),可以执行以下脚本后重新执行extract脚本
npm run generate-component-changelog
此功能还待完善,写得脚本太烂了,目前爬取的数据较混乱,如果有大佬有好的思路欢迎PR
# 爬取全部组件的最佳实践(需要提前提取Ant Design数据)
npm run crawl-practices
# 爬取指定组件的最佳实践
npm run crawl-practices Button ...
将此服务器添加到您的 MCP 客户端配置中,然后可以使用以下功能:
list-components
- 列出所有可用的 Ant Design 组件get-component-docs
- 获取指定组件的文档get-component-examples
- 获取组件示例代码get-component-api
- 查询组件的 API 文档get-best-practices
- 获取组件使用的最佳实践get-component-changelog
- 查看组件更新历史change-component-version
- 切换 Ant Design 版本antd-MCP/
├── src/ # 源代码
│ ├── tools/ # MCP 工具实现
│ ├── scripts/ # 脚本工具
│ ├── utils/ # 工具函数
│ └── index.ts # 主入口文件
├── docs/ # Ant Design 组件文档
│ └── components/ # 各组件文档和示例
├── cli.ts # 命令行入口
└── package.json # 项目配置
可以利用MCP提供的线上调试器调试
npm run build
npm run inspector
npm run generate-component-changelog
欢迎提交 Issue 和 Pull Request!
git checkout -b feat/amazing-feature
)git commit -m 'Add some amazing feature'
)git push origin feat/amazing-feature
)feat/
- 新功能fix/
- 问题修复docs/
- 文档更新refactor/
- 代码重构test/
- 测试相关Generates timestamp-based unique identifiers using UUID v7.
A Model Context Protocol (MCP) server for square
Execute shell commands with structured output via a powerful CLI server.
Tools to query latest Maven dependency information
Automatically builds and serves context files from codebases for AI assistants like Claude.
Ingests and serves Swagger/OpenAPI specifications and Postman collections as MCP tools. Requires a config.json for API and authentication setup.
A powerful and flexible MCP server designed to enhance the development experience with Shadcn UI components, providing tools for component management, documentation, and installation.
GXtract is a MCP server designed to integrate with VS Code and other compatible editors. It provides a suite of tools for interacting with the GroundX platform, enabling you to leverage its powerful document understanding capabilities directly within your development environment.
An interactive task loop server for Cursor IDE, designed to perform task-based operations for modern web application development.
A comprehensive MCP server for tooling interactions(40+) and resource accessibility(60+) plus many useful prompts to interact with Algorand Blockchain.