OpenIcons ships an MCP server, @openbase/icons-mcp, for AI coding agents. Once it's connected, the agent looks icons up instead of guessing: it searches by meaning, checks the name exists, and writes the right import for @openbase/icons-react or openbase_icons, in any weight and appearance.
It runs on your machine over stdio, straight from your checkout of the repository. Nothing is hosted and it needs no network or API key.
What it can do
search_icons: finds icons by meaning or name, and copes with typos: "delete" →trash, "settings" →gear, "calender" →calendar. Can be limited to one category.view_icon: an icon as standalone SVG in either weight and any appearance (flat, raised, drawn), at a size and colour.get_icon_code: the import and usage for React, Flutter or plain SVG, e.g.<TrashIcon weight="filled" appearance="raised" />orOpenbaseIcons.trash(weight: IconWeight.filled).morph_icons: the code that morphs one icon into another (plus → x, sun → moon) in React or Flutter, with a spring preset.list_categories: every category with its count and examples.
Things to ask
- "Add a delete button with the OpenIcons trash icon, filled and raised."
- "Which OpenIcons icons would work for sync? Show me a few."
- "In Flutter, morph the menu button from menu to x when the drawer opens."
- "Give me the arrow-left icon as an SVG in #1346E7."
CLAUDE.md, AGENTS.md, .cursor/rules): "Use the openicons MCP tools for icons; never guess icon names."Set up
Build the server once in your checkout. Every client below then starts it with node and the absolute path to dist/index.js.
pnpm install
pnpm run build:mcp
# The path your client needs (use your own checkout's location)
/path/to/useicons/packages/icons-mcp/dist/index.jsC:/Users/you/useicons/packages/icons-mcp/dist/index.js. Restart or reload the client after changing its config.Claude Code
Add it with one command. --scope user makes it available in every project; leave it out to add it to the current project only.
claude mcp add --scope user openicons -- node /path/to/useicons/packages/icons-mcp/dist/index.jsInside the OpenIcons repository you don't need to add anything: its .mcp.json already registers the server, and Claude Code asks you to approve it the first time. Run /mcp in a session to check it's connected.
Cursor
Add the server to ~/.cursor/mcp.json for every project, or .cursor/mcp.json in one project. Then open Cursor Settings → MCP and check that openicons is on, with its five tools listed.
{
"mcpServers": {
"openicons": {
"command": "node",
"args": ["/path/to/useicons/packages/icons-mcp/dist/index.js"]
}
}
}Antigravity
In the Agent panel, open the … menu, choose MCP Servers, then Manage MCP Servers → View raw config. Add the server to mcp_config.json, save, and refresh the list.
{
"mcpServers": {
"openicons": {
"command": "node",
"args": ["/path/to/useicons/packages/icons-mcp/dist/index.js"]
}
}
}VS Code (GitHub Copilot)
Add .vscode/mcp.json to a workspace (or run MCP: Add Server from the Command Palette). VS Code uses servers instead of mcpServers. Then pick the openicons tools in Copilot Chat's agent mode.
{
"servers": {
"openicons": {
"type": "stdio",
"command": "node",
"args": ["/path/to/useicons/packages/icons-mcp/dist/index.js"]
}
}
}Windsurf
Add the server to ~/.codeium/windsurf/mcp_config.json (or open it from Windsurf Settings → Cascade → MCP Servers), then refresh the servers in Cascade.
{
"mcpServers": {
"openicons": {
"command": "node",
"args": ["/path/to/useicons/packages/icons-mcp/dist/index.js"]
}
}
}Codex CLI
Add a table to ~/.codex/config.toml.
[mcp_servers.openicons]
command = "node"
args = ["/path/to/useicons/packages/icons-mcp/dist/index.js"]Gemini CLI
Add the server to ~/.gemini/settings.json (or .gemini/settings.json in a project), then run /mcp to check it.
{
"mcpServers": {
"openicons": {
"command": "node",
"args": ["/path/to/useicons/packages/icons-mcp/dist/index.js"]
}
}
}Claude Desktop
Open Settings → Developer → Edit Config, add the server to claude_desktop_config.json, and restart Claude.
{
"mcpServers": {
"openicons": {
"command": "node",
"args": ["/path/to/useicons/packages/icons-mcp/dist/index.js"]
}
}
}Other clients
Any MCP client that runs local servers works the same way: a stdio server whose command is node with the path to dist/index.js as its only argument. No environment variables are needed. Most clients take the same mcpServers block shown above.
Keeping it current
The server reads an index built from the source SVGs and the generated React, morph and Flutter files, so every name it suggests exists in the packages. pnpm run generate:all refreshes it after you add icons; pnpm run generate:mcp refreshes only the index. Restart your client afterwards to load the new icons.
Troubleshooting
- The server won't start. Run
pnpm run build:mcpin the repo, then check the path in your config points at your checkout'sdist/index.js. - Node isn't found. Some apps don't see your shell's PATH: use the full path to Node (
which nodeorwhere node) as the command. - New icons are missing. Run
pnpm run generate:mcpand restart the client. - The agent still guesses names. Ask it to use the openicons tools, or add that rule to your agent's instructions file.