unicon-mcp

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Unicon MCP

Unicon MCP

Use the Unicon MCP server to search and generate icon components through AI assistants like Claude Desktop and Cursor.
借助Claude Desktop、Cursor等AI助手,使用Unicon MCP服务器搜索并生成图标组件。

Quick Start

快速开始

Claude Desktop

Claude Desktop

  1. Open
    ~/Library/Application Support/Claude/claude_desktop_config.json
  2. Add:
json
{
  "mcpServers": {
    "unicon": {
      "command": "npx",
      "args": ["-y", "@webrenew/unicon-mcp-server"]
    }
  }
}
  1. Fully quit and restart Claude Desktop.
  1. 打开
    ~/Library/Application Support/Claude/claude_desktop_config.json
  2. 添加以下内容:
json
{
  "mcpServers": {
    "unicon": {
      "command": "npx",
      "args": ["-y", "@webrenew/unicon-mcp-server"]
    }
  }
}
  1. 完全退出并重启Claude Desktop。

Cursor

Cursor

  1. Open Settings > MCP Servers
  2. Add the same JSON config shown above
  3. Restart Cursor
  1. 打开设置 > MCP服务器
  2. 添加上述相同的JSON配置
  3. 重启Cursor

Verify Installation

验证安装

  • Claude Desktop: look for the plug icon, ensure
    unicon
    appears
  • Cursor: run
    claude mcp list
    if using Claude Code
  • Claude Desktop:查看插件图标,确认
    unicon
    已显示
  • Cursor:若使用Claude Code,运行
    claude mcp list
    命令

Common Prompts

常用提示词

  • "Search for dashboard icons in Lucide"
  • "Get React component for lucide:arrow-right"
  • "Generate Vue components for social media icons"
  • "List available icon libraries"
  • "搜索Lucide中的仪表盘图标"
  • "获取lucide:arrow-right的React组件"
  • "为社交媒体图标生成Vue组件"
  • "列出可用的图标库"

Available Tools

可用工具

search_icons

search_icons

Search through 19,000+ icons with optional filters.
Parameters
ParameterRequiredDescription
query
YesSearch term
source
NoFilter by library
category
NoFilter by category
limit
NoMax results (default: 20)
includeCode
NoReturn code with results
strokeWidth
NoStroke width when includeCode=true
normalizeStrokes
NoNormalize stroke widths, skipping fill icons
在19000+图标中搜索,支持可选筛选条件。
参数
参数是否必填描述
query
搜索关键词
source
按图标库筛选
category
按分类筛选
limit
最大结果数(默认:20)
includeCode
返回结果时附带代码
strokeWidth
当includeCode=true时的描边宽度
normalizeStrokes
统一描边宽度,跳过填充式图标

get_icon

get_icon

Return code for a single icon in a requested format.
Parameters
ParameterRequiredDescription
iconId
YesIcon ID (e.g., "lucide:home")
format
Nosvg, react, vue, svelte, json
size
NoIcon size in pixels
strokeWidth
NoStroke width
normalizeStrokes
NoNormalize stroke widths, skipping fill icons
返回单个图标的指定格式代码。
参数
参数是否必填描述
iconId
图标ID(例如:
lucide:home
format
svg, react, vue, svelte, json
size
图标尺寸(像素)
strokeWidth
描边宽度
normalizeStrokes
统一描边宽度,跳过填充式图标

get_multiple_icons

get_multiple_icons

Fetch up to 50 icons at once in a shared format.
Parameters
ParameterRequiredDescription
iconIds
YesArray of icon IDs
format
NoOutput format
size
NoIcon size in pixels
strokeWidth
NoStroke width
normalizeStrokes
NoNormalize stroke widths, skipping fill icons
一次性获取最多50个图标的统一格式代码。
参数
参数是否必填描述
iconIds
图标ID数组
format
输出格式
size
图标尺寸(像素)
strokeWidth
描边宽度
normalizeStrokes
统一描边宽度,跳过填充式图标

get_starter_pack

get_starter_pack

Get curated icon packs for common use cases.
Parameters
ParameterRequiredDescription
packId
YesPack identifier
format
NoOutput format
size
NoIcon size in pixels
strokeWidth
NoStroke width
normalizeStrokes
NoNormalize stroke widths, skipping fill icons
获取针对常见场景的精选图标包。
参数
参数是否必填描述
packId
图标包标识符
format
输出格式
size
图标尺寸(像素)
strokeWidth
描边宽度
normalizeStrokes
统一描边宽度,跳过填充式图标

Resources

资源

The MCP server exposes these resources:
URIDescription
unicon://sources
Library metadata (names, icon counts)
unicon://categories
Available category list
unicon://stats
Overall icon statistics
unicon://starter_packs
Curated icon packs (shadcn-ui, dashboard, etc.)
unicon://instructions
Detailed usage guide with examples
MCP服务器提供以下资源:
URI描述
unicon://sources
图标库元数据(名称、图标数量)
unicon://categories
可用分类列表
unicon://stats
整体图标统计数据
unicon://starter_packs
精选图标包(如shadcn-ui、dashboard等)
unicon://instructions
含示例的详细使用指南

Troubleshooting

故障排除

Server not appearing

服务器未显示

  1. Fully quit the app (Cmd+Q on macOS)
  2. Verify config JSON syntax is valid
  3. Restart the application
  4. Check for error logs
  1. 完全退出应用(macOS上使用Cmd+Q)
  2. 验证配置JSON语法是否有效
  3. 重启应用
  4. 检查错误日志

Slow first start

首次启动缓慢

The first
npx
run downloads the package. Subsequent runs use cache.
首次运行
npx
会下载包文件,后续运行将使用缓存。

Icons not found

图标未找到

Run
search_icons
with your query to verify the icon ID exists. Format is
source:name
(e.g.,
lucide:home
).
使用
search_icons
工具执行搜索,验证图标ID是否存在。格式为
source:name
(例如:
lucide:home
)。

Connection errors

连接错误

  1. Ensure you have Node.js 18+ installed
  2. Check internet connectivity
  3. Try running manually:
    npx @webrenew/unicon-mcp-server
  1. 确保已安装Node.js 18或更高版本
  2. 检查网络连接
  3. 尝试手动运行:
    npx @webrenew/unicon-mcp-server