Skip to content
theSVG

Use the theSVG MCP server in your AI editor

Instead of pasting logo files into a chat, let the assistant look them up. This guide adds the theSVG MCP server to an editor, checks the tools it exposes, and shows prompts that use them well.

  • Beginner
  • 2 min read
On this page

Before you start

  • Node.js 18 or later.
  • An editor or assistant that can run MCP servers over stdio.

What the server does

The server runs on your machine and speaks MCP over stdio. It gives the assistant five tools: search_icons, get_icon, list_variants, get_icon_url and list_categories. The registry ships inside the package, so search, variant lists and URLs work offline. Only get_icon goes to the network, to fetch the SVG itself.

Connect it

  1. Step 1Check Node.js

    The server runs through npx, so the editor needs Node.js 18 or later on its path.

    bash
    node --version
  2. Step 2Add the server to your MCP config

    Most clients read an mcpServers block. In Cursor, put it in .cursor/mcp.json in the project, or in ~/.cursor/mcp.json for every project.

    mcp.json
    {
      "mcpServers": {
        "thesvg": {
          "command": "npx",
          "args": ["-y", "@thesvg/mcp-server"]
        }
      }
    }
  3. Step 3Or add it from the terminal

    Claude Code registers MCP servers with one command.

    bash
    claude mcp add thesvg -- npx -y @thesvg/mcp-server
  4. Step 4Or add it to a desktop assistant

    Claude Desktop reads the same mcpServers block from ~/Library/Application Support/Claude/claude_desktop_config.json on macOS, or %APPDATA%\Claude\claude_desktop_config.json on Windows.

  5. Step 5Reload and check the tools

    Restart the editor or reload its MCP servers. The five tools should appear under thesvg. If they do not, run the command from your config in a terminal to see the error.

  6. Step 7Ask for a URL when you only need to embed it

    For an img tag, a README or a Markdown page, a URL is enough. get_icon_url returns a CDN link without fetching the SVG, which is quicker than get_icon.

    text
    Give me a CDN URL for the GitHub logo from theSVG and an
    img tag for it, 32 pixels wide.
  7. Step 8Install it globally for a faster start

    npx -y resolves the package on each start. A global install starts the thesvg-mcp command directly.

    bash
    npm install -g @thesvg/mcp-server
    
    # then, in the mcpServers block
    "thesvg": { "command": "thesvg-mcp" }
Questions

Frequently asked questions

Do I need an API key?

No. The server reads an open registry that ships inside the package, and fetches SVG files from a public CDN.

Does it work offline?

Searching, listing variants and categories, and building CDN URLs work offline from the bundled registry. Fetching SVG markup with get_icon needs a network connection.

How do I get logos added after I installed it?

The registry is bundled when the package is built, so a newer package release brings the newer logos. Update the package to refresh it.

Keep going
Next steps

Take it further with theSVG

The product page covers what it does, how to install it and where the docs live.