Add IconServe to Anthropic API (tool use)

IconServe gives Anthropic API (tool use) access to 10,000+ open-source icons (Lucide, Heroicons, Tabler, Simple Icons) as SVG or PNG — searchable by name or natural language. Free, no API key.

Declare the tool + handle the call

# tool definition passed to client.messages.create(tools=[...])
tool = {
    "name": "find_icon",
    "description": "Find an icon by name or description; returns an SVG URL.",
    "input_schema": {
        "type": "object",
        "properties": {"query": {"type": "string"}},
        "required": ["query"],
    },
}

# when Claude calls the tool:
import requests
def find_icon(query: str) -> str:
    r = requests.get("https://icons-for-agents.site/api/search", params={"q": query, "limit": 1}).json()
    return r["results"][0]["svg_url"] if r["results"] else "no icon found"

Try it

Ask your agent: "use iconserve to find a settings icon." It will call search_icons and return ready-to-use SVG URLs.

Anthropic API (tool use) MCP docs →