Fetches and structures Ant Design v4 component documentation, providing tools to list, search, retrieve, and export component metadata including props, events, methods, and usage examples.
Ant Design MCP Server (Python)
This Model Context Protocol (MCP) server fetches and structures Ant Design v4 (Chinese) component documentation into JSON so AI agents can perform analysis.
Features
Fetch overview page and individual component pages.
Extract component metadata: name, description, examples.
Classify API tables automatically (props / events / methods / other).
Cache fetched HTML locally.
Export all components into a single JSON file.
MCP tools exposed over JSON-RPC stdio.
Tools
list_components(force?)
get_component(name, force?)
search_components(query)
export_all(force?, filepath?)
Environment Setup
Choose one method:
venv (built-in)
pyenv + venv
Conda
Run Server
JSON-RPC Examples
Export Output
Default file: src/antd_mcp/exports/antd_components_all.json
Structure:
TODO / Roadmap
More precise table classification rules (column semantics).
Parallel fetching & retry with backoff.
Version / language (en vs cn) selection.
CLI wrapper.
Optional rate limiting.
License
MIT (add if needed)
安装 (发布后)
安装后命令行入口:
本地构建与发布
供 AI 工具使用的 mcp.json 示例
环境变量
ANTD_MCP_CACHE_DIR自定义缓存目录。MCP_PRETTY/MCP_COLOR控制输出格式。
版本
当前版本: 0.1.0
antd-mcp
This server cannot be installed