Skip to main content
Glama
SVGForge MCP

SVGForge MCP

by liqiang88

SVGForge MCP

Lightweight Model Context Protocol bridge for SVGForge. Search Iconify icons and fetch SVG / React / Vue / Svelte code from Cursor, Claude Desktop, and other MCP clients.

Uses a lightweight stdio bridge → cloud API pattern. No local icon database.

Install / run

git clone https://github.com/liqiang88/svgforge-mcp.git
cd svgforge-mcp
npm install
npm run build
node dist/index.js

Or after publish:

npx -y svgforge-mcp

Related MCP server: Svg/icons MCP

Environment

Variable

Required

Default

Description

SVGForge_API_KEY

For private tools

—

Personal token sf_… from Dashboard → API tokens

SVGForge_API_BASE

No

https://svgforge.dev

API origin (no trailing slash)

SVGForge_MCP_ALLOW_WRITE

No

off

Set 1 to enable add_to_collection

Public tools work without a key: search_icons, get_icon, list_icon_sets, sanitize_svg, svg_to_data_uri.

Cursor

Open Settings → Customize → MCPs, then add / edit the server (writes mcp.json).

Published package:

{
  "mcpServers": {
    "svgforge": {
      "command": "npx",
      "args": ["-y", "svgforge-mcp"],
      "env": {
        "SVGForge_API_KEY": "sf_xxx",
        "SVGForge_API_BASE": "https://svgforge.dev"
      }
    }
  }
}

Local checkout:

{
  "mcpServers": {
    "svgforge": {
      "command": "node",
      "args": ["D:/wwwroot/luo-project/svgforge-mcp/dist/index.js"],
      "env": {
        "SVGForge_API_KEY": "sf_xxx",
        "SVGForge_API_BASE": "https://svgforge.dev"
      }
    }
  }
}

Replace the args path with your local clone’s dist/index.js.

After saving, confirm svgforge shows as connected under Customize → MCPs. Restart MCP or Cursor if the status stays grey.

Connected and calling get_icon in Cursor:

Cursor MCP get_icon demo

Claude Desktop

In claude_desktop_config.json:

{
  "mcpServers": {
    "svgforge": {
      "command": "npx",
      "args": ["-y", "svgforge-mcp"],
      "env": {
        "SVGForge_API_KEY": "sf_xxx"
      }
    }
  }
}

Tools

Tool

Auth

Description

search_icons

—

Search by keyword / prefix

get_icon

—

SVG or react / vue / svelte / data-uri

list_icon_sets

—

Browse icon packs

get_my_collections

Token

User collections

get_custom_icons

Token + Pro

Private uploads

sanitize_svg

—

Strip XSS-ish payloads

svg_to_data_uri

—

CSS / img Data URI

add_to_collection

Token + ALLOW_WRITE=1

Add icon to a collection

Requests send X-SVGForge-Client: mcp for traffic attribution.

Token

  1. Sign in at svgforge.dev

  2. Open Dashboard → API tokens

  3. Create a token (sf_…) — same token works for the VS Code extension

Privacy

The bridge only calls the SVGForge HTTPS API. It does not scan your disk or upload project files.

License

MIT

Available Tools

7 tools
get_custom_iconsA

List private custom icons for the authenticated Pro user. Requires SVGForge_API_KEY and Pro plan.

Inputs: no named parameters.

get_iconA

Fetch a single icon as raw SVG or auto-generated React / Vue / Svelte / Data URI code.

Inputs: name (required), format.

get_my_collectionsA

List collections for the authenticated SVGForge user. Requires SVGForge_API_KEY.

Inputs: no named parameters.

list_icon_setsB

List available SVGForge icon packs (Lucide, Tabler, etc.).

Inputs: q, limit.

sanitize_svgA

Sanitize raw SVG: strip script tags, event handlers, dangerous URLs, and DOCTYPE/ENTITY payloads.

Inputs: svg (required).

search_iconsB

Search SVGForge / Iconify icons by keyword. Returns icon keys (prefix:name) and brief meta. Prefer a prefix (e.g. lucide) for faster results.

Inputs: q (required), limit, prefix.

svg_to_data_uriA

Convert raw SVG into a Data URI for CSS background-image or HTML img src.

Inputs: svg (required), encoding.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 7 tools

    Disambiguation4/5

    Search vs. fetch vs. list are clearly separated, and the three listing tools (icon sets, user collections, custom icons) are scoped to distinct resources by name and description. Minor overlap: get_icon can emit a Data URI while svg_to_data_uri also produces one, and get_my_collections vs. get_custom_icons could be momentarily conflated by an agent unfamiliar with the SVGForge model.

    Naming Consistency4/5

    Five tools follow a clean verb_noun pattern (search_icons, get_icon, list_icon_sets, get_my_collections, get_custom_icons). sanitize_svg and svg_to_data_uri deviate into verb_object / object_to_object forms, but all names remain snake_case and self-explanatory.

    Tool Count5/5

    Seven tools is well within the ideal range and every tool serves a distinct role: discovery, retrieval, set/collection listing, and two SVG post-processing utilities. Nothing feels padded or missing at the count level.

    Completeness4/5

    The read/search/transform lifecycle is covered end to end: find icons, inspect sets, access private collections, and sanitize/convert output. Gaps exist on the write side — there is no way to upload or manage custom icons or create/modify collections — but for a fetch-and-prepare server these are workable omissions.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Visual icon search, retrieval, and comparison for AI agents. Search 200k+ icons semantically, render side-by-side comparison grids, and retrieve raw SVG markup — all tools return images so vision-capable LLMs can see the icons.
      1
      -
    • 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 2000+ bundled Lucide icons by keyword and generate one or many styled SVGs with consistent stroke width, color, and size, entirely offline without API keys.
      MIT