zhixiaoqiang/antd-components-mcp
antd-components-mcp is hosted online, so all tools can be tested directly either in theInspector tabor in theOnline Client.
If you are the rightful owner of antd-components-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
A Model Context Protocol (MCP) server that provides Ant Design component documentation to large language models (LLMs) like Claude.
Try antd-components-mcp with chat:
Has a README
Github repo has a README.md.
Has a License
Github repo has license info.
Server can be inspected
View server inspector
Server schema can be extracted
Can get at lease one tool info from the README or server.
Online hosted on MCPHub
Can be automatically deployed by MCPHub.
Has social accounts
Do not have any social accounts.
Claimed by the author or certified by MCPHub
If you are the author, claim authorship
AI Evaluation ReportTotal Score: 9/10
The agent demonstrates a strong ability to provide detailed and accurate information on Ant Design components, including documentation, changelogs, and usage examples. It effectively addresses user queries with comprehensive responses, showcasing its strengths in retrieving relevant data and presenting it clearly. However, the agent encountered a failure when attempting to explain the Grid system, indicating a limitation in handling certain requests or potential server issues. Despite this, the agent consistently delivers high-quality answers for most tasks, reflecting its overall competence in the domain.
Test case 1
Score: 10/10Can you provide detailed documentation for the Ant Design Table component, including its API properties and usage examples?Ant Design Table Component Documentation
Overview
The Ant Design Table component is a versatile and powerful data display tool. It is used for rendering large datasets in a structured format, allowing for features such as sorting, filtering, pagination, and expandable rows.
When to Use
- To display a large dataset in a structured format.
- When you need to perform operations like sorting, filtering, pagination, and expandable rows on the data.
Basic Usage Example
Here's a simple example of how to use the Table component:
import React from 'react'; import { Table } from 'antd'; const dataSource = [ { key: '1', name: 'John Brown', age: 32, address: 'New York No. 1 Lake Park', }, { key: '2', name: 'Jim Green', age: 42, address: 'London No. 1 Lake Park', }, ]; const columns = [ { title: 'Name', dataIndex: 'name', key: 'name', }, { title: 'Age', dataIndex: 'age', key: 'age', }, { title: 'Address', dataIndex: 'address', key: 'address', }, ]; const App = () => <Table dataSource={dataSource} columns={columns} />; export default App;
API Properties
The Table component supports a variety of properties. Here are some of the key API properties:
Parameter Description Type Default Value bordered Whether to display outer border and row border boolean false columns Configuration for the table's columns Column[]
(see below)- dataSource Data source for the table object[]
- loading Whether the table is in loading state boolean false pagination Pagination settings object false
rowSelection Configuration for row selection object - expandable Configuration for expandable rows object - onChange Callback function triggered when pagination, sorting, or filtering changes function - Columns Configuration
Each column in the table can have its own configuration:
Parameter Description Type Default Value title Column title string - dataIndex Key of data in dataSource string - key Unique key for the column string - render Function to render custom content in the column function(value, record, index) - sorter Sort function for the column function(a, b) - filters Filter options for the column object[] - onFilter Function to filter the data based on the selected filter function(value, record) - Advanced Usage Example
Hereâs an advanced example that includes sorting and filtering:
import React from 'react'; import { Table } from 'antd'; const dataSource = [ { key: '1', name: 'John Brown', age: 32, address: 'New York No. 1 Lake Park', }, { key: '2', name: 'Jim Green', age: 42, address: 'London No. 1 Lake Park', }, ]; const columns = [ { title: 'Name', dataIndex: 'name', key: 'name', sorter: (a, b) => a.name.length - b.name.length, filters: [ { text: 'Jim', value: 'Jim' }, { text: 'John', value: 'John' }, ], onFilter: (value, record) => record.name.includes(value), }, { title: 'Age', dataIndex: 'age', key: 'age', sorter: (a, b) => a.age - b.age, }, { title: 'Address', dataIndex: 'address', key: 'address', }, ]; const App = () => ( <Table dataSource={dataSource} columns={columns} pagination={{ pageSize: 5 }} /> ); export default App;
Summary
The Ant Design Table component is a powerful tool for displaying and interacting with data. It allows for a great deal of customization and functionality, making it suitable for a wide range of applications. The combination of sorting, filtering, and pagination enables users to effectively manage and analyze large sets of data.
For more detailed information, you can check the Ant Design Table documentation.
Test case 2
Score: 10/10What are the recent changes in the Button component across the last three versions of Ant Design? Please include any breaking changes or new features.Here are the recent changes to the Button component in Ant Design across the last three versions:
Version 5.26.1 (2025-06-16)
- Bug Fix: Resolved an issue where the
loading
state could trigger multiple click events on low-end devices.
Version 5.25.0 (2025-05-07)
- New Feature: ConfigProvider now supports setting the
variant
andcolor
properties for the Button component.
Version 5.24.2 (2025-02-24)
- Bug Fix: Fixed the styling for Button in hyperlink mode.
Notable Changes in Prior Versions
-
Version 5.24.0 (2025-02-11):
- Bug Fix: Corrected the shadow color display for preset buttons on dark backgrounds.
- Breaking Change: Deprecated
Button.Group
in favor ofSpace.Compact
. - Improvement: Button now distinguishes between
onClick
event types based on thehref
attribute.
-
Version 5.23.0 (2025-01-06):
- New Feature: Added support for complete color palettes via the
color
property. - New Feature: Introduced
loading={{ icon: ReactNode }}
for custom loading icons.
- New Feature: Added support for complete color palettes via the
-
Version 5.21.0 (2024-09-22):
- Breaking Change: Button now supports
variant
andcolor
properties for more style combinations.
- Breaking Change: Button now supports
Summary of Breaking Changes
- The deprecation of
Button.Group
suggests users should migrate to usingSpace.Compact
. - The introduction of new properties such as
variant
andcolor
allows for enhanced customization but requires users to adapt their existing styles if they were relying on previous implementations.
These changes reflect ongoing improvements in usability and flexibility while addressing bugs and enhancing the overall functionality of the Button component. If you need further details or specific examples of how to implement these changes, feel free to ask!
- Bug Fix: Resolved an issue where the
Test case 3
Score: 1/10Can you explain how to implement responsive layouts using Ant Design's Grid system (Row and Col components)? Please include examples for different screen sizes and how to handle mobile, tablet, and desktop layouts.Request failed with status code: 504
Test case 4
Score: 8/10Please list all available Ant Design components that support theming and customization through the ConfigProvider.Here are the available Ant Design components that support theming and customization through the
ConfigProvider
:- Affix: Pin an element to the visible area.
- Alert: Display warning messages that require attention.
- Anchor: Jump to a specific position on the page.
- App: Provides a default environment for context consumption.
- AutoComplete: Input box with auto-complete functionality.
- Avatar: Represents users or things, supporting images, icons, or characters.
- Badge: A numeric badge on the top right corner of icons.
- Breadcrumb: Displays the current page's position in the hierarchy.
- Button: A button to trigger an immediate action.
- Calendar: Displays data in a calendar format.
- Card: A generic card container for various content.
- Carousel: A rotating carousel of items.
- Cascader: A cascading selection box.
- Checkbox: Collect multiple selections from users.
- Collapse: Expandable/collapsible content area.
- ColorPicker: Allows users to select colors.
- ConfigProvider: Provides global configuration for components.
- DatePicker: Input or select a date.
- Descriptions: Show multiple read-only fields.
- Divider: A line to separate content.
- Drawer: A panel that slides in from the edge of the screen.
- Dropdown: A list that drops down from a button or link.
- Empty: Placeholder for empty states.
- Flex: A flexible layout container for alignment.
- FloatButton: A floating button on the page.
- Form: High-performance form controls with data management.
- Grid: 24-grid system for layout.
- Icon: Semantic vector graphics.
- Image: Previewable images.
- Input: Basic input field for user content.
- InputNumber: Input for numeric values.
- Layout: Helps with overall page layout.
- List: Basic list display for text, images, etc.
- Mentions: Mention a person or thing in input.
- Menu: Navigation menu for pages and functions.
- Message: Global tips for user actions.
- Modal: Dialog for user interactions.
- Notification: Global notification messages.
- Pagination: Pagination component for long lists.
- Popconfirm: Confirm action with a pop-up.
- Popover: Popup card for additional information.
- Progress: Show the current progress of an operation.
- QrCode: Generate QR codes from text.
- Radio: Select a single option from multiple choices.
- Rate: Rating component for evaluations.
- Result: Feedback for completed tasks.
- Segmented: Display multiple options for selection.
- Select: Dropdown selector.
- Skeleton: Placeholder for loading content.
- Slider: Sliding input for selecting ranges.
- Space: Set spacing between components.
- Spin: Loading indicator.
- Splitter: Adjustable area division.
- Statistic: Display statistical values.
- Steps: Workflow navigation bar.
- Switch: Toggle between two states.
- Table: Display row and column data.
- Tabs: Tab switching component.
- Tag: Small tags for marking and categorizing.
- TimePicker: Input or select a time.
- Timeline: Vertical timeline for information.
- Tooltip: Simple text hint.
- Tour: Step-by-step user guide bubbles.
- Transfer: Dual-column selection box.
- Tree: Multi-level structure list.
- TreeSelect: Tree structure selection control.
- Typography: Basic text formatting.
- Upload: File upload control.
- Watermark: Add a watermark to a page area.
These components are designed to integrate with the
ConfigProvider
for consistent theming and configuration across your Ant Design application.Test case 5
Score: 10/10What are the differences between the Modal and Drawer components in Ant Design? Can you provide examples of when to use each one in a real-world application?The Modal and Drawer components in Ant Design serve different purposes and are used in different contexts. Hereâs a detailed comparison of the two, including their use cases and examples:
1. Overview of Modal and Drawer
Modal
- Description: A Modal is a dialog that interrupts the user's workflow to capture input or provide information. It is typically used for critical tasks that require user acknowledgment or action.
- Use Cases:
- Confirming actions (e.g., delete confirmations, form submissions).
- Displaying important messages (e.g., errors, success notifications).
- Presenting forms that require user input without navigating away from the current page.
Drawer
- Description: A Drawer is a panel that slides in from the side of the screen, allowing users to interact with additional content without leaving the current page. It is less intrusive than a modal.
- Use Cases:
- Displaying filters or additional settings without interrupting the main workflow.
- Presenting supplementary information, such as details for a selected item.
- Providing navigation options or secondary content that enhances the current task.
2. Key Differences
Feature Modal Drawer Purpose Interrupts workflow for user input or confirmation Provides supplementary content without leaving the current task Interaction Requires user action to dismiss Can be dismissed by clicking outside or using a close button Layout Centered on the screen Slides in from the side (left, right, top, or bottom) Use Cases Critical confirmations, forms Filters, settings, additional info User Flow Blocks background interaction Allows interaction with the background content 3. When to Use Each Component
Examples of Using Modal
-
Confirm Deletion: When a user clicks a delete button, display a modal asking for confirmation.
import { Modal, Button } from 'antd'; const confirmDelete = () => { Modal.confirm({ title: 'Are you sure you want to delete this item?', onOk() { // Handle deletion }, }); }; return <Button onClick={confirmDelete}>Delete</Button>;
-
Form Submission: When submitting a form that requires user input, show a modal with the form fields.
const showFormModal = () => { Modal.info({ title: 'Submit Your Details', content: ( <form> {/* Form fields here */} </form> ), }); };
Examples of Using Drawer
-
Filter Options: Allow users to filter items in a list without navigating away from the list view.
import { Drawer, Button } from 'antd'; const [visible, setVisible] = useState(false); const showDrawer = () => { setVisible(true); }; const onClose = () => { setVisible(false); }; return ( <> <Button type="primary" onClick={showDrawer}> Open Filter </Button> <Drawer title="Filter Options" placement="right" onClose={onClose} visible={visible}> {/* Filter content here */} </Drawer> </> );
-
Details Sidebar: Display additional information about a selected item in a side drawer.
Conclusion
- Modals are best for actions or confirmations that require immediate attention or input, and they interrupt the user's workflow.
- Drawers are suited for displaying additional content or options that enhance the current task without obstructing the main user interface.
By understanding the context of use for each component, you can choose the right one based on your application's needs.