Skip to main content
Glama

icon-font-mcp

MCP server for Iconfont (iconfont.cn) - Search, download, and manage icons from China's largest icon library.

Features

  • Search Icons: Search for icons by name with filters for icon types (line, fill, flat, hand-drawn, etc.)

  • Download SVG: Download icon SVG data and save to files

  • List Projects: List your Iconfont projects (requires authentication)

Related MCP server: Svg/icons MCP

Installation

Global install

npm install guochen-thlg/icon-font-mcp -g

Run with npx

npx -y guochen-thlg/iconfont-mcp

Local run

Clone the repo and run directly:

git clone https://github.com/GuoChen-thlg/iconfont-mcp.git
cd iconfont-mcp
pnpm install && pnpm build
node dist/index.js

MCP Configuration

Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "iconfont": {
      "command": "npx",
      "args": ["-y", "guochen-thlg/iconfont-mcp"]
    }
  }
}

With Authentication

For features requiring authentication (like listing projects), set the ICONFONT_COOKIE environment variable:

export ICONFONT_COOKIE="your-iconfont-cookie"

To get the cookie:

  1. Log in to https://www.iconfont.cn/

  2. Open browser DevTools (F12)

  3. Go to Application/Storage → Cookies

  4. Copy the EGG_SESS_ICONFONT cookie value

Available Tools

iconfont_search_icons

Search for icons in the Iconfont library.

Parameters:

  • query (string, required): Search query for icon name

  • icon_type (string, optional): Icon style type - '' (all), 'line', 'fill', 'flat', 'hand', 'simple', 'complex'

  • page (number, optional): Page number (default: 1)

  • page_size (number, optional): Results per page, max 100 (default: 54)

  • response_format (string, optional): 'markdown' or 'json' (default: markdown)

iconfont_download_icon

Download SVG data for a specific icon.

Parameters:

  • icon_id (string, required): Icon ID from search results

  • project_id (string, optional): Project ID for icons in private projects

  • output_path (string, optional): Directory to save SVG file

  • filename (string, optional): Filename without extension

  • response_format (string, optional): 'markdown' or 'json' (default: markdown)

iconfont_list_projects

List your Iconfont projects (requires authentication).

Parameters:

  • cookie (string, optional): Iconfont cookie override

  • response_format (string, optional): 'markdown' or 'json' (default: markdown)

iconfont_login

Login to Iconfont by providing a cookie.

Parameters:

  • cookie (string, required): The EGG_SESS_ICONFONT cookie value

iconfont_auto_login

Auto login by opening a browser for manual authentication.

Parameters: None (opens a browser window automatically)

iconfont_check_login

Check if you are currently logged in with a valid cookie.

Parameters: None

iconfont_get_project_detail

Get detailed info about a specific project.

Parameters:

  • pid (string, required): Project ID

  • cookie (string, optional): Iconfont cookie override

  • response_format (string, optional): 'markdown' or 'json' (default: markdown)

iconfont_project_search_icons

Search icons within a specific project.

Parameters:

  • pid (string, required): Project ID

  • keyword (string, required): Search keyword

  • cookie (string, optional): Iconfont cookie override

  • page (number, optional): Page number (default: 1)

  • response_format (string, optional): 'markdown' or 'json' (default: markdown)

Development

# Install dependencies
pnpm install

# Build
pnpm run build

# Run in development mode
pnpm run dev

License

MIT

Available Tools

8 tools
iconfont_auto_loginAuto Login to Iconfont (Browser)A
Idempotent

Automatically open browser to log in to Iconfont and obtain authentication cookie.

This tool will:

  1. Try to open browser using Puppeteer

  2. If Puppeteer fails, use system command to open browser

  3. Let you log in manually in the browser

  4. Automatically detect when login is successful

  5. Store the authentication cookie for future API calls

Returns:

  • Success message with login status

Note: This opens a real browser for secure login. The browser will close automatically after login. This tool may take longer to complete as it waits for manual login.

Examples:

  • Use when: "I want to log in without manually copying cookie"

Inputs: no named parameters.

iconfont_check_loginCheck Login StatusA
Read-onlyIdempotent

Check if currently logged in to Iconfont.

Returns:

  • Current login status and whether a cookie is available

Inputs: no named parameters.

iconfont_download_iconDownload Iconfont Icon SVGA
Idempotent

Download SVG data for a specific icon from Iconfont.

This tool retrieves the SVG content for an icon and optionally saves it to a file. The icon_id can be obtained from the search results. For icons in private projects, you must provide the project_id parameter.

Args:

  • icon_id (string, required): The icon ID to download (from search results)

  • project_id (string, optional): Project ID for private project icons (from iconfont_list_projects)

  • output_path (string, optional): Directory path to save the SVG file

  • filename (string, optional): Filename for the downloaded SVG (without extension)

Returns: For JSON format: { icon_id: string, name: string, svg: string, saved_to: string | null } For markdown: Confirmation message with file path if saved

Examples:

  • Use when: "Download the home icon" -> icon_id from search results

  • Use when: "Download from a private project" -> icon_id, project_id

  • Use when: "Save to specific folder" -> output_path="./src/icons"

Inputs: icon_id (required), project_id, output_path, filename, +1 more.

iconfont_get_project_detailGet Iconfont Project DetailA
Read-onlyIdempotent

Get detailed information about a specific Iconfont project.

This tool retrieves project details including name, icon count, font family, etc. Results are cached for 5 minutes based on the project's update time to reduce API calls.

