npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ant-mobile-components-mcp

v1.0.4

Published

Ant Mobile 组件库知识 MCP 服务,为大模型提供组件文档查询功能

Readme

Ant Mobile 组件库知识 MCP 服务

这是一个基于 Model Context Protocol (MCP) 的 Ant Mobile 组件库知识服务,为大模型提供组件文档查询功能。

功能特性

  • 🚀 快速启动: 通过 npx 命令一键启动
  • 📚 组件文档: 提供 Ant Mobile 组件的详细文档
  • 🔍 智能查询: 根据组件名称快速获取文档内容
  • 💡 MCP 协议: 标准化的大模型工具协议支持
  • 🛠️ TypeScript: 完全使用 TypeScript 开发,类型安全
  • 📦 NPM 发布: 支持发布到 npm 仓库

安装使用

通过 npx 直接使用

npx ant-mobile-components-mcp

全局安装

npm install -g ant-mobile-components-mcp
ant-mobile-components-mcp

开发指南

本地开发

  1. 克隆项目

    git clone <your-repo-url>
    cd ant-mobile-components-mcp
  2. 安装依赖

    npm install
  3. 编译项目

    npm run build
  4. 启动服务

    npm start

添加组件文档

knowledge 文件夹下添加对应的 .md 文件:

knowledge/
├── Button.md          # 按钮组件文档
├── Input.md           # 输入框组件文档
├── List.md            # 列表组件文档
└── YourComponent.md   # 您的组件文档

文档文件命名规范:

  • 文件名使用 PascalCase(首字母大写的驼峰命名)
  • 如:Button.mdDatePicker.mdActionSheet.md

MCP 工具说明

本服务提供以下 MCP 工具:

1. get_ant_mobile_component_doc

获取指定组件的文档内容。

参数:

  • componentName (string): 组件名称,如 "Button"、"Input" 等

示例:

{
  "name": "get_ant_mobile_component_doc",
  "arguments": {
    "componentName": "Button"
  }
}

2. list_ant_mobile_components

列出所有可用的组件。

参数:

示例:

{
  "name": "list_ant_mobile_components",
  "arguments": {}
}

项目结构

ant-mobile-components-mcp/
├── src/
│   └── index.ts           # MCP 服务主程序
├── knowledge/             # 组件文档存储目录
│   ├── Button.md         # 按钮组件文档
│   ├── Input.md          # 输入框组件文档
│   └── List.md           # 列表组件文档
├── dist/                 # 编译后的文件
├── package.json          # 项目配置
├── tsconfig.json         # TypeScript 配置
└── README.md            # 项目说明

API 文档

AntMobileMcpServer 类

主服务类,负责处理 MCP 协议通信和组件文档查询。

主要方法

  • getComponentDoc(componentName: string): 获取组件文档
  • listComponents(): 列出所有组件
  • start(): 启动 MCP 服务

技术栈

  • TypeScript: 类型安全的 JavaScript 超集
  • Node.js: JavaScript 运行时环境
  • @modelcontextprotocol/sdk: MCP 协议 SDK
  • stdio: 标准输入输出通信

贡献指南

  1. Fork 本项目
  2. 创建特性分支 (git checkout -b feature/AmazingFeature)
  3. 提交更改 (git commit -m 'Add some AmazingFeature')
  4. 推送到分支 (git push origin feature/AmazingFeature)
  5. 创建 Pull Request

许可证

本项目使用 MIT 许可证。详见 LICENSE 文件。

支持

如果您在使用过程中遇到问题,请:

  1. 查看本 README 文档
  2. 检查 knowledge 文件夹中是否有对应的组件文档
  3. 提交 Issue 到项目仓库

更新日志

v1.0.0

  • 🎉 初始版本发布
  • ✅ 支持 MCP 协议
  • ✅ 组件文档查询功能
  • ✅ TypeScript 支持
  • ✅ NPM 包发布支持