Content
# Ant Design MCP Server
An MCP server that gives AI agents direct access to Ant Design 5.x documentation, component specs, props/API, design tokens, and theme configuration. Ships as a single native binary with an embedded database — no external dependencies, no API keys, fully offline.
## Features
- **Full Ant Design 5.x reference** — 65 components, design tokens, typography, color, spacing, theme configuration, accessibility, and design guidelines
- **9 MCP tools** — search, browse, and query specific design system elements
- **Hybrid search** — FTS5 BM25 full-text search combined with TF-IDF vector similarity
- **Single binary** — pre-built SQLite database embedded via `go:embed`, no runtime dependencies
- **Pure Go** — no CGO, cross-compiles to Linux, macOS, and Windows
- **MCP standard** — works with any agent or client that supports the Model Context Protocol
## Quick Start
### 1. Build
```shell
git clone https://github.com/Dxeo/antdesign-mcp.git
cd antdesign-mcp
go run ./cmd/seed/ # Build the Ant Design documentation database
go build -o antdesign-mcp ./cmd/server # Linux / macOS
go build -o antdesign-mcp.exe ./cmd/server # Windows
```
### 2. Configure
Add to your MCP client configuration (see [Integration](#integration) for specific clients).
## Tools
| Tool | Description |
| --- | --- |
| `search_docs` | Hybrid full-text + semantic search across all Ant Design content |
| `get_component` | Full component spec by name (description, specs, tokens, anatomy, states) |
| `get_component_api` | Props/API table for a component (prop names, types, defaults, descriptions) |
| `get_design_tokens` | Look up design token values by category, name, or role |
| `get_theme_config` | Theme configuration tokens by tier (seed, map, alias) and category |
| `compare_components` | Side-by-side spec, token, and props comparison of two components |
| `get_guideline` | Design guideline documentation by topic |
| `get_accessibility_guidance` | Accessibility requirements and best practices per component or topic |
| `list_components` | List all available Ant Design component names grouped by category |
## Integration
The server communicates over **stdio** using the MCP protocol. Any MCP-compatible client can use it by pointing to the binary.
This repo ships an [AGENT.md](AGENT.md) file with mandatory instructions that tell the agent when and how to use the antdesign-mcp tools. Copy its contents into your agent's system prompt, `CLAUDE.md`, or equivalent configuration file to ensure the agent actively queries Ant Design specs instead of relying on training data.
### Claude Code
Add to `~/.claude/settings.json` or project `.mcp.json`:
```json
{
"mcpServers": {
"antdesign": {
"command": "/absolute/path/to/antdesign-mcp"
}
}
}
```
Then add the contents of [AGENT.md](AGENT.md) to your project's `CLAUDE.md` or `~/.claude/CLAUDE.md`.
## Architecture
1. **Build time** — `cmd/seed` reads structured JSON data files containing Ant Design 5.x component specs, props/API, design tokens, theme configuration, and guidelines, builds FTS5 and TF-IDF indexes, and writes a SQLite database
2. **Runtime** — the server embeds the pre-built database via `go:embed` + SQLite VFS, opens it read-only with zero disk I/O, and serves queries over MCP stdio transport
```
antdesign-mcp/
├── cmd/
│ ├── server/ # MCP server entry point
│ └── seed/ # JSON-driven Ant Design database builder
├── data/ # Ant Design spec data as structured JSON
│ ├── components/ # 65 component families
│ ├── tokens/ # Color, typography, spacing, motion, border-radius, shadow
│ ├── theme/ # 3-tier theme tokens (seed, map, alias)
│ └── guidelines/ # Accessibility, layout, forms, navigation, feedback
├── embeds/ # Embedded database (go:embed target)
└── internal/
├── store/ # SQLite database layer (pure Go, FTS5)
├── search/ # Hybrid search (FTS5 BM25 + TF-IDF vectors)
├── vectorize/ # TF-IDF computation and cosine similarity
└── mcp/ # MCP server setup and 9 tool handlers
```
## Component Coverage
| Category | Count | Components |
| --- | --- | --- |
| General | 4 | Button, FloatButton, Icon, Typography |
| Layout | 5 | Divider, Flex, Grid, Layout, Space |
| Navigation | 7 | Anchor, Breadcrumb, Dropdown, Menu, Pagination, Steps, Tabs |
| Data Entry | 18 | AutoComplete, Cascader, Checkbox, ColorPicker, DatePicker, Form, Input, InputNumber, Mentions, Radio, Rate, Select, Slider, Switch, TimePicker, Transfer, TreeSelect, Upload |
| Data Display | 20 | Avatar, Badge, Calendar, Card, Carousel, Collapse, Descriptions, Empty, Image, List, Popover, QRCode, Segmented, Statistic, Table, Tag, Timeline, Tooltip, Tour, Tree |
| Feedback | 11 | Alert, Drawer, Message, Modal, Notification, Popconfirm, Progress, Result, Skeleton, Spin, Watermark |
## License
This project is licensed under the GNU General Public License v3.0 — see the [LICENSE](LICENSE) file for details.
MCP Config
Below is the configuration for this MCP Server. You can copy it directly to Cursor or other MCP clients.
mcp.json
Connection Info
You Might Also Like
everything-claude-code
Complete Claude Code configuration collection - agents, skills, hooks,...
markitdown
MarkItDown-MCP is a lightweight server for converting URIs to Markdown.
cc-switch
All-in-One Assistant for Claude Code, Codex & Gemini CLI across platforms.
servers
Model Context Protocol Servers
servers
Model Context Protocol Servers
Time
A Model Context Protocol server for time and timezone conversions.