Skip to main content
Glama

heroicons-mcp

Ein Model Context Protocol (MCP) -Server, der Heroicons als Ressourcen und Tools für LLMs und Agentenanwendungen bereitstellt. Erstellt mit Bun und dem MCP TypeScript SDK.

Was sind Heroicons?

Heroicons ist eine beliebte Bibliothek handgefertigter SVG-Symbole, die von den Machern von Tailwind CSS entwickelt wurden. Die Symbole sind in verschiedenen Stilen (Outline, Solid) verfügbar und lassen sich problemlos in Webprojekte integrieren.

Related MCP server: SupaUI MCP Server

Was ist MCP?

Das Model Context Protocol (MCP) ist ein Standard für KI-Tools, um spezifischen Kontext von Quellen außerhalb ihrer Haupttrainingsdaten anzufordern.

Dieser MCP-Server ermöglicht KI-Codierungsassistenten und anderen Agentenanwendungen den Zugriff auf Informationen zu Heroicons und ermöglicht so eine bessere Unterstützung und Symbolsuchfunktionen.

Merkmale

  • Stellt Heroicons als MCP-Ressourcen bereit (Outline- und Solid-Stile)

  • Bietet Tools zum Suchen von Symbolen nach Namen oder Schlüsselwörtern

  • Ermöglicht die Auflistung aller Symbole oder Symbole innerhalb eines bestimmten Stils

  • Bereit zur Integration mit Claude Desktop und anderen MCP-Clients

  • Kann als HTTP-Server oder stdio-basierter MCP-Server ausgeführt werden

Voraussetzungen

Erste Schritte (Entwicklung)

1. Klonen Sie das Repository

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

2. Installieren Sie Bun (falls Sie es nicht haben)

Weitere Informationen finden Sie in der offiziellen Installationsanleitung von Bun .
Starten Sie Ihr Terminal nach der Installation neu und überprüfen Sie:

bun --version

3. Abhängigkeiten installieren

bun install

4. Erstellen Sie das Projekt

Dadurch wird die TypeScript-Quelle im build -Verzeichnis in JavaScript kompiliert.

bun run build

Verwendung

HTTP-Modus

Sie können den HTTP-Server mit npx ausführen:

npx heroicons-mcp

Dadurch wird der HTTP-Server gestartet (standardmäßig Port 3000, wie in src/http.ts definiert).

Oder global installieren:

npm install -g heroicons-mcp

Führen Sie dann Folgendes aus:

heroicons-mcp

Stdio-Modus

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

Lokale Entwicklung

Es gibt zwei Hauptmethoden zum Ausführen des MCP-Servers:

1. HTTP-Modus

Geeignet für Clients, die die Kommunikation über HTTP unterstützen.

Zur Entwicklung (mit Bun):

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

Dadurch wird der in src/entry.ts definierte Server ausgeführt, der standardmäßig im HTTP-Modus ist.

2. Stdio-Modus

Wird häufig für die direkte Integration mit Tools wie Claude Desktop oder MCP Inspector verwendet und kommuniziert über Standard-Eingabe/Ausgabe.

Zur Entwicklung (mit Bun):

bun run src/entry.ts --stdio

Konfiguration mit KI-Tools

Beispiel: Claude Desktop

So verwenden Sie diesen MCP-Server in Claude Desktop :

  1. Öffnen Sie Ihre Claude Desktop-Konfigurationsdatei:

code ~/Library/Application\ Support/Claude/claude_desktop_config.json

(Oder verwenden Sie Ihren bevorzugten Editor) 2. Fügen Sie den Server zum Abschnitt mcpServers hinzu.

Option A: über npx :

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

Option B: Direkt auf die Build-Ausgabe verweisen (stellen Sie sicher, dass Sie das Projekt mit bun run build erstellt haben):

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

Ersetzen Sie /ABSOLUTE/PATH/TO/heroicons-mcp/build/entry.js durch den tatsächlichen absoluten Pfad zu Ihrer erstellten entry.js Datei.

  1. Speichern Sie die Datei und starten Sie Claude Desktop neu.

  2. Sie sollten jetzt den „Heroicons“-Server in Claudes Werkzeugleiste sehen.

Hinweis: Für den Standarddiomodus wird der Befehl npx heroicons-mcp --stdio empfohlen.

