Kagi MCP Server – Private Search and Extraction
Kagi MCP Server is the official Model Context Protocol server for Kagi Search and related tools. It gives MCP-compatible clients access to Kagi-backed web, news, video, podcast, and image search plus page-content extraction, using a Kagi API key for authentication.
Overview
Kagi MCP Server is Kagi's official MCP integration for connecting AI agents to the Kagi API. It is designed for MCP-compatible clients that need live search results and page extraction rather than relying only on model training data. The server is maintained under the kagisearch/kagimcp GitHub organization and is documented from Kagi's own API Portal.
What the MCP server enables
The server exposes two documented tools. kagi_search_fetch supports web, news, videos, podcasts, and image search, with optional page extracts, filtering, and Kagi lenses. kagi_extract fetches a page's full content as Markdown so an AI client can work with page text directly. Kagi documents that earlier kagi_fastgpt and kagi_summarizer tools have been removed and are planned to return later, so they should not be assumed available.
When to use it
Use this MCP server when an assistant needs fresh, search-backed context from Kagi or needs to extract readable Markdown from a web page. It is useful for research tasks, current-event checks, domain-filtered searches, search workflows that use Kagi lenses, and page-content review. It is not a general browser automation tool and should not be used as if it exposes every Kagi API product.
Connection and authentication
The recommended local connection uses stdio with uvx kagimcp and requires the KAGI_API_KEY environment variable. Kagi also documents a self-hosted Streamable HTTP mode, started with uv run kagimcp --http --host 0.0.0.0 --port 8000. In HTTP mode, requests provide the API key with Authorization: Bearer <key> rather than a server-wide environment variable, which allows one HTTP instance to serve multiple users.
Key considerations
A valid Kagi API key is required. Kagi's API Portal lets users generate, label, monitor, restrict, and revoke API keys, and API usage is billed according to Kagi's API billing and usage controls. For least-privilege operation, create a dedicated API key, restrict it to required API products or IP addresses where appropriate, and keep it in environment variables or MCP client secret storage rather than committing it to configuration files.
Supported Transports
stdio
Command: uvx
Args:
kagimcp
streamable_http
URL: http://127.0.0.1:8000/mcp
Frequently Asked Questions
- When should an AI agent use the Kagi MCP Server?
- Use it when the agent needs live search results from Kagi or needs to extract a web page's content as Markdown for analysis. Kagi's documented examples include search questions and extracting the full content of a page URL.
- What tools does the Kagi MCP Server expose?
- The current documented tools are `kagi_search_fetch` for web, news, video, podcast, and image search, and `kagi_extract` for fetching a page's full content as Markdown. Removed tools such as `kagi_fastgpt` and `kagi_summarizer` should not be treated as available.
- What Kagi APIs does this MCP server currently support?
- Kagi documents that the MCP server currently supports the new Search and Extract APIs. Other Kagi APIs, including additional API products listed in the API Portal, should not be assumed to work through this MCP server unless the Kagi documentation is updated.
- How is authentication configured for the Kagi MCP Server?
- For local stdio use, set `KAGI_API_KEY` in the MCP client environment. For self-hosted Streamable HTTP mode, Kagi documents that each request supplies the API key using an `Authorization: Bearer <key>` header rather than relying on a server-wide environment variable.
- Which transport should be used for the Kagi MCP Server?
- Use stdio with `uvx kagimcp` for local desktop or CLI clients such as Claude Desktop, Claude Code, Codex, Kiro, or OpenCode. Use the documented Streamable HTTP mode only when self-hosting an HTTP endpoint and passing each request's Kagi API key in the Authorization header.