Add IconServe to Vercel AI SDK

IconServe gives Vercel AI SDK 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.

Define a tool()

import { tool } from "ai";
import { z } from "zod";

export const findIcon = tool({
  description: "Find an icon by name or description; returns an SVG URL.",
  parameters: z.object({ query: z.string() }),
  execute: async ({ query }) => {
    const r = await fetch(
      `https://icons-for-agents.site/api/search?q=${encodeURIComponent(query)}&limit=1`,
    ).then((r) => r.json());
    return r.results[0]?.svg_url ?? "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.

Vercel AI SDK MCP docs →