IconSearch logoIconsearch
Icons for agents
IconSearch MCP guide

Give your coding agent a consistent icon workflow.

Connect once, search by interface intent, retrieve the exact SVG with licence metadata, and keep approved decisions in the repository.

01

Generate your private API key

Requirements: Node.js 20 or newer, an MCP-capable Codex installation, and an IconSearch account. First generate an API key from your account. IconSearch shows the complete key only once and gives you a ready-to-copy setup command.

  1. Sign in on the account page and press Generate API key.
  2. Copy the new key immediately. It begins with ics_live_.
  3. Choose one Codex setup option below. You do not need to use both.

Treat the key like a password. Never put it in a project, GitHub commit, screenshot, chat message, or support ticket.

02

Connect Codex — choose one setup option

Both options create the same global Codex connection. Set it up once on each computer, not once for every project. You only need to edit it later if you replace or revoke the API key.

Option A · easiest when the Codex CLI works

Use one command in PowerShell or Terminal

Use this option only when your computer recognizes the codex command. Run these commands in the Windows PowerShell app, macOS Terminal, or your IDE terminal — not inside a Codex chat.

  1. Open PowerShell or Terminal.
  2. Run codex --version. If you see a version number, continue. If you see “not recognized,” use Option B.
  3. Copy the complete command from your IconSearch account. It already contains your real key. If you use the example below, replace YOUR_API_KEY.
PowerShell or Terminal
codex mcp add iconsearch --env ICONSEARCH_TOKEN=YOUR_API_KEY -- npx -y @iconsearch/mcp-server
  1. Run codex mcp list. The list should contain iconsearch.
  2. Fully close Codex, including every open Codex window, then reopen it.
  3. Start a new task, type /mcp, and confirm IconSearch appears.
Optional checks
codex --version
codex mcp list
Option B · use when “codex is not recognized”

Edit the global Codex config file

This is the reliable Windows setup for the Codex desktop app. The file belongs to Codex on your computer; it does not belong inside your website or another project.

  1. Open Windows PowerShell.
  2. Find the exact Node.js launcher path by running the command below. Use the result ending in npx.cmd.
Windows PowerShell
where.exe npx
  1. Open the global Codex configuration file with this command. If Notepad asks to create it, choose Yes.
Windows PowerShell
New-Item -ItemType Directory -Force "$env:USERPROFILE\.codex" | Out-Null
notepad "$env:USERPROFILE\.codex\config.toml"
  1. Keep any settings already in the file. Add the block below at the end.
  2. Replace PASTE_YOUR_NEW_KEY_HERE with the complete key from your IconSearch account.
  3. If where.exe npx showed a different location, replace the command path. Use forward slashes inside TOML.
Windows · ~/.codex/config.toml
[mcp_servers.iconsearch]
command = "C:/Program Files/nodejs/npx.cmd"
args = ["-y", "@iconsearch/mcp-server"]

[mcp_servers.iconsearch.env]
ICONSEARCH_TOKEN = "PASTE_YOUR_NEW_KEY_HERE"

This local config file now contains your private key. Do not upload, sync, share, or commit the file.

  1. Make sure the file contains only one [mcp_servers.iconsearch] block, then save it.
  2. Fully close every Codex window and reopen Codex. Configuration is loaded when Codex starts.
  3. Start a new task, type /mcp, and confirm IconSearch appears.

macOS or Linux manual config

Open ~/.codex/config.toml in a text editor and append this version. On these systems the command is normally just npx.

macOS or Linux · ~/.codex/config.toml
[mcp_servers.iconsearch]
command = "npx"
args = ["-y", "@iconsearch/mcp-server"]

[mcp_servers.iconsearch.env]
ICONSEARCH_TOKEN = "PASTE_YOUR_NEW_KEY_HERE"

Safe first test

In a new Codex task, paste this prompt. It searches only and explicitly prevents file changes:

Codex task
Use IconSearch to find five icons for settings navigation. Do not change any files.

Codex desktop, Codex CLI, and the Codex IDE extension share the global ~/.codex/config.toml on the same computer. Do not add this block to every repository. See the official Codex MCP documentation .

03

How the system works

1. Codex starts IconSearch

The npm package runs locally and tells Codex which icon tools are available.

2. Your key proves access

The private API key identifies your account. It can be revoked from the account page at any time.

3. The website answers

Search and exact-icon requests go to the authenticated IconSearch API, where access and daily usage are checked.

4. Decisions stay with the code

Approved SVGs and their semantic names are saved locally so every teammate and agent can reuse them.

04

Configure another MCP client

Use this standard stdio configuration when your client accepts JSON MCP server settings:

