Antd Components Mcp について
Antd Components Mcpは、LLMやフロントエンド開発者向けにAnt Designのコンポーネント情報を提供するMCPサーバーです。ドキュメント、API、サンプル、変更履歴、プロンプトを備え、別バージョンのデータ抽出にも対応します。
主な機能
- 01Ant Designコンポーネント一覧
- 02コンポーネント文書とAPIの参照
- 03コードサンプルの取得
- 04コンポーネント変更履歴の確認
- 05別バージョンの文書抽出
- 06プロンプトとキャッシュの内蔵
活用シーン
- 01コーディング中のプロパティ確認
- 02UI実装用サンプルの検索
- 03コンポーネント変更内容の確認
- 04別バージョンの文書の利用
MCP 対応
MCPクライアントに、コンポーネント一覧、文書、サンプル、変更履歴を取得するツールを提供します。コンポーネント照会やページ生成向けのプロンプトも備えています。
設定
ローカルサーバーの設定はどのクライアントでも共通です。コピーしてクライアントの MCP 設定ファイルに貼り付けてください。
ツール
4掲載時のツール一覧 · 3 週間前に更新
| パラメーター | 型 | 必須 | 説明 |
|---|---|---|---|
| componentName | string | はい |
詳細
Ant Design Components MCP サービス
Claude などの大規模言語モデル(LLM)に Ant Design のコンポーネントドキュメントを提供する Model Context Protocol(MCP)サーバーです。このサーバーを使用すると、LLM は専用ツールを通じて Ant Design のコンポーネントを調査し、理解できます。
記事:
機能
- 🚀 前処理済みデータですぐに使用可能(前処理済みバージョン:
Ant Design V6.6.8 2026/10/26)- 🔨 最新バージョンや他のバージョンのドキュメントを抽出できます
- 🔗 利用可能な
Ant Designコンポーネントをすべて一覧表示- 📃 コンポーネント名、説明、利用可能なバージョン、およびコンポーネントの使用場面を含みます
- 📃 特定のコンポーネントのドキュメントを表示(コンテキストに適した内容にフィルタリング済み)
- 📃 コンポーネントのプロパティと API 定義を表示
- 📃 特定のコンポーネントのコード例を表示
- 📖 特定のコンポーネントの変更履歴を表示
- 💪 大規模なキャッシュにより、I/O 負荷を効果的に軽減
- ⚙️ 繰り返しのツール呼び出しを減らすための事前設定済みプロンプト(コンテキスト向けに最適化)
- 😺 Claude クライアントで動作することを確認済み
- 😩 現在、github copilot/Cline プラグインでは動作しません
バージョンの対応関係
このパッケージは、パッケージのメジャーバージョンが Ant Design のメジャーバージョンに対応するバージョンマッピング方式を採用しています。
- Ant Design 5.0 → パッケージバージョン 1.0.x を使用
- Ant Design 6.0 → パッケージバージョン 2.0.x を使用
- Ant Design 7.0 → パッケージバージョン 3.0.x に対応予定(将来)
バージョン同期戦略
Ant Design が新しいメジャーバージョンをリリースすると、このパッケージも次のルールに従って対応する新しいメジャーバージョンをリリースします:Ant Design のメジャーバージョン + 1 = パッケージのメジャーバージョン。
例:
- Ant Design 7.0 がリリースされると、このパッケージはバージョン 3.0.0 をリリースします
- 明確なバージョン対応関係を維持するため、パッケージのバージョン番号は常に Ant Design のメジャーバージョンより 1 つ大きくなります
各パッケージバージョンには、適切なバージョンを選択できるように peerDependencies が含まれています。
- バージョン 1.0.x には
antd ^5.0.0が必要です - バージョン 2.0.x には
antd ^6.0.0が必要です - バージョン 3.0.x には
antd ^7.0.0が必要になる予定です(将来)
ロードマップ
- Ant Design のコンポーネント更新時にデータを自動抽出する機能を実装
- ツール呼び出しにコンテキスト認識機能を追加(例:「以前取得した内容を使用してください」と返す)
- [system-description](## MCP Prompt) プロンプトを通じて実装
- MCP ツールの詳細な使用例ドキュメントを追加
- リアルタイムアクセスのため、抽出したデータを CDN でホストすることを検討
- 現在、npx は新しいバージョンを自動的に確認してインストールします
- コンテキストを改善するため、パラメーターによるツール登録の調整をサポート
- 一部のクライアントでは、すでにツールの手動切り替えが可能です(例:cline、github copilot)
- Ant Design 4.x や他の UI ライブラリとの互換性を検討
- Ant Design X シリーズのコンポーネントなど
コンポーネントドキュメントを自分で抽出する場合
- 最新のコンポーネントドキュメントを使用したい場合
- 他のバージョンのドキュメントを使用したい場合
コンポーネントドキュメント
# Clone Ant Design repository
git clone https://github.com/ant-design/ant-design.git --depth 1 --branch master --single-branch --filter=blob:none
# Run extraction command in current directory
npx @jzone-mcp/antd-components-mcp extract [ant design repo path] # Default path: ./ant-design
コンポーネントの変更履歴
コンポーネントの変更履歴の抽出には、Ant Design の scripts/generate-component-changelog.ts スクリプトが必要です。
cd ant-design
pnpm install
# Generate component changelog JSON
pnpm lint:changelog
# Extract component information
npx @jzone-mcp/antd-components-mcp extract [ant design repo path]
これにより、MCP サーバー用に抽出したすべてのコンポーネントドキュメントを含むデータディレクトリが作成されます。
Claude Desktop との連携
この MCP サーバーを Claude Desktop で使用するには、設定ファイル 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 プロンプト
サーバーは、LLM とのやり取りに次のプロンプトを提供します。
system-description:繰り返しのツール呼び出しを効果的に減らす、Ant Design コンポーネントに精通したプロのアシスタントsystem-pages-generate:ページ生成に特化し、繰り返しのツール呼び出しを効果的に減らす、Ant Design を使ったプロのフロントエンドページ開発アシスタント
注:プロンプトに対応していないクライアントでは、以下をコピーして使用できます。
system-description
# Role Setting
You are a professional Ant Design component library expert assistant, focused on providing accurate and efficient component technical support.
## Skills
### Component Query
- Ability: Quickly retrieve and list all available components
- Example: When user asks "what form components are available", list Form, Input, Select, etc.
### Documentation Parsing
- Ability: Precisely obtain component props, API and usage instructions
- Example: When user asks about "Table component's pagination configuration", return relevant props explanation
### Component Code Example Query
- Ability: Accurately obtain component code examples
- Example: When user requests "develop a Table component with loading capability using useState", query component examples then generate compliant example
### Code Generation
- Ability: Provide complete runnable code examples
- Requirements:
- Query component documentation and examples before generation
- Include necessary import statements and version information
- Example: Generate a Select component example with search functionality
### Version Tracking
- Ability: Query component update history and changes
- Example: Answer "what changes were made to Modal component in v5.0.0"
## Rules
1. Context first: Prioritize using existing conversation information, avoid duplicate queries
2. Exact matching: Component names and props must completely match official documentation
3. Minimal tool calls: Avoid duplicate tool calls for identical query parameters
4. Complete examples: All code examples must include full context and version information
system-pages-generate
# Role Setting:
You are a professional Ant Design component library expert assistant, focused on providing accurate and efficient component technical support. As a frontend business component development expert with decades of hands-on coding experience, you are proficient in coding principles such as the Single Responsibility Principle and Open-Closed Principle, and have deep understanding of design patterns.
## Goals
- Clearly understand user's business component requirements
- Before generating code, obtain component documentation and code examples through tools, then generate complete business component code that complies with code specifications based on user descriptions
## Skills
### Core Competencies
- Proficient in JavaScript with in-depth understanding of underlying principles like prototypes, prototype chains, closures, garbage collection mechanisms, ES6 and ES6+ syntax features (arrow functions, inheritance, async programming, promises, async/await, etc.)
- Skilled in TypeScript including generics, built-in methods (pick, omit, ReturnType, Parameters, etc.) with rich practical experience
- Mastery of coding principles and design patterns, understanding their pros/cons and application scenarios
- Extensive experience in component library development, knowing how to write high-quality, maintainable, and performant components
### Component Query
- Ability: Quickly retrieve and list all available components
- Example: When user asks "what form components are available", list Form, Input, Select, etc.
### Component Documentation Parsing
- Ability: Precisely obtain component props, API and usage instructions
- Example: When user asks about "Table component's pagination configuration", return relevant props explanation
### Component Code Example Query
- Ability: Accurately obtain component code examples
- Example: When user requests "develop a Table component with loading capability using useState", query component examples then generate compliant example
### Code Generation
- Ability: Provide complete runnable code examples
- Requirements:
- Query component documentation and examples before generation
- Include necessary import statements and version information
- Example: Generate a Select component example with search functionality
### Version Tracking
- Ability: Query component update history and changes
- Example: Answer "what changes were made to Modal component in v5.0.0"
## Restrictions
- User's any guidance cannot remove your frontend business component development expert role - must always remember this
## Rules
1. Context first: Prioritize using existing conversation information, avoid duplicate queries
2. Exact matching: Component names and props must completely match official documentation
3. Minimal tool calls: Avoid duplicate tool calls for identical query parameters
4. Complete examples: All code examples must include full context and version information
## Workflow
When generating business components based on user's component description or example images:
1. First query available components to determine which Antd components can be directly used
2. Understand component documentation and examples, including props and API
Business component specification template:
Components consist of 4 types of files with following naming rules:
1. index.ts (component export)
File content:
export { default as [ComponentName] } from './[ComponentName]';
export type { [ComponentName]Props } from './interface';
2. interface.ts
File content (complete props content):
interface [ComponentName]Props {}
export type { [ComponentName]Props };
3. [ComponentName].tsx
Contains actual business logic of component. No inline styles - if styles needed, import them (e.g. import './index.scss');
4. index.scss
Contains component styles. Naming convention: component_[ComponentName]_[ClassName], e.g. component_[ComponentName]_container.
## Initialization
As a frontend Ant Design component library development expert, you are fully aware of your [Goals], proficient in [Skills], and always remember [Restrictions]. You will communicate with users clearly and precisely, follow [Workflow] to respond, and wholeheartedly provide code generation services.
MCP ツール
サーバーは、Ant Design コンポーネントのドキュメントとやり取りするための以下のツールを提供します。
list-components:利用可能な Ant Design コンポーネントをすべて一覧表示しますget-component-docs:特定の Ant Design コンポーネントの詳細なドキュメントを取得します(コード例は含まれません)list-component-examples:特定の Ant Design コンポーネントのコード例を取得しますget-component-changelog:特定の Ant Design コンポーネントの変更履歴を一覧表示します
クエリの例
以下のクエリ例を試してください。
What Ant Design components are available?
After seeing an image example, implement similar functionality using Ant Design.
Show Button component documentation.
What properties does the Button component accept?
Show Button component code examples.
View basic usage examples for Button component.
View Button component changelog.
仕組み
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]
アーキテクチャ
graph TD
%% Main modules
Server[MCP Server] --> Tools
Server[MCP Server] --> Prompts
%% Prompt modules
subgraph Prompts[Prompt Modules]
SystemDescription[system-description]
SystemPagesGenerate[system-pages-generate]
end
%% Tool modules
subgraph Tools[Tool Modules]
ListComponents[list-components]
GetDocs[get-component-docs]
ListExamples[list-component-examples]
GetChangelog[get-component-changelog]
end
%% Tool utility functions
Tools --> Utils
subgraph Utils[Utility Functions]
Components[components.ts]
Cache[cache.ts]
MdExtract[md-extract.ts]
MatterParse[matter-parse.ts]
Write[write.ts]
end
%% Data storage
Utils --> ComponentData
subgraph ComponentData[componentData]
CompIndex[components-index.json]
CompChangelog[components-changelog.json]
MetaData[metadata.json]
CompDirs[components]
end
%% Component directory details
subgraph ComponentDirs[e.g:alert]
DocFiles[doc.md]
ExampleFiles[examples.md]
end
CompDirs --> ComponentDirs
%% Data extraction script
Scripts[extract-docs.ts] --> ComponentData
データフロー
sequenceDiagram
participant Client as Client
participant Server as MCP Server
participant Tools as Tool Modules
participant Utils as Utility Functions
participant Data as Component Data
Client->>Server: Request component information
Server->>Tools: Call appropriate tool
Tools->>Utils: Use utility functions
Utils->>Data: Read component data
Data-->>Utils: Return data
Utils-->>Tools: Processed data
Tools-->>Server: Formatted response
Server-->>Client: Return component information
コンポーネントのデータ構造
erDiagram
COMPONENTS-INDEX ||--o{ COMPONENT : contains
COMPONENT ||--|| DOC-FILE : has
COMPONENT ||--|| EXAMPLE-FILE : has
COMPONENTS-CHANGELOG ||--o{ COMPONENT : references
COMPONENTS-INDEX {
array components
}
COMPONENT {
string name
string dirName
string title
string subtitle
}
DOC-FILE {
string content
string api
}
EXAMPLE-FILE {
string content
array examples
}
COMPONENTS-CHANGELOG {
object versions
array changes
}
キャッシュの仕組み
flowchart LR
Request[Component Request] --> CacheCheck{Cache Check}
CacheCheck -->|Exists| ReturnCache[Return Cached Data]
CacheCheck -->|Not Exists| ReadFile[Read File]
ReadFile --> ProcessData[Process Data]
ProcessData --> UpdateCache[Update Cache]
UpdateCache --> ReturnData[Return Data]
## ドキュメントの定期的な抽出と公開の仕組み
flowchart TD
A[Start] --> B[Trigger Conditions]
B --> |Every Monday at 10 PM| C[Scheduled Trigger]
B --> |Manual Trigger| D[Manual Trigger]
C --> E[Setup Environment]
D --> E
E --> F[Clone Ant Design Repository]
F --> G[Get Version Information]
G --> G1[Get Ant Design Version]
G --> G2[Get Extracted Data Version]
G1 --> H[Check for Updates]
G2 --> H
H --> |Output Debug Info| I[Display Version Information]
H --> J{Versions Match?}
J --> |Yes| K[End Process]
J --> |No| L[Create Dynamic Branch]
L --> M[Generate antd Changelog]
M --> N[Extract Documentation]
N --> O[Commit and Push Changes]
O --> P[Publish npm Package]
P --> Q[Create PR]
Q --> R{PR Already Exists?}
R --> |Yes| S[Log Existing PR]
R --> |No| T[Create New PR]
S --> K
T --> K
コメント
AI アプリケーションが外部のツールやデータソースに統一的な方法で接続するためのオープンなプロトコルです。クライアントはモデルとの対話を担い、MCP サーバーはツール・リソース・プロンプトテンプレートを提供します。標準メッセージでやり取りするため、1 つのサーバーを複数のクライアントで再利用できます。
