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

naive-ui-mcp

v1.0.2

Published

naive-ui的mcp服务

Readme

🧩 naive-ui-mcp

Naive UI 的 MCP (Model Context Protocol) 文档服务

让 AI 编码助手能够直接查阅 Naive UI 的组件文档和示例代码

npm version License: MIT MCP


✨ 功能特性

| 工具 | 说明 | |:---|:---| | list_components | 列出 Naive UI 的组件 | | list_examples | 查看某个组件的所有示例标题与说明 | | get_example | 获取指定示例的完整 Vue 代码,支持模糊匹配 | | get_api | 获取组件的 API 文档(Props / Slots / Events) |

🚀 快速开始

安装

npm install -g naive-ui-mcp
# 或
pnpm add -g naive-ui-mcp

配置`Claude Code

claude mcp add navie-ui-mcp -- npx -y naive-ui-mcp

配置 Cursor / VS Code

.cursor/mcp.json 或 VS Code settings 中:

{
  "mcpServers": {
    "naive-ui": {
      "command": "naive-ui-mcp"
    }
  }
}

配置完成后,AI 助手即可自动调用 Naive UI 文档工具。

💡 使用示例

配置好后,你可以直接在对话中这样问:

  • "帮我用 Naive UI 写一个带搜索的下拉选择器"
  • "NButton 有哪些 Props?"
  • "给我一个 Data Table 的分页示例"

AI 会自动调用 MCP 工具查阅文档并生成准确的代码。

📦 技术栈

  • 运行时: Node.js
  • 构建工具: Rolldown
  • MCP SDK: @modelcontextprotocol/sdk
  • Schema 验证: Zod
  • 测试: Vitest

🛠 开发

# 克隆项目
git clone https://github.com/your-username/naive-ui-mcp.git
cd naive-ui-mcp

# 安装依赖
pnpm install

# 从 naive-ui 文档提取最新内容
pnpm extract

# 运行测试
pnpm test

# 一键提取 + 测试
pnpm generate

# 构建产物
pnpm build

项目结构

naive-ui-mcp/
├── src/
│   └── index.ts          # MCP 服务入口
├── scripts/
│   └── extract-docs.ts   # 文档提取脚本
├── references/            # 组件文档(自动生成)
│   ├── button/
│   │   ├── api.md        # API 文档
│   │   └── demo.md       # 示例代码
│   ├── input/
│   ├── select/
│   └── ...               # 100+ 组件
├── tests/
│   └── docs.test.ts      # 测试用例
├── rolldown.config.ts     # 构建配置
└── package.json