Heroicons logo

Heroicons

Community
seeyangzhi

heroicons-mcp is a Model Context Protocol (MCP) server that exposes Heroicons. It allows LLMs and agentic applications to search, list, and generate usage examples of icons in React applications.

Publisherseeyangzhi
Repositoryheroicons-mcp
LanguageTypeScript
Forks
0
Stars
0
Available tools
3
Transport typestdio, streamable-http
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    Heroicons exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 3 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    0 stars and 0 forks from the linked repository.

heroicons-mcp

Ask DeepWiki

A Model Context Protocol (MCP) server exposing Heroicons as resources and tools for LLMs and agentic applications. Built with Bun and the MCP TypeScript SDK.

What is Heroicons?

Heroicons is a popular library of hand-crafted SVG icons, designed by the makers of Tailwind CSS. The icons are available in multiple styles (Outline, Solid) and are easy to integrate into web projects.

What is MCP?

The Model Context Protocol (MCP) is a standard for AI tools to request specific context from sources outside their main training data.

This MCP server allows AI coding assistants and other agentic applications to access information about Heroicons, enabling better assistance and icon search capabilities.

Features

  • Exposes Heroicons as MCP resources (Outline and Solid styles)
  • Provides tools for searching icons by name or keywords
  • Allows listing all icons or icons within a specific style
  • Ready for integration with Claude Desktop and other MCP clients
  • Can be run as an HTTP server or a stdio-based MCP server

Prerequisites

Getting Started (Development)

1. Clone the repository

bash
git clone https://github.com/SeeYangZhi/heroicons-mcp.git
cd heroicons-mcp

