1. Conduid
  2. Search
  3. Icon
MCP server · Search

Icon

A Model Context Protocol (MCP) server for searching and fetching icons from iconfont.cn.

Unclaimed last commit a year ago search
34Low

Scored 5 days ago · breakdown

About Icon

Icon is an MCP server published by liliangshan in the Search category: a Model Context Protocol (MCP) server for searching and fetching icons from iconfont.cn.

The repository has 9 stars and 1 forks, with the last commit a year ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues before depending on it in production.

Install

From source
git clone https://github.com/liliangshan/mcp-server-icon

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

✦

Ask AI about Icon

Powered by Claude · Grounded in docs

I know everything about Icon. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

Static checks derived from the repository yesterday. Heuristics on the source, not an audit.

  • ✓README presentThe repository ships documentation.
  • !License declaredNo license file. Legally you have no right to use it in a product.
  • ✓Tests presentA test suite exists in the repository.
  • ✓Dependencies pinnedA lockfile pins dependency versions.
  • !No dynamic code executionSource scan found eval or shell execution. Review how tool inputs reach it before granting credentials.

1 check has not been run yet.

README

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

Installation

npm install @liangshanli/mcp-server-icon

Installation

Global Installation (Recommended)

npm install -g @liangshanli/mcp-server-icon

Local Installation

npm install @liangshanli/mcp-server-icon

From Source

git clone https://github.com/liliangshan/mcp-server-icon.git
cd mcp-server-icon
npm install

Usage

1. Direct Run (Global Installation)

mcp-server-icon

2. Using npx (Recommended)

npx @liangshanli/mcp-server-icon

3. Direct Start (Source Installation)

npm start

4. Development Mode

npm run dev

5. Daemon Mode

npm run daemon

Editor Integration

Cursor Editor Configuration

  1. 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"
      }
    }
  }
}

VS Code Configuration

  1. Install the MCP extension for VS Code
  2. Create .vscode/settings.json file:
{
  "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 (en or zh-CN, default: en)
  • WEB_SERVER_AUTO_OPEN: Whether to auto-open browser (true or false, 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 keyword
  • sortType (string): Sort type, default updated_at
  • page (number): Page number, default 1
  • pageSize (number): Items per page, default 100, max 100
  • sType (string): Search type filter
  • fromCollection (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-icon

2. 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.md

Development Environment Setup

  1. Clone the repository
git clone https://github.com/liliangshan/mcp-server-icon.git
cd mcp-server-icon
npm install
  1. Set 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.log
  1. Run in development mode
npm run dev

Testing

npm test

License

MIT License

Author

liliangshan

README fetched from the repository yesterday. The original is authoritative.

Questions

About Icon

How do I install Icon?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is Icon safe to use with an AI agent?

Its trust score is 34 out of 100 (low). It passes 3 of the 5 static security checks run so far; the failures are listed above. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Icon still maintained?

The last commit was a year ago. That's long enough that you should check whether the maintainer is responding to issues before depending on it.