← MCP server guides

MCP Server Guide

Kagi MCP Server: Search With Kagi From Your Agent

Kagi is not one of the built-in search engines, so the Search selector will never get you there. Two routes do work: install the Kagi skill from the skills marketplace, or connect Kagi’s official MCP server.

The short answer

Kagi publishes an official MCP server at github.com/kagisearch/kagimcp, distributed on PyPI as kagimcp. There is also a Kagi skill in the OpenClaw Launch skills marketplace, which is the quicker of the two. What Kagi is not is a built-in search backend, so no amount of changing the search engine setting will reach it.

What is the Kagi MCP server?

The first thing worth clearing up is the category. Kagi is not one of the eight built-in web search backends (Firecrawl, SearXNG, Tavily, Exa, Parallel, Brave, xAI and DuckDuckGo), so switching the Search selector will never get you there. It arrives instead as something you add: either a skill, or an MCP server.

The quick route is the Kagi skill in the skills marketplace at https://openclawlaunch.com/dashboard/skills. It installs onto an OpenClaw or Hermes instance in one click and ships three small dependency-free Python wrappers — a ranked search, a FastGPT answer with cited references, and a shared client. You supply a Kagi API token as KAGI_API_TOKEN and the agent calls Kagi directly.

Once connected, the server gives your agent two tools. kagi_search_fetch runs web, news, video, podcast and image searches, with optional page extracts, filters and Kagi lenses. kagi_extract pulls a single page down as clean markdown. Both bill against your own Kagi API balance, so the agent searches with your Kagi account rather than a shared pool.

Kagi API access is self-serve. There is no invite list and no waitlist — you generate a key in Kagi’s API portal and pay per request. That makes this a bring-your-own-key setup: the search quality and the bill are both yours, and nothing about it depends on your agent host reselling Kagi access.

What you should know before connecting it

Official, not a community port

The server is published by Kagi themselves at github.com/kagisearch/kagimcp and shipped to PyPI as kagimcp. Community Kagi integrations exist that download a prebuilt binary at runtime; the official MCP server avoids that entirely.

Two tools today

kagi_search_fetch covers web, news, video, podcast and image search with optional extracts and lenses. kagi_extract returns a page as markdown. The older fastgpt and summarizer tools were removed and are planned to return in a later release.

Pay per request, no subscription tier to pick

Kagi bills the Search API at $12 per 1,000 requests and the Extract API at $4 per 1,000 pages. You are invoiced when usage reaches $100 or at the end of the monthly cycle, whichever lands first.

Run it with uvx, not pip

The package pins Python 3.12, while most agent containers now run 3.13. Installing it into the agent’s own Python environment fails on that pin. Running it through uvx sidesteps the problem because uvx provisions its own matching Python.

Stdio by default, HTTP when you need it

The server speaks stdio out of the box, which is what a local agent wants. It also has an --http mode where each request carries its own key in an Authorization header, so one instance can serve several users.

Setup plan

  1. Generate a Kagi API keyGo to the API portal at https://kagi.com/api/keys and generate a key, then add funds to the API balance. On Family and Team plans only the account owner can reach the portal, so use that account if you are on one.
  2. Easiest path: install the Kagi skillOpen https://openclawlaunch.com/dashboard/skills, search for Kagi, and install it onto your instance. Then make your token available to the agent as KAGI_API_TOKEN. If that covers what you need, you can stop here — the rest of these steps are the MCP route.
  3. Add the server to your agentOn Hermes the one-liner is: hermes mcp add kagi --command uvx --env KAGI_API_KEY=your-key-here --args kagimcp. Keep --args last — it swallows everything after it, so a flag placed behind it is read as an argument to kagimcp rather than as a flag. That writes an entry under mcp_servers in config.yaml, which is the same thing you can edit by hand if you prefer.
  4. Load it without a restartRun /reload-mcp in a live session to pick up the new server and refresh the tool list. A full restart works too, but is rarely necessary.
  5. Confirm the tools arrivedhermes mcp list shows the configured servers and hermes mcp test checks the connection. After that, kagi_search_fetch and kagi_extract should appear alongside the built-in tools.
  6. Decide whether Kagi replaces built-in searchAdding the MCP server puts Kagi next to the existing search rather than on top of it. If you want Kagi to be the agent’s default way of searching, say so in the agent’s instructions, otherwise it will keep reaching for whichever tool it judges best.

Useful agent workflows

Research that avoids SEO filler

Kagi’s index is the reason most people pay for it. Pointing an agent at it tends to surface primary sources and documentation rather than the content farms a free engine returns.

Read a page properly, not a snippet

kagi_extract turns a URL into clean markdown, which is a far better input for summarising a long article or a spec than a search snippet.

News and podcast monitoring

The search tool covers news, video and podcast verticals, so a scheduled agent can watch a topic across formats and report what actually changed.

Keeping search spend visible

Because the key is yours and billing is per request, search usage shows up on your own Kagi invoice instead of disappearing into a bundled allowance.

Security checklist

  • Treat the Kagi API key like any other credential — it maps directly to money on your account.
  • Add funds deliberately rather than leaving a large balance sitting available to an automated agent.
  • Watch usage early on. An agent told to research aggressively can run a lot of searches before anyone notices.
  • Remember that search results are untrusted input: a page an agent fetches can attempt prompt injection against it.
  • Prefer the official kagimcp package over community Kagi tools that download a prebuilt binary from a release page at runtime.
  • Rotate the key from the Kagi API portal if it has ever been pasted somewhere shared, and remove the MCP entry when the agent is retired.

Treat every MCP tool as an API capability, not as a harmless chat feature. Start read-only, test in a non-production account, and require human approval for changes.

Frequently asked questions

Is there a Kagi skill I can just install?

Yes. The skills marketplace at https://openclawlaunch.com/dashboard/skills has a Kagi skill that installs in one click on an OpenClaw or Hermes instance. It wraps Kagi’s search and FastGPT endpoints in small dependency-free Python scripts and needs your own Kagi token in KAGI_API_TOKEN. The official MCP server is the alternative, and gives the agent Kagi search and page extraction as native tools instead.

Should I use the skill or the MCP server?

The skill is faster to set up and is the better first try. The MCP server is worth it if you want Kagi exposed as proper agent tools, including page extraction to clean markdown, or if you would rather run the software Kagi publishes and maintains itself.

Can I pick Kagi from the search engine selector?

Not today. The built-in Hermes search backends are Firecrawl, SearXNG, Tavily, Exa, Parallel, Brave, xAI and DuckDuckGo. Kagi is not one of them, which is exactly why it is added over MCP instead.

What does Kagi search cost through the API?

The Search API is $12 per 1,000 requests and the Extract API is $4 per 1,000 pages, billed as you use them. Kagi invoices when usage reaches $100 or at the end of the monthly billing cycle, whichever comes first.

Do I need an invite for Kagi API access?

No. API access is self-serve — you generate a key in the API portal and add funds. There is no waitlist. On Family and Team plans, only the account owner can open the portal.

Why does the install use uvx instead of pip?

The kagimcp package pins Python 3.12 while most agent containers run 3.13, so installing it into the agent’s own environment fails. uvx provisions a matching Python for the tool, which avoids the conflict.

Primary documentation

Verify current endpoints, permissions, and preview limitations in the official Kagi MCP server repository before production rollout. Vendor capabilities can change faster than third-party guides.

Run an MCP-ready AI agent without server maintenance

OpenClaw Launch handles the agent host, updates, and uptime so you can focus on safe tool design.

Configure your agent