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

idata-ui-mcp

v0.0.3

Published

MCP server for idata-ui component library - list and install UI components from GitLab

Readme

idata-ui MCP Server

将 idata-ui 组件库的查询和安装能力暴露为 MCP 工具,供 Claude Code 等 AI 编码助手直接调用。

功能

| 工具 | 描述 | |------|------| | list_components | 列出组件库中所有可用组件(名称、描述、依赖) | | add_component | 安装指定组件到项目,自动递归安装前置依赖组件 |

快速开始

1. 安装依赖

cd mcp
npm install

2. 配置 Claude Code

在项目根目录的 .claude/settings.json 中添加 MCP 配置:

{
  "mcpServers": {
    "idata-ui": {
      "command": "node",
      "args": ["mcp/src/index.js"],
      "env": {
        "GITLAB_PRIVATE_TOKEN": "your-gitlab-token-here"
      }
    }
  }
}

3. 使用

在 Claude Code 中直接告诉 AI:

  • "列出所有可用的 UI 组件"
  • "安装 base-table 组件"

环境变量

| 变量 | 必需 | 默认值 | 说明 | |------|------|--------|------| | GITLAB_PRIVATE_TOKEN | ✅ | — | GitLab 私有访问令牌 | | GITLAB_BASE_URL | ❌ | http://git.idata.wk | GitLab 实例地址(不含末尾斜杠) | | GITLAB_PROJECT_ID | ❌ | 903 | 组件库项目的数字 ID | | GITLAB_BRANCH | ❌ | master | 组件库所在分支 | | NODE_TLS_REJECT_UNAUTHORIZED | ❌ | — | 设为 0 可跳过 TLS 验证(仅用于自签名证书环境) |

TLS 证书问题

如果 GitLab 使用自签名 HTTPS 证书导致连接失败,在 MCP 配置的 env 中添加:

{
  "env": {
    "GITLAB_PRIVATE_TOKEN": "your-token",
    "NODE_TLS_REJECT_UNAUTHORIZED": "0"
  }
}

⚠️ 仅在内网可信环境中使用此配置。

组件安装路径

组件文件会安装到以下路径(相对于调用 MCP 时的工作目录):

  • 普通组件:src/idata-ui/components/<组件名>/index.vue
  • 模块组件:src/idata-ui/modules/<文件名>

获取 GitLab Token

  1. 登录 GitLab → 右上角头像 → Preferences
  2. 左侧菜单 → Access Tokens
  3. 创建 Token,勾选 read_repository 权限

发布npm

# 第一步:
npm login --registry=http://nexus.idata.wk/repository/npm-hosted/

# 第二步
npm publish