2. Install Bun (if you don't have it)

Refer to the official Bun installation guide.
After installation, restart your terminal and check:

bash
bun --version

3. Install dependencies

bash
bun install

4. Build the project

This compiles the TypeScript source to JavaScript in the build directory.

bash
bun run build

Usage

HTTP Mode

You can run the HTTP server using npx:

bash
npx heroicons-mcp

This starts the HTTP server (defaults to port 3000, as defined in src/http.ts).

Or install globally:

bash
npm install -g heroicons-mcp

Then run:

bash
heroicons-mcp

Stdio Mode

bash
npx heroicons-mcp --stdio
# or if installed globally
heroicons-mcp --stdio

Local Development

There are two main ways to run the MCP server:

1. HTTP Mode

Suitable for clients that support communication over HTTP.

For development (using Bun):

bash
bun run start
# or directly
bun run src/entry.ts

This runs the server defined in src/entry.ts, which defaults to HTTP mode.

2. Stdio Mode

Often used for direct integration with tools like Claude Desktop or the MCP Inspector, communicating over standard input/output.

For development (using Bun):

bash
bun run src/entry.ts --stdio

Configuration with AI Tools

Example: Claude Desktop

To use this MCP server in Claude Desktop:

  1. Open your Claude Desktop configuration file:
bash
code ~/Library/Application\ Support/Claude/claude_desktop_config.json

(Or use your preferred editor) 2. Add the server to the mcpServers section.

Option A: via npx:

json
{
  "mcpServers": {
    "heroicons": {
      "command": "npx",
      "args": ["heroicons-mcp", "--stdio"]
    }
  }
}

Option B: Pointing directly to the build output (ensure you have built the project using bun run build):

json
{
  "mcpServers": {
    "heroicons": {
      "command": "node",
      "args": ["/ABSOLUTE/PATH/TO/heroicons-mcp/build/entry.js", "--stdio"]
    }
  }
}

Replace /ABSOLUTE/PATH/TO/heroicons-mcp/build/entry.js with the actual absolute path to your built entry.js file.

  1. Save the file and restart Claude Desktop.
  2. You should now see the "heroicons" server available in Claude's tools panel.

Note: The npx heroicons-mcp --stdio command is the recommended way for stdio mode.

Tools Available (MCP)

This MCP server exposes the following tools to AI coding assistants:

  1. list_all_icons
  • Description: Lists all available Heroicons, optionally filtered by style (outline, solid).
  • Parameters: style (optional: "outline" | "solid")
  1. search_icons
  • Description: Searches for Heroicons by name or keywords across all styles.
  • Parameters: query (string), style (optional: "outline" | "solid")
  1. get_icon_usage_examples
  • Description: Retrieves JSX example usage for a specific icon.
  • Parameters: name (string), style (string: "outline" | "solid")

Example Usage

Here's how an AI tool might use this MCP server:

  1. User asks AI tool: "Find me a 'user' icon from Heroicons, preferably the solid style."
  2. AI tool calls search_icons:
  • query: "user"
  • style: "solid"
  1. MCP server responds with a list of matching solid Heroicons (e.g., UserIcon, UserCircleIcon, UserPlusIcon).
  2. User asks tool: "Show usage example of UserIcon".
  3. AI tool calls get_icon_usage_examples:
  • name: "UserIcon"
  • style: "solid"
  1. MCP server responds with the JSX code example:
jsx
import { UserIcon } from "@heroicons/react/24/solid";

function Example() {
  return (
    <div>
      <UserIcon className="w-6 h-6 text-blue-500" />
    </div>
  );
}

Testing MCP Locally with Inspector

You can test the MCP server (stdio mode) locally using the MCP Inspector.

First, ensure the project is built:

bash
bun run build

Then launch the Inspector and connect it to your server using the node ./build/entry.js command with the --stdio flag:

bash
npx @modelcontextprotocol/inspector node ./build/entry.js --stdio

This will open the Inspector interface, allowing you to interactively test resources and tools exposed by your MCP server.

Development Scripts

  • bun run dev: Starts the server in HTTP mode for development (uses src/entry.ts).
  • bun run dev:stdio: Starts the stdio MCP server for development (uses src/entry.ts --stdio).
  • bun run build: Compiles TypeScript to JavaScript (output in build/).
  • bun run lint: Lints the codebase using ESLint.

Resources

License

MIT

Installation

TypingMind
Prerequisites:

Node.js 18+

{
  "mcpServers": {
    "heroicons": {
      "command": "npx",
      "args": [
        "heroicons-mcp",
        "--stdio"
      ]
    }
  }
}

Available Tools

  • search_icons

    Search for icons from heroicons by name or category

  • get_icon_usage_examples

    Get usage examples for an icon

  • list_all_icons

    List all icons from the heroicons library, optionally filtered by style

Use Heroicons MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once Heroicons is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. You can run MCP locally on your device or connect to a remote MCP server URL.

Option 1: Use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add Heroicons as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the Heroicons MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "heroicons": {
      "command": "npx",
      "args": [
        "-y",
        "heroicons-mcp"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the Heroicons MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the Heroicons MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Heroicons to help me with this task?
Heroicons
Sure. I read it.
Here is what I found using Heroicons.

Option 2: Add an MCP server URL

Use this when Heroicons is already hosted remotely or your team wants one shared connector that multiple users can access.

1

Open MCP connectors

In TypingMind, go to Plugins, open MCP connectors, then choose Add URL.

  1. Open TypingMind in your browser.
  2. Go to Plugins.
  3. Open MCP connectors.
  4. Click Add URL.
TypingMind Add Custom MCP Server URL form
2

Paste the server URL

Enter your server URL in the Server URL field. Add a connection name, description, icon, custom HTTP headers, or OAuth client settings if the server requires them.

  1. Paste your server URL into the Server URL field.
  2. Enter a connection name for Heroicons.
  3. Add a description and icon if you want it to be easier to identify.
  4. Add custom HTTP headers or OAuth client details if the server requires authentication.
3

Create the connection

Click Create connection, then return to the Plugins list and confirm the new MCP connection is active.

  1. Click Create connection.
  2. Return to the MCP connectors list.
  3. Confirm the Heroicons connection appears as active.
  4. Refresh the plugin list if the connection does not appear immediately.
4

Switch models without reconnecting

Start a chat with your preferred model, enable the Heroicons tools from Plugins, and switch to another model whenever needed. The MCP connection stays available to the TypingMind workspace.

  1. Start a new chat in TypingMind.
  2. Select the AI model you want to use.
  3. Enable the Heroicons tools from Plugins.
  4. Ask the model to use the tool when needed.
  5. Switch to another AI model and reuse the same MCP connection.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Heroicons to help me with this task?
Heroicons
Sure. I read it.
Here is what I found using Heroicons.

Frequently asked questions

What is the Heroicons MCP server used for?

Heroicons is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use Heroicons MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use Heroicons with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use Heroicons MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With Heroicons connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect Heroicons MCP to TypingMind?

Heroicons can be connected in TypingMind with the local MCP connector or by adding a remote MCP server URL. Use the local connector when the server needs access to files, apps, or private resources on your device, and use a server URL when the MCP server is hosted remotely.

What tools does Heroicons MCP provide in TypingMind?

Heroicons exposes 3 MCP tools that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use Heroicons MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If Heroicons requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