Args:

  • cookie (string, optional): The EGG_SESS_ICONFONT cookie from iconfont.cn. Can be used instead of setting environment variable.

  • pid (string, required): Project ID (can be obtained from iconfont_list_projects)

  • response_format ('markdown' | 'json', optional): Output format (default: markdown)

Returns: Project details including id, name, icon_count, font_family, created_at, updated_at

Examples:

  • Use when: "Get details of project 1997925" -> pid="1997925"

Inputs: pid (required), cookie, response_format.

iconfont_list_projectsList Iconfont ProjectsA
Read-onlyIdempotent

List all projects in the user's Iconfont account.

This tool requires authentication via Iconfont cookie. It returns all projects that the user has created or has access to.

Args:

  • cookie (string, optional): The EGG_SESS_ICONFONT cookie from iconfont.cn. Can be used instead of setting environment variable.

  • response_format ('markdown' | 'json', optional): Output format (default: markdown)

Returns: For JSON format: { projects: [{ id, name, icon_count, updated_at }] } For markdown: Human-readable list of projects

Note: Requires authentication. Can provide cookie via args, ICONFONT_COOKIE environment variable, or iconfont_login tool. Cookie can be obtained from browser dev tools after logging into iconfont.cn.

Examples:

  • Use when: "See all my icon projects"

  • Use when: "Find project ID for a specific project"

Inputs: cookie, response_format.

iconfont_loginLogin to IconfontA
Idempotent

Authenticate with Iconfont using browser cookie.

This tool allows you to login to your Iconfont account to access private projects and features that require authentication.

Args:

  • cookie (string, required): The EGG_SESS_ICONFONT cookie value from iconfont.cn

How to get the cookie:

  1. Log in to https://www.iconfont.cn/

  2. Open browser DevTools (F12)

  3. Go to Application/Storage → Cookies → https://www.iconfont.cn

  4. Copy the value of "EGG_SESS_ICONFONT" cookie

Returns:

  • Success or error message

Note: The cookie is stored in memory only and will be lost when the server restarts. For persistent login, set ICONFONT_COOKIE environment variable instead.

Examples:

  • Use when: "Login to access my private projects"

Inputs: cookie (required).

iconfont_project_search_iconsSearch Icons in Iconfont ProjectA
Read-onlyIdempotent

Search for icons within a specific Iconfont project using keyword.

This tool searches icons inside a specific project that the user has access to. Requires authentication via Iconfont cookie.

Args:

  • cookie (string, optional): The EGG_SESS_ICONFONT cookie from iconfont.cn. Can be used instead of setting environment variable.

  • pid (string, required): Project ID (can be obtained from iconfont_list_projects)

  • keyword (string, required): Keyword to search for icons within the project

  • page (number, optional): Page number for pagination (default: 1)

  • response_format ('markdown' | 'json', optional): Output format (default: markdown)

Returns: For JSON format: { total: number, page: number, icons: [...] } For markdown: Human-readable list with icon names and IDs

Note: Requires authentication. Can provide cookie via args, ICONFONT_COOKIE environment variable, or iconfont_login tool.

Examples:

  • Use when: "Search copy icons in project 1997925" -> pid="1997925", keyword="copy"

  • Use when: "Search text formatting icons in my project" -> pid="123456", keyword="text"

Inputs: pid (required), keyword (required), cookie, page, +1 more.

iconfont_search_iconsSearch Iconfont IconsA
Read-onlyIdempotent

Search for icons in the Iconfont icon library (iconfont.cn).

This tool searches the Iconfont database for icons matching the specified query. It provides access to millions of icons from various designers and collections.

Args:

  • query (string, required): Search query for icon name

  • icon_type (string, optional): Icon style type - '' for all, 'line' for outline, 'fill' for filled, 'flat' for flat, 'hand' for hand-drawn, 'simple' for simple, 'complex' for elaborate (default: all)

  • page (number, optional): Page number for pagination, starting from 1 (default: 1)

  • page_size (number, optional): Number of results per page, max 100 (default: 54)

  • response_format ('markdown' | 'json', optional): Output format (default: markdown)

Returns: For JSON format: { total: number, page: number, page_size: number, icons: [...] } For markdown: Human-readable list with icon names and IDs

Examples:

  • Use when: "Find home icons" -> query="home"

  • Use when: "Search outline-style arrows" -> query="arrow", icon_type="line"

  • Use when: "Get page 2 of search results" -> query="user", page=2

Inputs: query (required), icon_type, page, page_size, +1 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 8 tools

    Disambiguation4/5

    Most tools are clearly distinct, but the two login-related tools (iconfont_auto_login and iconfont_login) could cause confusion for an agent, though their descriptions clarify different use cases.

    Naming Consistency4/5

    All tools follow the 'iconfont_' prefix and snake_case, with mostly verb_noun patterns. Minor inconsistency: 'login' is a bare verb while others are compound, but overall consistent.

    Tool Count5/5

    8 tools is well-suited for the domain of icon management, covering authentication, project listing, search, and download without being overwhelming.

    Completeness4/5

    Covers core workflows (login, search, download) but misses advanced features like uploading icons or managing project content. Reasonable for the stated purpose.

    Maintenance

    ActivityNo data
    ResponsivenessSyncing

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI coding tools to search, inspect, recommend, and export SVG icons from svgicons.com for use in design systems, frontend projects, and AI-assisted workflows.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI assistants to search and download SVG icons from iconfont.cn, with support for style filtering and automatic login.
      2
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables searching, fetching SVG, and discovering icons from Iconify's 200,000+ icon library across 150+ sets.
      42 npm
      MIT