Verfügbare Tools (MCP)

Dieser MCP-Server stellt KI-Codierungsassistenten die folgenden Tools zur Verfügung:

  1. Liste aller Symbole

  • Beschreibung: Listet alle verfügbaren Heroicons auf, optional gefiltert nach Stil (Umriss, durchgezogen).

  • Parameter: style (optional: „Umriss“ | „durchgezogen“)

  1. Suchsymbole

  • Beschreibung: Sucht nach Heroicons nach Namen oder Schlüsselwörtern in allen Stilen.

  • Parameter: query (Zeichenfolge), style (optional: „Umriss“ | „durchgezogen“)

  1. get_icon_usage_examples

  • Beschreibung: Ruft die JSX-Beispielverwendung für ein bestimmtes Symbol ab.

  • Parameter: name (Zeichenfolge), style (Zeichenfolge: „Umriss“ | „durchgezogen“)

Beispielverwendung

So könnte ein KI-Tool diesen MCP-Server verwenden:

  1. Der Benutzer fragt das KI-Tool : „Suchen Sie mir ein ‚Benutzer‘-Symbol von Heroicons, vorzugsweise im einfarbigen Stil.“

  2. KI-Tool ruft search_icons auf :

  • query : "Benutzer"

  • style : "solide"

  1. Der MCP-Server antwortet mit einer Liste passender fester Heroicons (z. B. UserIcon , UserCircleIcon , UserPlusIcon ).

  2. Der Benutzer fragt das Tool : „Zeigen Sie ein Anwendungsbeispiel für das Benutzersymbol.“

  3. KI-Tool ruft get_icon_usage_examples auf :

  • name : "Benutzersymbol"

  • style : "solide"

  1. Der MCP-Server antwortet mit dem JSX-Codebeispiel:

import { UserIcon } from "@heroicons/react/24/solid";

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

MCP lokal mit Inspector testen

Sie können den MCP-Server (Standardmodus) lokal mit dem MCP Inspector testen.

Stellen Sie zunächst sicher, dass das Projekt erstellt ist:

bun run build

Starten Sie dann den Inspector und verbinden Sie ihn mit Ihrem Server, indem Sie den Befehl node ./build/entry.js mit dem Flag --stdio verwenden:

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

Dadurch wird die Inspector-Schnittstelle geöffnet, über die Sie die von Ihrem MCP-Server bereitgestellten Ressourcen und Tools interaktiv testen können.

Entwicklungsskripte

  • bun run dev : Startet den Server im HTTP-Modus für die Entwicklung (verwendet src/entry.ts ).

  • bun run dev:stdio : Startet den stdio MCP-Server für die Entwicklung (verwendet src/entry.ts --stdio ).

  • bun run build : Kompiliert TypeScript in JavaScript (Ausgabe in build/ ).

  • bun run lint : Lintet die Codebasis mit ESLint.

Ressourcen

Lizenz

MIT

Available Tools

3 tools
get_icon_usage_examplesB

Get usage examples for an icon

ParametersJSON Schema
NameRequiredDescriptionDefault
nameYesIcon component name, e.g. BeakerIcon
styleYesIcon style: solid or outline

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states what the tool does but does not reveal any behavioral traits such as whether it's a read-only operation, potential rate limits, error conditions, or the format of returned examples. For a tool with no annotations, this is a significant gap, warranting a score of 2.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It is front-loaded and wastes no space, making it easy for an agent to parse quickly. This optimal conciseness earns a score of 5.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (2 required parameters) and no output schema, the description is minimally adequate. It covers the basic purpose but lacks details on behavioral traits, usage context, and output format, which are important for an agent to use the tool effectively. Without annotations or an output schema, the description should do more, resulting in a score of 3.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, with clear descriptions for both parameters ('name' and 'style'), including an enum for 'style'. The description does not add any meaning beyond what the schema provides, such as explaining how 'name' relates to icon components or providing examples of usage. Given the high schema coverage, the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Get' and the resource 'usage examples for an icon', making the purpose understandable. However, it does not explicitly differentiate from sibling tools like 'list_all_icons' or 'search_icons', which might also involve icons but serve different functions. This clarity without sibling distinction justifies a score of 4.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives such as 'list_all_icons' or 'search_icons'. There is no mention of prerequisites, context, or exclusions, leaving the agent to infer usage based on the tool name alone. This lack of explicit guidelines results in a score of 2.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_all_iconsB

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

