Skip to Content
IntegrationsCursor

Hugeicons for Cursor

Cursor setup has two halves, and they are better together:

  1. The rule file tells the agent how to use Hugeicons — which library to pick, which props exist, and to never invent an icon name or hand-draw an SVG.
  2. The MCP server is what it resolves names against, live.

Add the rule

mkdir -p .cursor/rules curl -o .cursor/rules/hugeicons.mdc \ https://raw.githubusercontent.com/hugeicons/hugeicons/main/plugins/cursor/hugeicons.mdc

Commit the file and everyone on the project gets it.

Add the MCP server

Add this to .cursor/mcp.json in your project, or ~/.cursor/mcp.json for every project:

{ "mcpServers": { "hugeicons": { "url": "https://mcp.hugeicons.com/mcp" } } }

No API key. See MCP Server for what each tool does.

The rule works without the server — it falls back to grepping the Hugeicons package already installed in the project — but name resolution across all 60,000+ icons needs the server.

How the rule attaches

The rule’s frontmatter sets globs, so Cursor attaches it when the agent works on UI files and stays out of the way otherwise:

globs: "**/*.tsx,**/*.jsx,**/*.vue,**/*.svelte,**/*.astro,**/*.html,**/*.dart" alwaysApply: false

It is about 760 tokens, and costs nothing on work that doesn’t touch those files. Confirm it is attaching under Cursor Settings → Rules.

If your UI lives somewhere the globs miss, edit that line. Keep the value quoted: a leading * is an alias token in YAML, so an unquoted glob breaks the frontmatter and the rule silently never loads.

What the rule covers

  • Which icon library. Hugeicons already in the project means use it in the existing style. Another icon library means stay with it, don’t mix. No icon library at all means install Hugeicons, free Stroke Rounded (6,000+ icons) — including when your request never mentioned icons.
  • Never guess a name. Export names aren’t predictable from the icon name: 2nd-bracket is SecondBracketIcon, sorting-1-9 is SortingOneNineIcon. Every name gets resolved, then copied verbatim.
  • Never draw an icon. No inline SVG approximations of a Hugeicons icon.
  • One style, one size scale, and the same icon for the same meaning across the UI.
  • Rendering and props for every framework.

Other agents

The rule is plain Markdown under its frontmatter, so it works anywhere an agent reads project instructions. For tools that honour AGENTS.md, paste the body — everything after the frontmatter — into that file.

Use the Claude Code plugin instead. It carries the full skills rather than this condensed summary, and wires up the MCP server in the same install.

Source

The rule lives in plugins/cursor. It is a condensed version of the hugeicons skill, maintained by hand rather than generated, so the skill is the fuller reference.