mcp-server-icon
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-server-iconsearch for home icons"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Icon Server
A Model Context Protocol (MCP) server for searching and fetching icons from iconfont.cn.
Features
🔍 Icon Search: Search icons from iconfont.cn
📄 Icon Details: Get detailed information about icons
🎨 SVG Content: Get SVG format content of icons
⚡ Caching: Built-in cache for improved performance
📊 Cache Management: View and manage cache statistics
🔧 Zero Dependencies: Uses only Node.js built-in features
Related MCP server: PickAPIcon MCP
Installation
npm install @liangshanli/mcp-server-iconInstallation
Global Installation (Recommended)
npm install -g @liangshanli/mcp-server-iconLocal Installation
npm install @liangshanli/mcp-server-iconFrom Source
git clone https://github.com/liliangshan/mcp-server-icon.git
cd mcp-server-icon
npm installUsage
1. Direct Run (Global Installation)
mcp-server-icon2. Using npx (Recommended)
npx @liangshanli/mcp-server-icon3. Direct Start (Source Installation)
npm start4. Development Mode
npm run dev5. Daemon Mode
npm run daemonEditor Integration
Cursor Editor Configuration
Create
.cursor/mcp.jsonfile in your project root:
{
"mcpServers": {
"icon": {
"command": "npx",
"args": ["@liangshanli/mcp-server-icon"],
"env": {
"LANGUAGE": "en",
"WEB_SERVER_AUTO_OPEN": "true"
}
}
}
}VS Code Configuration
Install the MCP extension for VS Code
Create
.vscode/settings.jsonfile:
{
"mcp.servers": {
"icon": {
"command": "npx",
"args": ["@liangshanli/mcp-server-icon"],
"env": {
"LANGUAGE": "en",
"WEB_SERVER_AUTO_OPEN": "true"
}
}
}
}As MCP Server
The server communicates with MCP clients via stdin/stdout after startup:
{"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {"protocolVersion": "2024-11-05"}}Environment Variables
LANGUAGE: Interface language setting (enorzh-CN, default:en)WEB_SERVER_AUTO_OPEN: Whether to auto-open browser (trueorfalse, default:true)MCP_LOG_DIR: Log directory (default:./logs)MCP_LOG_FILE: Log filename (default:mcp-icon.log)
API Tools
1. search_icons
Search icons from iconfont.cn
Parameters:
q(string): Search keywordsortType(string): Sort type, defaultupdated_atpage(number): Page number, default 1pageSize(number): Items per page, default 100, max 100sType(string): Search type filterfromCollection(number): Collection filter, default -1 (all)fills(string): Fill type filter
Example:
{
"name": "search_icons",
"arguments": {
"q": "user",
"page": 1,
"pageSize": 20
}
}2. get_cache_stats
Get cache statistics
Parameters: None
3. clear_cache
Clear icon cache
Parameters:
expiredOnly(boolean): Only clear expired entries, default false
Response Format
Search Icons Response
{
"code": 200,
"data": {
"icons": [
{
"id": 145442,
"name": "用户",
"status": 1,
"is_private": 0,
"category_id": "1",
"slug": "用户",
"unicode": "58931",
"width": 1024,
"height": 1024,
"defs": null,
"path_attributes": "fill=\"#FF9000\"",
"fills": 1,
"font_class": "yonghu",
"user_id": 4689,
"repositorie_id": 1029,
"created_at": "2015-04-08T03:37:56.000Z",
"updated_at": "2022-11-30T14:45:12.000Z",
"preview_image": null,
"svg_hash": "1c5e2a9ebaeb74599a727720e6439cb9",
"svg_fill_hash": "3768e9af3b85014e5cabfe723186fcfe",
"fork_from": null,
"deleted_at": null,
"show_svg": "<svg class=\"icon\" style=\"width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M703.400215 995.074204c-3.51915 0-7.078209-0.991584-10.240225-3.066849-30.28884-19.875676-80.136132-25.263383-97.079012-25.678846l-22.119787 0-35.287691 0.271176c-0.048095 0-0.095167 0-0.143263 0L92.740194 966.599685c-10.326183 0-18.696828-8.370645-18.696828-18.696828l0-22.467711c-0.318248-6.266727-0.910743-40.603767 21.004383-78.307484 13.716396-23.598464 33.431414-43.86095 58.598606-60.225663 30.493501-19.828604 69.116147-33.909297 114.796536-41.84913 0.233314-0.039909 0.466628-0.075725 0.700965-0.107447 0.346901-0.047072 35.499515-4.858658 71.208808-14.273075 61.894675-16.317641 67.307965-30.743188 67.345828-30.884404 0.364297-1.430582 0.89437-2.803859 1.572822-4.095271 0.50756-2.699482 1.76418-12.858866-0.63752-40.079834-6.100952-69.136613-42.120306-109.995183-71.061452-142.825916-9.127891-10.354835-17.749246-20.133549-24.387433-29.722952-28.640294-41.37227-31.296797-88.416725-31.396057-90.39887-0.01535-0.311085-0.022513-0.62217-0.022513-0.933255 0-18.779715 9.363252-27.418466 17.624403-35.041074l0.433882-0.401136c0.271176-0.25071 0.442068-0.436952 0.542352-0.556679 0.093121-1.340531-0.566912-4.743024-1.013073-7.04137-0.169869-0.873903-0.339738-1.750877-0.50142-2.632967-7.179516-38.981826-7.670703-99.19214-1.175779-137.837298 2.409886-50.813293 46.224788-89.711208 48.105624-91.356684 0.071631-0.062422 0.143263-0.12382 0.214894-0.185218 6.290263-5.338588 12.671601-11.169387 16.727986-17.636682 0.487094-0.775666 0.827855-1.37737 1.066285-1.836835-0.304945-0.786922-0.741897-1.793856-1.094938-2.608407-2.436492-5.618974-6.118348-14.109346-4.02364-25.02393 1.263783-6.589069 6.078439-18.362206 24.118304-23.173792 7.261381-1.937119 15.022135-2.333138 20.689205-2.62171l1.122567-0.058328c22.38994-1.178849 46.272883-2.176572 70.435189-0.324388 174.730557 13.396101 234.920404 78.686107 237.396805 81.459267 0.140193 0.155543 0.276293 0.314155 0.409322 0.474814 13.986549 16.756639 24.347524 37.635155 30.7964 62.055334 2.01489 7.619538 3.309372 14.016225 4.062526 20.072151 6.102998 35.464723 5.084808 71.904657 3.78214 96.269577-0.732687 13.675464-2.257413 28.030403-4.800329 45.175899-0.691755 4.656043 0.068562 5.564739 0.355087 5.906523 0.75827 0.906649 1.686409 1.892093 2.667759 2.934842 3.862981 4.099365 9.152451 9.713222 11.964496 18.721387 1.410116 4.502547 2.069125 9.360182 2.069125 15.267728 0 0.311085-0.008186 0.62217-0.022513 0.933255-0.099261 1.982144-2.755764 49.0266-31.395034 90.397846-6.639211 9.590426-15.259542 19.36914-24.387433 29.722952-28.942169 32.829709-64.960501 73.689303-71.061452 142.827963-2.4017 27.220968-1.14508 37.379329-0.63752 40.079834 0.678452 1.291412 1.208525 2.664689 1.572822 4.094248 0.036839 0.141216 5.471618 14.613836 67.648726 30.964222 35.7052 9.388834 70.557986 14.146185 70.90591 14.193257 0.303922 0.040932 0.606821 0.090051 0.908696 0.145309 46.095851 8.549723 84.956927 22.991644 115.505687 42.923602 25.252127 16.476253 44.930305 36.7019 58.489112 60.114123 21.50171 37.128619 20.626783 70.714552 20.195971 77.443813l0 22.332634c0 10.326183-8.370645 18.696828-18.696828 18.696828L775.884063 966.602755c-10.326183 0-18.696828-8.370645-18.696828-18.696828s8.370645-18.696828 18.696828-18.696828l158.188812 0L934.072875 924.897911c0-0.686638 0.00921-1.106194 0.081864-1.769296 0.104377-1.508353 1.627057-28.332279-16.349363-58.130955-10.82044-17.937534-26.589588-33.609469-46.870494-46.580898-26.100448-16.693194-59.762105-28.967752-100.05274-36.482913-4.63967-0.642636-39.012526-5.564739-75.080999-15.059997-70.761624-18.629289-87.964424-39.353286-93.189426-54.395888-4.004197-7.765871-6.245238-23.195282-2.984984-60.153008 7.18054-81.369216 49.41955-129.282458 80.260975-164.268274 8.747221-9.921977 16.301268-18.491143 21.693068-26.279526 21.120017-30.510898 24.437575-66.300009 24.765033-70.606081-0.032746-2.252297-0.260943-3.223415-0.36225-3.549849-0.248663-0.798179-1.89721-2.547009-3.490497-4.238534-1.25048-1.327228-2.667759-2.832512-4.136204-4.587482-7.950066-9.504468-10.782577-21.079084-8.66024-35.384905 2.367931-15.960507 3.781116-29.206182 4.449335-41.684378 1.951445-36.502355 0.913812-63.747883-3.363607-88.341001-0.057305-0.326435-0.105401-0.654916-0.145309-0.983397-0.531096-4.438079-1.530866-9.354042-3.14769-15.46932-4.986571-18.884093-12.726859-34.770921-23.006993-47.232744-1.714038-1.747807-15.385409-15.125489-45.883003-29.67588-54.882981-26.183336-120.791064-35.849486-166.417217-39.34817-21.934568-1.681292-44.442188-0.732687-65.614393 0.382717l-1.178849 0.060375c-1.766226 0.090051-4.735861 0.2415-7.55814 0.525979 2.447748 5.841032 5.453199 14.632255 2.296299 25.136493-1.184989 3.939729-3.003404 7.792477-5.723352 12.129248-6.732331 10.733459-15.923668 19.23611-24.054859 26.145473-1.597381 1.441838-34.223452 31.356149-35.351136 65.738213-0.028653 0.86981-0.11768 1.736551-0.267083 2.594081-5.972015 34.304294-5.568832 90.780563 0.898463 125.894292 0.140193 0.765433 0.288572 1.52575 0.435928 2.282996 1.980097 10.205433 5.294586 27.284413-10.879792 42.202171l-0.434905 0.402159c-2.086521 1.924839-4.943592 4.560876-5.41636 5.468548l0 0c0.00307 0-0.13303 0.426719-0.164752 1.584078 0.328481 4.295839 3.654226 40.060391 24.76401 70.554916 5.3918 7.788383 12.945847 16.356526 21.693068 26.279526 30.841426 34.984792 73.079412 82.899058 80.259952 164.266227 3.260254 36.95875 1.019213 52.388161-2.984984 60.154032-5.226025 15.042601-22.427802 35.766598-93.189426 54.395888-36.365232 9.574053-71.006194 14.497179-75.18947 15.074324-39.83424 6.958482-73.196069 18.883069-99.160417 35.44528-20.185738 12.876262-35.971259 28.599362-46.919613 46.732347-18.282389 30.281677-17.133216 57.860802-17.055444 59.33641 0.050142 0.543376 0.054235 0.867764 0.054235 1.433652l0 4.309142 427.01135 0 35.287691-0.271176c0.047072 0 0.095167 0 0.143263 0l22.423709 0c0.141216 0 0.280386 0.001023 0.421602 0.005117 2.895957 0.064468 71.446215 1.943258 116.949572 31.803333 8.633634 5.665023 11.039427 17.254989 5.374404 25.888624C715.458855 992.104569 709.488887 995.074204 703.400215 995.074204zM631.466905 689.8762c0.454348 0.36839 0.890276 0.757247 1.305739 1.164522C632.378671 690.653913 631.943766 690.26301 631.466905 689.8762zM414.041968 689.8762c-0.471744 0.382717-0.901533 0.768503-1.292436 1.152243C413.160901 690.626283 413.592736 690.24152 414.041968 689.8762z\" fill=\"#FF9000\" /></svg>"
}
]
},
"pagination": {
"page": 1,
"pageSize": 100,
"total": 1
},
"searchParams": {
"q": "user",
"sortType": "updated_at",
"sType": "",
"fromCollection": -1,
"fills": ""
}
}Caching
The server includes built-in caching for improved performance:
Cache expiry time: 30 minutes
Supports search result caching
Provides cache statistics and cleanup functionality
Quick Start
1. Install Package
npm install -g @liangshanli/mcp-server-icon2. Configure Cursor Editor
Create .cursor/mcp.json file in your project root:
{
"mcpServers": {
"icon": {
"command": "npx",
"args": ["@liangshanli/mcp-server-icon"],
"env": {
"LANGUAGE": "en",
"WEB_SERVER_AUTO_OPEN": "true"
}
}
}
}3. Restart Cursor
Restart Cursor editor to load the new MCP server configuration.
4. Start Using
The icon search tools will be available in Cursor's MCP interface.
Requirements
Node.js 18.0.0 or higher
No external dependencies (uses built-in fetch)
Development
Project Structure
mcp-server-icon/
├── src/
│ ├── server-final.js # Main server file
│ ├── server-final-http.js # HTTP server file
│ ├── utils/ # Utility classes directory
│ │ ├── http-server.js # HTTP server utility class
│ │ ├── web-interface.js # Web interface handler
│ │ ├── window-utils.js # Window utility class
│ │ ├── search-icons.js # Icon search utility
│ │ ├── cache-manager.js # Cache management utility
│ │ ├── web-server-manager.js # Web server management utility
│ │ ├── icon-saver.js # Icon saving utility
│ │ └── selection-checker.js # Selection status checker utility
│ └── lang/ # Multi-language support
│ ├── index.js
│ ├── en.js
│ └── zh-CN.js
├── bin/
│ └── cli.js # CLI entry point
├── start.js # Startup script
├── start-server.js # Server startup script
├── package.json
└── README.mdDevelopment Environment Setup
Clone the repository
git clone https://github.com/liliangshan/mcp-server-icon.git
cd mcp-server-icon
npm installSet up environment variables
# Language settings
export LANGUAGE=en
export WEB_SERVER_AUTO_OPEN=true
# Logging settings
export MCP_LOG_DIR=./logs
export MCP_LOG_FILE=mcp-icon.logRun in development mode
npm run devTesting
npm testLicense
MIT License
Author
liliangshan
Available Tools
3 toolsclear_cacheC
Clear icon cache
| Name | Required | Description | Default |
|---|---|---|---|
| expiredOnly | No | Only clear expired entries |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full behavioral burden and discloses almost nothing. 'Clear' implies a destructive, likely irreversible mutation, but the description never states whether entries are recoverable, whether auth/confirmation is required, or whether clearing affects running processes.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three words, front-loaded with the verb, no filler. It is efficient, though the brevity contributes to the missing behavioral detail noted elsewhere.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
A destructive-style operation with no annotations, no output schema, and no explanation of consequences leaves key agent questions unanswered. The schema covers the single parameter, but the description should have disclosed the effect of clearing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, and the sole parameter expiredOnly is fully documented in the schema, so the baseline of 3 applies. The description adds no format or default semantics beyond what the schema already provides.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb ('Clear') and resource ('icon cache'), so the agent knows exactly what operation is performed. It does not differentiate from siblings like get_cache_stats or search_icons, but the purpose itself is unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No when-to-use guidance, no prerequisites, and no mention of the sibling tools. The agent is left to infer that clearing is appropriate only when stale data is suspected rather than simply querying stats.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_cache_statsC
Get cache statistics
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided; the description implies a read-only operation but does not explicitly state it. No details on side effects or prerequisites.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Extremely concise (two words), but lacks detail on return value and usage context. Could be slightly expanded without losing conciseness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema and no description of what statistics are returned. Incomplete for a tool that produces output.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
No parameters exist (100% schema coverage), so the description adds no parameter information but is not required to.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states the tool retrieves cache statistics, distinguishing it from sibling tools like cached_commands and clear_command_cache. However, it does not specify what type of statistics (e.g., hit rate, size).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives. The description gives no context or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_iconsB
Search icons from iconfont.cn (single keyword search only)
| Name | Required | Description | Default |
|---|---|---|---|
| q | No | Search query keyword (single word only, use the most relevant keyword) | |
| page | No | Page number (starting from 1) | |
| fills | No | Fill type filter | |
| sType | No | Search type filter | |
| pageSize | No | Number of icons per page (1-100) | |
| sortType | No | Sort type: updated_at, created_at, name, etc. | updated_at |
| fromCollection | No | Collection filter (-1 for all) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full behavioral burden. It discloses the single-keyword limitation, which is useful, but says nothing about network dependency, rate limits, result format, or whether pagination fields are honored — significant gaps for an external-site search tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single short sentence with the resource and the key constraint front-loaded; nothing wasted.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 7-parameter tool with no annotations and no output schema, the description is thin: it does not describe the shape of returned results or how page/pageSize/sortType interact, leaving the agent to infer pagination behavior. Parameter coverage in the schema mitigates this, but return-value expectation is entirely absent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so all seven parameters are already documented in the schema and the baseline is 3. The description echoes the single-keyword constraint already stated on the q parameter and adds no meaning beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb (search) and resource (icons) plus the data source (iconfont.cn), so an agent immediately knows what it retrieves. Siblings (cache stats/clear) are unrelated, so no differentiation is needed, but the description does not note scope like default page size or that results are icon metadata.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The parenthetical 'single keyword search only' implies a constraint on usage but gives no when-to-use context, no prerequisites, and no alternatives. There is no guidance on what to do for multi-word or multi-concept queries, which is the main selection ambiguity here.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
3 tool updates
v1.4.0- First observed
clear_cache - First observed
get_cache_stats - First observed
search_icons
TDQS
Scored across 3 tools
Each tool has a clearly distinct purpose: searching icons, reading cache stats, and clearing the cache. There is no overlap or chance of misselection.
All three names use the same snake_case verb_noun convention (search_icons, get_cache_stats, clear_cache). The pattern is predictable and readable.
Three tools is on the thin side for an icon server, since only one delivers the core capability and the other two are cache maintenance. Still, each tool is justified and nothing is redundant.
Only single-keyword search is offered, with no way to fetch a specific icon's details or assets, no category/batch lookup, and no pagination or filtering. Cache lifecycle is covered, but the core icon domain surface is notably shallow.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
Model Context Protocol server for Studex tools, notifications, and profile integrations
Search and browse every MCP server in the Model Context Protocol registry.
Related MCP Servers
- AlicenseAqualityBmaintenanceA Model Context Protocol server that provides integration with LeetCode APIs, enabling automated interaction with programming problems, contests, solutions, and user data across both leetcode.com and leetcode.cn platforms.9129 npm152MIT
- AlicenseBqualityDmaintenanceMCP server that allows FE/UI/Designers to retrieve SVG icons via the Iconify API by simply asking LLMs rather than manually searching websites.331 npm4MIT
- AlicenseNot gradedqualityFmaintenanceA Model Context Protocol server that enables unified fuzzy searching across multiple icon libraries (Bootstrap, Feather, Octicons, Tabler) with intelligent caching and comprehensive filtering options.MIT
- AlicenseAqualityDmaintenanceA Model Context Protocol (MCP) server for semantic SVG icon search. Generate infographic SVG icons by keyword — over 100,000 icons with semantic search support.111 npm1MIT