ParametersJSON Schema
NameRequiredDescriptionDefault
styleNoIcon style: solid or outline (optional)

TDQS

B3.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions listing and optional filtering but doesn't describe key behaviors such as pagination, rate limits, authentication requirements, or what the output format looks like (e.g., list of icon names, metadata). For a tool with no annotations, this leaves significant gaps in understanding how it operates.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose ('List all icons from the heroicons library') and adds an optional feature ('optionally filtered by style'). There is no wasted text, and it's appropriately sized for a simple tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (1 optional parameter, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose and parameter intent but lacks details on behavioral aspects like output format or usage constraints. For a listing tool, this is borderline acceptable but could be improved with more context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with the single parameter 'style' fully documented in the schema (including enum values 'solid' or 'outline'). The description adds minimal value beyond the schema by mentioning 'optionally filtered by style', which aligns with the schema but doesn't provide additional context like default behavior if omitted or how filtering is applied.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'List' and resource 'all icons from the heroicons library', which provides a specific purpose. However, it doesn't explicitly differentiate from sibling tools like 'search_icons' or 'get_icon_usage_examples', which likely have different functions (searching vs listing, or getting usage examples vs listing icons).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage by mentioning 'optionally filtered by style', suggesting this tool is for listing icons with optional style filtering. However, it doesn't provide explicit guidance on when to use this tool versus alternatives like 'search_icons' (which might allow more complex queries) or 'get_icon_usage_examples' (which focuses on examples rather than listing).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_iconsB

Search for icons from heroicons by name or category

ParametersJSON Schema
NameRequiredDescriptionDefault
categoryNoCategory to filter by (optional)
limitNoMax results to return
queryYesSearch term for icon name or category
styleNoIcon style: solid or outline

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but lacks behavioral details. It doesn't mention rate limits, authentication needs, response format, pagination, or error handling. The description only states the basic functionality without operational context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero wasted words. It's appropriately sized for this tool's complexity and front-loads the core functionality without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a search tool with no annotations and no output schema, the description is minimally adequate. It covers the basic purpose but lacks details about return values, error conditions, and behavioral constraints that would be helpful for an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents all parameters. The description adds minimal value by mentioning 'name or category' search, which aligns with the 'query' parameter but doesn't provide additional semantic context beyond what's in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Search for icons') and resource ('from heroicons'), specifying the search scope ('by name or category'). It distinguishes from 'list_all_icons' by implying filtering, but doesn't explicitly differentiate from 'get_icon_usage_examples'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus siblings is provided. The description implies filtering capabilities but doesn't specify scenarios where search_icons is preferred over list_all_icons or get_icon_usage_examples.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 3 tool updatesv1.0.0
    • First observedget_icon_usage_examples
    • First observedlist_all_icons
    • First observedsearch_icons

TDQS

A3.7/5.0

Scored across 3 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: listing all icons, searching icons by criteria, and getting usage examples for a specific icon. There is no overlap in functionality, making it easy for an agent to select the right tool without confusion.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern (get_icon_usage_examples, list_all_icons, search_icons) with clear, descriptive verbs. The naming is uniform and predictable across the set.

Tool Count5/5

With 3 tools, this server is well-scoped for its purpose of accessing a heroicons library. Each tool serves a distinct and essential function, making the count appropriate without being too thin or heavy.

Completeness5/5

The tool set provides complete coverage for the domain: listing icons, searching icons, and getting usage examples. This covers the core workflows for accessing and utilizing an icon library, with no obvious gaps or dead ends.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    F
    maintenance
    MCP server for Hugeicons integration and documentation This is a TypeScript-based MCP server that provides tools and resources for integrating Hugeicons into various platforms. It implements a Model Context Protocol (MCP) server that helps AI assistants provide accurate guidance for using Hugeicons
    5
    2,051 npm
    26
    MIT
  • A
    license
    B
    quality
    D
    maintenance
    MCP server that allows FE/UI/Designers to retrieve SVG icons via the Iconify API by simply asking LLMs rather than manually searching websites.
    3
    31 npm
    4
    MIT