unicon-mcp
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseUnicon 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
- Open
~/Library/Application Support/Claude/claude_desktop_config.json - Add:
json
{
"mcpServers": {
"unicon": {
"command": "npx",
"args": ["-y", "@webrenew/unicon-mcp-server"]
}
}
}- Fully quit and restart Claude Desktop.
- 打开
~/Library/Application Support/Claude/claude_desktop_config.json - 添加以下内容:
json
{
"mcpServers": {
"unicon": {
"command": "npx",
"args": ["-y", "@webrenew/unicon-mcp-server"]
}
}
}- 完全退出并重启Claude Desktop。
Cursor
Cursor
- Open Settings > MCP Servers
- Add the same JSON config shown above
- Restart Cursor
- 打开设置 > MCP服务器
- 添加上述相同的JSON配置
- 重启Cursor
Verify Installation
验证安装
- Claude Desktop: look for the plug icon, ensure appears
unicon - Cursor: run if using Claude Code
claude mcp list
- 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
| Parameter | Required | Description |
|---|---|---|
| Yes | Search term |
| No | Filter by library |
| No | Filter by category |
| No | Max results (default: 20) |
| No | Return code with results |
| No | Stroke width when includeCode=true |
| No | Normalize stroke widths, skipping fill icons |
在19000+图标中搜索,支持可选筛选条件。
参数
| 参数 | 是否必填 | 描述 |
|---|---|---|
| 是 | 搜索关键词 |
| 否 | 按图标库筛选 |
| 否 | 按分类筛选 |
| 否 | 最大结果数(默认:20) |
| 否 | 返回结果时附带代码 |
| 否 | 当includeCode=true时的描边宽度 |
| 否 | 统一描边宽度,跳过填充式图标 |
get_icon
get_icon
Return code for a single icon in a requested format.
Parameters
| Parameter | Required | Description |
|---|---|---|
| Yes | Icon ID (e.g., "lucide:home") |
| No | svg, react, vue, svelte, json |
| No | Icon size in pixels |
| No | Stroke width |
| No | Normalize stroke widths, skipping fill icons |
返回单个图标的指定格式代码。
参数
| 参数 | 是否必填 | 描述 |
|---|---|---|
| 是 | 图标ID(例如: |
| 否 | svg, react, vue, svelte, json |
| 否 | 图标尺寸(像素) |
| 否 | 描边宽度 |
| 否 | 统一描边宽度,跳过填充式图标 |
get_multiple_icons
get_multiple_icons
Fetch up to 50 icons at once in a shared format.
Parameters
| Parameter | Required | Description |
|---|---|---|
| Yes | Array of icon IDs |
| No | Output format |
| No | Icon size in pixels |
| No | Stroke width |
| No | Normalize stroke widths, skipping fill icons |
一次性获取最多50个图标的统一格式代码。
参数
| 参数 | 是否必填 | 描述 |
|---|---|---|
| 是 | 图标ID数组 |
| 否 | 输出格式 |
| 否 | 图标尺寸(像素) |
| 否 | 描边宽度 |
| 否 | 统一描边宽度,跳过填充式图标 |
get_starter_pack
get_starter_pack
Get curated icon packs for common use cases.
Parameters
| Parameter | Required | Description |
|---|---|---|
| Yes | Pack identifier |
| No | Output format |
| No | Icon size in pixels |
| No | Stroke width |
| No | Normalize stroke widths, skipping fill icons |
获取针对常见场景的精选图标包。
参数
| 参数 | 是否必填 | 描述 |
|---|---|---|
| 是 | 图标包标识符 |
| 否 | 输出格式 |
| 否 | 图标尺寸(像素) |
| 否 | 描边宽度 |
| 否 | 统一描边宽度,跳过填充式图标 |
Resources
资源
The MCP server exposes these resources:
| URI | Description |
|---|---|
| Library metadata (names, icon counts) |
| Available category list |
| Overall icon statistics |
| Curated icon packs (shadcn-ui, dashboard, etc.) |
| Detailed usage guide with examples |
MCP服务器提供以下资源:
| URI | 描述 |
|---|---|
| 图标库元数据(名称、图标数量) |
| 可用分类列表 |
| 整体图标统计数据 |
| 精选图标包(如shadcn-ui、dashboard等) |
| 含示例的详细使用指南 |
Troubleshooting
故障排除
Server not appearing
服务器未显示
- Fully quit the app (Cmd+Q on macOS)
- Verify config JSON syntax is valid
- Restart the application
- Check for error logs
- 完全退出应用(macOS上使用Cmd+Q)
- 验证配置JSON语法是否有效
- 重启应用
- 检查错误日志
Slow first start
首次启动缓慢
The first run downloads the package. Subsequent runs use cache.
npx首次运行会下载包文件,后续运行将使用缓存。
npxIcons not found
图标未找到
Run with your query to verify the icon ID exists. Format is (e.g., ).
search_iconssource:namelucide:home使用工具执行搜索,验证图标ID是否存在。格式为(例如:)。
search_iconssource:namelucide:homeConnection errors
连接错误
- Ensure you have Node.js 18+ installed
- Check internet connectivity
- Try running manually:
npx @webrenew/unicon-mcp-server
- 确保已安装Node.js 18或更高版本
- 检查网络连接
- 尝试手动运行:
npx @webrenew/unicon-mcp-server