configuration
{
  "mcpServers": {
    "iconsearch": {
      "command": "npx",
      "args": ["-y", "@iconsearch/mcp-server"],
      "env": { "ICONSEARCH_TOKEN": "YOUR_API_KEY" }
    }
  }
}

Replace YOUR_API_KEY with the key shown once on your IconSearch account page. Keep this configuration outside your repository. Set ICONSEARCH_PROJECT_ROOT only if the client starts the server outside your repository. For local development, ICONSEARCH_API_BASE may use a loopback HTTP URL; every non-local endpoint must use HTTPS.

05

Use the project-aware workflow

  1. Read iconsearch_get_project_icons before choosing a new icon.
  2. Reuse an existing semantic assignment when it already represents the requested purpose.
  3. Search with product intent such as “billing history” instead of guessing a package export.
  4. Retrieve the exact candidate and review its source and licence requirements.
  5. Save only after the icon is approved; then audit before shipping.
06

All ten available tools

iconsearch_start_sign_in

Start the secure browser device sign-in flow.

iconsearch_finish_sign_in

Finish an approved sign-in and store the revocable local session.

iconsearch_status

Check the account connection without exposing the token.

iconsearch_sign_out

Remove the locally saved IconSearch session.

iconsearch_get_project_icons

Read visual defaults and approved semantic icon assignments.

iconsearch_search

Search by intent, collection, style, licence safety, and page.

iconsearch_get_icon

Retrieve exact sanitized SVG plus source, author, and licence metadata.

iconsearch_save_project_icon

Save an approved SVG and update project memory. This changes files.

iconsearch_audit_project_icons

Report missing or changed managed files, inline SVGs, unmanaged assets, and mixed packages.

iconsearch_snippet

Create React, SVG, Vue, Svelte, Tailwind, or URL output for compatible workflows.

07

Project manifest

The first save creates iconsearch.json and stores sanitized files under .iconsearch/icons. Commit both so teammates and agents share the same decisions.

configuration
{
  "version": 1,
  "style": {
    "preferredLibraries": ["lucide"],
    "defaultSize": 20,
    "color": "currentColor",
    "strokeWidth": 2
  },
  "icons": {}
}

Each saved icon records a SHA-256 checksum, original library and name, source attribution, licence metadata, and the time it was approved.

08

Security model

Bounded writes

The save tool writes only the manifest and managed SVG directory inside a validated project root.

Symlink protection

Reads, writes, and audits refuse symlink traversal and filesystem-root projects.

Sanitized SVG

Scripts, embedded documents, event handlers, unsafe protocols, and external resources are rejected.

Revocable access

API keys are stored as unreadable fingerprints on the server, expire after 90 days, and can be revoked from your account.

Server-side limits

Authentication, plan access, and daily usage are checked before search or SVG retrieval.

No committed secrets

The project manifest stores icon decisions and checksums, never your API key.

Review changes produced by any coding agent before committing or deploying them.

09

Verify that everything is working

terminal
npm view @iconsearch/mcp-server version license
  1. The npm command should report version 0.2.0 and licence MIT.
  2. If you used Option A, codex mcp list should include a server named iconsearch. If you used Option B, check with /mcp in a new Codex task.
  3. Ask Codex to call iconsearch_status; it should report connected: true without showing your key.
  4. Ask for “billing history.” Search should return relevant candidates such as a receipt or history icon.
  5. Return to your account page. The key should now say Last used with a recent date.
  6. In a test repository, approve one icon, save it, and confirm that only iconsearch.json and .iconsearch/icons changed.
  7. Run iconsearch_audit_project_icons and review the report before committing.

Technical verification only: inspect the published IconSearch package on npm .

10

Troubleshooting

PowerShell says codex is not recognized.
The Codex CLI is not available in that terminal. Use the manual global config in Option B; the desktop app can still load IconSearch from that file.
The npx command is missing or fails to start.
Install Node.js 20 or newer, reopen the terminal, and run the install command again.
IconSearch does not appear after I changed config.toml.
Check for duplicate IconSearch blocks or a wrong npx.cmd path, save the file, fully exit Codex, and start a new task after reopening it.
The server says the Agent API is not configured.
The production Supabase project is missing the latest agent-usage migration. Apply it, then redeploy the website.
Search says authentication is required.
Generate a new API key and copy the complete setup command again. If you revoked or replaced a key, restart Codex after updating the configuration.
The server cannot find my project.
Start the MCP client from the repository or set ICONSEARCH_PROJECT_ROOT to an existing project directory.
An SVG could not be saved.
The icon may contain active or external content, the semantic name may not be kebab-case, or the destination may already exist.