antd-components-mcp

zhixiaoqiang/antd-components-mcp

4.2

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:

MCPHub score:4.15

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 Report
Total 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/10
    Can 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:

    ParameterDescriptionTypeDefault Value
    borderedWhether to display outer border and row borderbooleanfalse
    columnsConfiguration for the table's columnsColumn[] (see below)-
    dataSourceData source for the tableobject[]-
    loadingWhether the table is in loading statebooleanfalse
    paginationPagination settingsobjectfalse
    rowSelectionConfiguration for row selectionobject-
    expandableConfiguration for expandable rowsobject-
    onChangeCallback function triggered when pagination, sorting, or filtering changesfunction-
    Columns Configuration

    Each column in the table can have its own configuration:

    ParameterDescriptionTypeDefault Value
    titleColumn titlestring-
    dataIndexKey of data in dataSourcestring-
    keyUnique key for the columnstring-
    renderFunction to render custom content in the columnfunction(value, record, index)-
    sorterSort function for the columnfunction(a, b)-
    filtersFilter options for the columnobject[]-
    onFilterFunction to filter the data based on the selected filterfunction(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/10
    What 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 and color 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

    1. 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 of Space.Compact.
      • Improvement: Button now distinguishes between onClick event types based on the href attribute.
    2. 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.
    3. Version 5.21.0 (2024-09-22):

      • Breaking Change: Button now supports variant and color properties for more style combinations.

    Summary of Breaking Changes

    • The deprecation of Button.Group suggests users should migrate to using Space.Compact.
    • The introduction of new properties such as variant and color 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!

  • Test case 3
    Score: 1/10
    Can 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/10
    Please 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:

    1. Affix: Pin an element to the visible area.
    2. Alert: Display warning messages that require attention.
    3. Anchor: Jump to a specific position on the page.
    4. App: Provides a default environment for context consumption.
    5. AutoComplete: Input box with auto-complete functionality.
    6. Avatar: Represents users or things, supporting images, icons, or characters.
    7. Badge: A numeric badge on the top right corner of icons.
    8. Breadcrumb: Displays the current page's position in the hierarchy.
    9. Button: A button to trigger an immediate action.
    10. Calendar: Displays data in a calendar format.
    11. Card: A generic card container for various content.
    12. Carousel: A rotating carousel of items.
    13. Cascader: A cascading selection box.
    14. Checkbox: Collect multiple selections from users.
    15. Collapse: Expandable/collapsible content area.
    16. ColorPicker: Allows users to select colors.
    17. ConfigProvider: Provides global configuration for components.
    18. DatePicker: Input or select a date.
    19. Descriptions: Show multiple read-only fields.
    20. Divider: A line to separate content.
    21. Drawer: A panel that slides in from the edge of the screen.
    22. Dropdown: A list that drops down from a button or link.
    23. Empty: Placeholder for empty states.
    24. Flex: A flexible layout container for alignment.
    25. FloatButton: A floating button on the page.
    26. Form: High-performance form controls with data management.
    27. Grid: 24-grid system for layout.
    28. Icon: Semantic vector graphics.
    29. Image: Previewable images.
    30. Input: Basic input field for user content.
    31. InputNumber: Input for numeric values.
    32. Layout: Helps with overall page layout.
    33. List: Basic list display for text, images, etc.
    34. Mentions: Mention a person or thing in input.
    35. Menu: Navigation menu for pages and functions.
    36. Message: Global tips for user actions.
    37. Modal: Dialog for user interactions.
    38. Notification: Global notification messages.
    39. Pagination: Pagination component for long lists.
    40. Popconfirm: Confirm action with a pop-up.
    41. Popover: Popup card for additional information.
    42. Progress: Show the current progress of an operation.
    43. QrCode: Generate QR codes from text.
    44. Radio: Select a single option from multiple choices.
    45. Rate: Rating component for evaluations.
    46. Result: Feedback for completed tasks.
    47. Segmented: Display multiple options for selection.
    48. Select: Dropdown selector.
    49. Skeleton: Placeholder for loading content.
    50. Slider: Sliding input for selecting ranges.
    51. Space: Set spacing between components.
    52. Spin: Loading indicator.
    53. Splitter: Adjustable area division.
    54. Statistic: Display statistical values.
    55. Steps: Workflow navigation bar.
    56. Switch: Toggle between two states.
    57. Table: Display row and column data.
    58. Tabs: Tab switching component.
    59. Tag: Small tags for marking and categorizing.
    60. TimePicker: Input or select a time.
    61. Timeline: Vertical timeline for information.
    62. Tooltip: Simple text hint.
    63. Tour: Step-by-step user guide bubbles.
    64. Transfer: Dual-column selection box.
    65. Tree: Multi-level structure list.
    66. TreeSelect: Tree structure selection control.
    67. Typography: Basic text formatting.
    68. Upload: File upload control.
    69. 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/10
    What 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

    FeatureModalDrawer
    PurposeInterrupts workflow for user input or confirmationProvides supplementary content without leaving the current task
    InteractionRequires user action to dismissCan be dismissed by clicking outside or using a close button
    LayoutCentered on the screenSlides in from the side (left, right, top, or bottom)
    Use CasesCritical confirmations, formsFilters, settings, additional info
    User FlowBlocks background interactionAllows 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.