v7.3.0 llm.txt Download
DocsUse Cardsite Icons from an AI agent

Guides · docs/guides/agents.md

Use Cardsite Icons from an AI agent

The package ships an MCP server and a CLI. Both read the built files in build/ and need nothing but Node 20 or newer.

MCP tools

Tool Input Returns
search_icons query, optional category, limit (default 20) Matching icons: name, category, description, tags
get_icon name, optional style (light, regular, bold, duotone, fill), size SVG text plus canonical name, the alias it resolved (if any), and a warning when size is below the icon's minSize
list_categories none Each category with its icon count
resolve_name name Canonical name, or suggestions. Old names that moved to the brand layer return their asset path
get_brand_asset kind (products, tools, features, files, badges, logo, illustrations), name, optional theme (for logos: color, mono, outline or tile, with -light or -dark, e.g. mono-dark) SVG text. Renamed partner logos resolve (twitter returns X)
get_tokens optional format (css or json) The design token file

All tools are read-only. Errors come back as tool results with isError: true.

Connect a client

With a local checkout:

{
  "mcpServers": {
    "cardsite-icons": {
      "command": "node",
      "args": ["/absolute/path/to/cardsite-icons/tools/mcp/server.mjs"]
    }
  }
}

With the installed package:

{
  "mcpServers": {
    "cardsite-icons": {
      "command": "npx",
      "args": ["cardsite-icons", "mcp"]
    }
  }
}

CLI examples

cardsite-icons search calendar --limit 5
cardsite-icons svg trash --style bold --size 24 --title "Delete"
cardsite-icons resolve home-alt            # prints: home
cardsite-icons info home --json
cardsite-icons categories
cardsite-icons aliases > codemod-map.json  # old name -> new name
cardsite-icons brand products analytics --theme paper
cardsite-icons brand files pdf --theme dark
cardsite-icons brand badges live

An unknown name exits with code 1 and prints close matches.