Skip to main content
Glama
README.md
# @opensvg/mcp

> Model Context Protocol (MCP) server for [OpenSVG](https://opensvg.dev). Connect 322,000+ vector icons directly to Cursor IDE, Claude Desktop, Antigravity, and Windsurf.

---

## ⚡ Quickstart

### Cursor IDE Setup

Add to `.cursor/mcp.json` in your project root:

```json
{
  "mcpServers": {
    "opensvg": {
      "command": "npx",
      "args": ["-y", "@opensvg/mcp"],
      "env": {
        "OPENSVG_API_KEY": "osvg_live_YOUR_API_KEY_HERE"
      }
    }
  }
}
```

### Claude Desktop Setup

Add to `claude_desktop_config.json`:

- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`

```json
{
  "mcpServers": {
    "opensvg": {
      "command": "npx",
      "args": ["-y", "@opensvg/mcp"],
      "env": {
        "OPENSVG_API_KEY": "osvg_live_YOUR_API_KEY_HERE"
      }
    }
  }
}
```

---

## 🛠️ Available Tools

1. **`search_icons`**: Typo-tolerant search across 320,000+ icons by keyword, tags, collection, and category.
2. **`get_icon`**: Fetch vector code in raw SVG, React JSX, Vue 3, Svelte, or Data URI formats.
3. **`list_collections`**: Discover available icon packs (Lucide, Heroicons, Phosphor, Tabler, etc.).
4. **`sanitize_svg`**: Strip malicious scripts, event listeners, and XML bomb vulnerabilities.
5. **`svg_to_data_uri`**: Generate URL-encoded CSS `background-image` or HTML `img` `src` snippets.
6. **`get_my_collections`**: Access private custom collections (OpenSVG Pro).

---

## 🔑 Authentication & Quotas

Get your personal API key from the [OpenSVG Dashboard](https://opensvg.dev/dashboard/api-keys).

- **Guest (No Key)**: 5 requests / min
- **Free Account**: 30 requests / min & 300 requests / day
- **Pro Account**: 120 requests / min & 5,000 requests / day

---

## 📄 License

MIT © [OpenSVG](https://opensvg.dev)