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

heroicons-svg-mcp

v1.0.2

Published

MCP server for listing, searching and retrieving Heroicons as SVG

Readme

heroicons-svg-mcp

An MCP server that provides Heroicons as SVG.

This server lets MCP clients (for example Claude , Cline, or Codex) easily:

  • list icons by style,
  • search icons by name or keywords,
  • retrieve the full SVG source of a specific icon.

Features

  • Uses Heroicons 2.x from the heroicons npm package.
  • Supported styles:
    • outline (24x24)
    • solid (24x24)
    • mini (20x20)
    • micro (16x16)
  • Built-in caching for faster performance:
    • icon name cache,
    • icon file path cache,
    • SVG content cache.
  • Verbose error messages when input is invalid or an icon cannot be resolved.
  • Covered by tests (vitest).

Requirements

  • Node.js 18+
  • npm

Running

The server uses stdio MCP transport, so your MCP client should launch it with:

npx -y heroicons-svg-mcp@latest

Claude Code example

Add this to your Claude Code MCP config:

{
  "mcpServers": {
    "heroicons-svg": {
      "command": "npx",
      "args": ["-y", "heroicons-svg-mcp@latest"]
    }
  }
}

Cursor example

Add this to your Cursor MCP config (for example .cursor/mcp.json):

{
  "mcpServers": {
    "heroicons-svg": {
      "command": "npx",
      "args": ["-y", "heroicons-svg-mcp@latest"]
    }
  }
}

Codex-style TOML example:

[mcp_servers.heroicons-svg]
command = "npx"
args = ["-y", "heroicons-svg-mcp@latest"]

Available Tools

list_icons

Description: lists all available Heroicons, optionally filtered by style.

Input:

  • style (optional): outline | solid | mini | micro

Example input:

{
  "style": "outline"
}

Response:

  • content[0].text: human-readable text output.
  • structuredContent:
    • icons: { name, style }[]
    • iconsByStyle: icon names grouped by style
    • styles: included styles
    • total: total number of icon variants

search_icons

Description: searches Heroicons by name or keywords, optionally filtered by style.

Input:

  • query (required): search text
  • style (optional): outline | solid | mini | micro

Example input:

{
  "query": "arrow right",
  "style": "mini"
}

Response:

  • content[0].text: human-readable match list.
  • structuredContent:
    • icons: { name, style, score }[] (ranked matches)
    • query: normalized search query
    • styles: included styles
    • total: total match count

retrieve_icon

Description: retrieves the full SVG source for an icon.

Input:

  • name (required): icon name (for example academic-cap)
  • style (required): outline | solid | mini | micro

Example input:

{
  "name": "academic-cap",
  "style": "outline"
}

Response:

  • content[0].text: full valid SVG markup (<svg ...>...</svg>)
  • structuredContent:
    • name
    • style
    • svg (same SVG source)

Development

Run tests:

npm test

Run tests with coverage:

npm run test:coverage

Watch mode:

npm run test:watch

Project Structure

  • index.js: CLI bootstrap entrypoint.
  • src/server.js: MCP server creation and tool registration.
  • src/icons.js: icon logic, search, retrieve, caching.
  • tests/icons.unit.test.mjs: unit tests.
  • tests/server.integration.test.mjs: MCP server integration tests.
  • tests/index.bootstrap.test.mjs: CLI/bootstrap behavior tests.

Error Handling

Typical error cases:

  • unsupported style value,
  • missing or invalid name,
  • icon not found in the specified style.

The server returns verbose, actionable errors so MCP clients can surface clear feedback.

Examples:

  • Unsupported style "foo". Supported styles: outline, solid, mini, micro.
  • Invalid icon name "...".
  • Icon "academic-cap" not found in style "mini".

License

  • Project: MIT
  • Heroicons: MIT