Skip to main content
Glama

antd-components-mcp

get-component-docs.ts879 B
import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { z } from "zod"; import { getComponentDocumentation } from "../utils/components"; /** 获取组件文档 */ const registryTool = (server: McpServer) => { server.tool( "get-component-docs", `获取 Ant Design 特定组件的详细文档 适用场景: 1. 用户询问如何使用特定组件 2. 用户需要查看该组件的 api 属性`, { componentName: z.string() }, async ({ componentName }) => { const documentation = await getComponentDocumentation(componentName); return { content: [ { type: "text", text: `${componentName} 组件的文档: ${documentation} 如有版本说明需要提醒用户需要使用某个版本及以上的版本`, }, ], }; }, ); } export default registryTool;

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/zhixiaoqiang/antd-components-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server