@opensvg/mcp
# @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)
TDQS
Scored across 6 tools
Each tool has a clearly distinct purpose: discovery (search_icons vs list_collections on icons vs collections), retrieval (get_icon vs get_my_collections on public vs private data), and two orthogonal SVG utilities (sanitize_svg, svg_to_data_uri). No two tools could plausibly be selected for the same task.
Five of six tools follow a clean verb_noun pattern (search_icons, get_icon, list_collections, sanitize_svg, get_my_collections). svg_to_data_uri deviates into a source_to_target conversion style, but it remains self-explanatory and is a minor, defensible exception.
Six tools is well-scoped for an icon search server: one discovery path per resource, one retrieval path per source, and two focused SVG helpers. Every tool earns its place with no filler or redundant entries.
The core lifecycle — search collections, list icons, fetch markup/components, and post-process SVGs — is fully covered. The gap is on the private-collection side: get_my_collections is read-only, with no tools to create, bookmark, or manage custom collections, forcing agents into a dead end for write operations.