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

gl-d-icon-font

v1.0.2

Published

MCP server: download iconfont.cn project assets (CSS/TTF/WOFF/WOFF2)

Readme

gl-d-icon-font

基于 Model Context Protocol 的服务端:从 iconfont.cn 下载项目压缩包,并解压出 iconfont.cssiconfont.ttficonfont.wofficonfont.woff2

实现使用官方 SDK:@modelcontextprotocol/sdk + stdio 传输,可直接被 Cursor 作为本地 MCP 进程拉起。

在 Cursor 中安装

  1. 依赖:本机需安装 Node.js 18+
  2. 配置 MCP:在 Cursor 中打开 Settings → Tools & MCP,点击 Add new global MCP server,或编辑配置文件(见下)。
  3. 环境变量:必须配置 EGG_SESS_ICONFONT(你在浏览器登录 iconfont.cn 后的 Cookie,用于调用下载接口)。

配置文件位置

  • 用户级(推荐)%USERPROFILE%\.cursor\mcp.json(Windows)或 ~/.cursor/mcp.json(macOS / Linux)
  • 项目级:仓库根目录下的 .cursor/mcp.json(可与用户级合并;同名服务器以项目级为准)

修改配置后建议完全重启 Cursor 再试。

示例:使用本仓库源码(开发 / 本地路径)

command / args 中的路径换成你本机克隆后的 绝对路径

{
  "mcpServers": {
    "iconfont": {
      "command": "node",
      "args": [
        "C:/Users/GL/.cursor/skills/figma-generate-component/mcp-server/index.js"
      ],
      "env": {
        "EGG_SESS_ICONFONT": "你的_iconfont_Cookie"
      }
    }
  }
}

示例:全局安装后使用 gl-d-icon-font 命令

npm install -g .
{
  "mcpServers": {
    "iconfont": {
      "command": "gl-d-icon-font",
      "args": [],
      "env": {
        "EGG_SESS_ICONFONT": "你的_iconfont_Cookie"
      }
    }
  }
}

示例:不全局安装,用 npx 跑当前目录包(需已 npm install

{
  "mcpServers": {
    "iconfont": {
      "command": "npx",
      "args": ["gl-d-icon-font"],
      "cwd": "C:/path/to/mcp-server",
      "env": {
        "EGG_SESS_ICONFONT": "你的_iconfont_Cookie"
      }
    }
  }
}

若包名未发布到 npm,请将 args 改为 [".", "gl-d-icon-font"] 并把 cwd 指向本仓库根目录(依赖本地 node_modules)。

提供的工具

| 名称 | 说明 | |------|------| | downloadIconfont | 参数:pid(项目 ID)、outputDir(输出目录)。下载并解压字体相关文件到该目录。 |

环境变量

| 变量 | 说明 | |------|------| | EGG_SESS_ICONFONT | 必填。iconfont.cn 请求下载接口时使用的 Cookie。 |

输出文件

成功后在 outputDir 中生成:

  • iconfont.css
  • iconfont.ttf
  • iconfont.woff
  • iconfont.woff2