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

@liangshanli/mcp-server-iconfont

v1.0.1

Published

Minimal MCP server: search iconfont.cn by a keyword and return SVG list

Downloads

40

Readme

MCP Iconfont Server

A minimal MCP server that searches iconfont.cn by a single keyword and returns the matching icons together with their SVG markup. Designed to be easy for an AI model to call: one keyword in, a small paginated list of SVGs out.

Version History

v1.0.1 (Latest)

  • Pagination: Fixed page size of 10 icons per page; use the page parameter to fetch more
  • Richer Result: Response now includes page, pageSize, total, totalPages, count
  • Docs: Installation and editor-integration guide

v1.0.0

  • ✅ Initial release
  • ✅ Single search_icons tool
  • ✅ SVG markup returned per icon

Features

  • ✅ Single-keyword icon search against iconfont.cn
  • ✅ Returns ready-to-use SVG markup for each icon
  • ✅ Fixed page size (10 per page) for fast model selection
  • ✅ Pagination metadata (total, totalPages, page)
  • ✅ Zero runtime dependencies (uses Node.js built-in fetch)
  • ✅ Stdio JSON-RPC transport, works with any MCP client

Requirements

  • Node.js >= 18 (uses the built-in fetch API)

Installation

Global Installation (Recommended)

npm install -g @liangshanli/mcp-server-iconfont

Local Installation

npm install @liangshanli/mcp-server-iconfont

From Source

git clone https://github.com/liliangshan/mcp-server-iconfont.git
cd mcp-server-iconfont
npm install

Usage

1. Direct Run (Global Installation)

mcp-server-iconfont

2. Using npx (Recommended)

npx @liangshanli/mcp-server-iconfont

3. Direct Start (Source Installation)

npm start

Editor Integration

Cursor Editor Configuration

Create a .cursor/mcp.json file in your project root:

{
  "mcpServers": {
    "iconfont": {
      "command": "npx",
      "args": ["@liangshanli/mcp-server-iconfont"]
    }
  }
}

VS Code Configuration

Create a .vscode/mcp.json file (or add to your MCP client config):

{
  "mcpServers": {
    "iconfont": {
      "command": "npx",
      "args": ["@liangshanli/mcp-server-iconfont"]
    }
  }
}

Claude Code / Generic MCP Client

{
  "mcpServers": {
    "iconfont": {
      "command": "npx",
      "args": ["@liangshanli/mcp-server-iconfont"]
    }
  }
}

Tools

search_icons

Search icons from iconfont.cn by a single keyword. Returns 10 icons per page with their SVG markup; use the page parameter to fetch more.

| Param | Type | Required | Default | Description | | --------- | ------ | -------- | ------- | ------------------------------------------------------- | | keyword | string | yes | — | Single keyword to search iconfont.cn against. | | page | number | no | 1 | Page number, starting from 1. Always 10 icons per page. |

Returns JSON text:

{
  "page": 1,
  "pageSize": 10,
  "total": 17131,
  "totalPages": 1714,
  "count": 10,
  "icons": [
    { "id": 123, "name": "home-2", "svg": "<svg ...>...</svg>" }
  ]
}

| Field | Description | | ------------ | ------------------------------------------------ | | page | Current page number. | | pageSize | Icons per page (fixed at 10). | | total | Total number of matching icons on iconfont.cn. | | totalPages | Total number of pages (ceil(total / 10)). | | count | Number of icons actually returned on this page. | | icons | Array of { id, name, svg } objects. |

How It Works

  1. The client calls the search_icons tool with a keyword (and optional page).
  2. The server POSTs the query to the iconfont.cn search API.
  3. Each returned icon's show_svg (fallback icon) field is extracted as SVG.
  4. The server replies with a paginated list of { id, name, svg } objects.

Environment Variables

| Variable | Default | Description | | --------------------- | ------- | --------------------- | | ICON_SEARCH_TIMEOUT | 30000 | Request timeout (ms). |

Project Structure

mcp-server-iconfont/
├── bin/
│   └── cli.js          # CLI entry point
├── src/
│   └── server.js       # MCP server (stdio JSON-RPC)
├── package.json
└── README.md

License

MIT © liliangshan