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/
- 测试相关Make your AI agent speak every language on the planet, using Lingo.dev Localization Engine.
Analyzes, optimizes, and detects duplicates in codebases for Claude Code.
Interact with Homebrew (the package manager for macOS and Linux) using natural language commands.
A Tabby plugin implementing an MCP server for AI-powered terminal control and automation.
An MCP server with integrations for GitLab, Jira, Confluence, and YouTube, providing AI-powered search and development utility tools.
Tools, resources, and guidance for building cross-platform applications with AvaloniaUI.
Securely execute shell commands with whitelisting, resource limits, and timeout controls for LLMs.
Integrates LLM applications with documentation sources using the Model Context Protocol.
Provides call graph analysis for LLMs using the nuanced library.
An autonomous memory management system for Claude AI, featuring multi-provider LLM integration and a persistent memory database.