ICON 图标 MCP Server
一个用于语义SVG图标搜索的模型上下文协议(MCP)服务器,提供超过100,000个图标,并支持语义搜索。
MCP 服务配置
复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用
{
"mcpServers": {
"mcp-icon": {
"args": [
"/c",
"npx",
"-y",
"mcp-icon"
],
"command": "cmd"
}
}
}
可用工具 (1 个)
该服务在 MCP 协议中暴露的工具,AI 可按需调用
search_icons 2 个参数 需填 1 项
Search for SVG icons by keyword using semantic search. Returns URLs of matching SVG icons from a library of over 100,000 infographic icons.
必填参数:keyword
服务介绍
🎨 mcp-icon
一个用于语义SVG图标搜索的模型上下文协议(MCP)服务器。
通过关键词生成信息图表SVG图标 —— 超过 100,000个图标 支持语义搜索,由 AntV Infographic 提供支持。
📋 目录
✨ 特性
- 🔍 语义搜索 —— 根据含义而不是确切名称查找图标
- 🖼️ 100,000+ SVG图标 —— 大量高质量的信息图表图标库
- ⚡ 三种传输模式 ——
stdio、sse和streamable-http - 🪶 最小依赖 —— 清晰、专注的实现
- 🧪 全面测试 —— 使用 Vitest 进行单元测试
可用工具
| 工具 | 描述 |
|---|---|
search_icons |
通过关键词搜索SVG图标。返回与语义查询匹配的SVG URL列表。 |
search_icons 参数:
| 参数 | 类型 | 必需 | 默认值 | 描述 |
|---|---|---|---|---|
keyword |
string | ✅ | — | 搜索关键词或短语(例如 "data analysis","cloud") |
topK |
number | ❌ | 5 |
返回的图标数量(1-20) |
🤖 使用方法
将以下配置添加到您的MCP客户端配置中(例如 Claude Desktop、VS Code、Cursor):
macOS / Linux:
{
"mcpServers": {
"mcp-icon": {
"command": "npx",
"args": ["-y", "mcp-icon"]
}
}
}
Windows:
{
"mcpServers": {
"mcp-icon": {
"command": "cmd",
"args": ["/c", "npx", "-y", "mcp-icon"]
}
}
}
🚰 传输模式
mcp-icon 支持三种标准的MCP传输协议。
stdio (默认)
用于桌面MCP客户端(Claude Desktop、Cursor等):
npx mcp-icon
# or explicitly:
npx mcp-icon --transport stdio
SSE (Server-Sent Events)
npx mcp-icon --transport sse --port 3456
# Server available at: http://localhost:3456/sse
Streamable HTTP
npx mcp-icon --transport streamable --port 3456
# Server available at: http://localhost:3456/mcp
🎮 CLI选项
mcp-icon CLI
Options:
--transport, -t Transport protocol: "stdio", "sse", or "streamable" (default: "stdio")
--host, -h Host for SSE or streamable transport (default: localhost)
--port, -p Port for SSE or streamable transport (default: 3456)
--endpoint, -e Endpoint path:
- For SSE: default is "/sse"
- For streamable: default is "/mcp"
--help, -H Show this help message
🔨 开发
# Clone the repository
git clone https://github.com/hustcc/mcp-icon.git
cd mcp-icon
# Install dependencies
npm install
# Build
npm run build
# Run tests
npm test
# Start in stdio mode (for development with MCP inspector)
node build/index.js
项目结构
src/
├── index.ts # CLI entry point
├── server.ts # MCP server + tool handlers
├── services/
│ ├── stdio.ts # Stdio transport
│ ├── sse.ts # SSE transport
│ └── streamable.ts # Streamable HTTP transport
├── tools/
│ └── search-icons.ts # Tool definition
└── utils/
├── api.ts # Icon search API client
└── logger.ts # Logger utility
tests/
├── api.test.ts # API client unit tests
└── server.test.ts # MCP server integration tests
📄 许可证
MIT © hustcc