kagimcp is the official Model Context Protocol (MCP) server for Kagi Search and other tools, with the code repository located at https://github.com/kagisearch/kagimcp。它由 The Kagi API provides backend support, exposing search and content extraction tools to MCP-compatible clients.
Main Capabilities
kagimcp currently exposes two tools:
- kagi_search_fetch: supports web, news, video, podcast, and image search, with optional page extracts, filters, and Kagi lenses.
- kagi_extract: fetches the full content of a web page as Markdown.
Note: the previous kagi_fastgpt and kagi_summarizer tools have been removed, and both are planned to return in a future version.
Usage
An official hosted MCP server is provided, at the address https://mcp.kagi.com/mcp,无需安装,任何支持 HTTP MCP clients can point to this address and authenticate using their own Kagi API key. OAuth2 is not currently supported (it is on the roadmap), so an API key must be obtained from the dashboard and passed via Bearer HTTP authentication. The documentation provides an example for Claude Code.
If you want to run it yourself, you can choose a local uvx installation (see Client Setup), or self-host the HTTP server (see Self-Hosting).
Prerequisites:
- A Kagi API key, placed in the KAGI_API_KEY environment variable.
- uv, which is required for the recommended uvx installation path.
For client integration, the documentation lists configuration instructions for clients such as Codex (MCP configuration written to ~/.codex/config.toml), Claude Desktop (find the configuration via Settings -> Developer -> Edit Config), Kiro (global configuration ~/.kiro/settings/mcp.json, or project-level .kiro/settings/mcp.json, using the same mcpServers JSON as Claude Desktop), OpenCode (edit ~/.config/opencode/opencode.json), and others.
Usage examples:
- Search: Who was Time's 2024 person of the year?
- Extract: extract the full content of https://en.wikipedia.org/wiki/Model_Context_Protocol
Local and Self-Hosting
It can be run locally via stdio, or using the streamable HTTP transport. HTTP mode is multi-tenant: each request provides the API key via the Authorization: Bearer <key> header, rather than using a server-level environment variable, so a single instance can serve multiple users. The repository includes a Dockerfile that installs a pinned version of kagimcp from PyPI and runs it in HTTP mode. The container respects $PORT, so it can be used on any platform that injects that variable (Railway, Render, Cloud Run, Fly.io, etc.).
When upgrading the version in production, modify the version pin in the Dockerfile and redeploy.
Debugging and Pre-releases
The inspector can be used to inspect the published package or a local checkout; the inspector is usually located at http://localhost:5173。
If using a pre-release build, the installation instructions are the same, but replace uvx kagimcp with uvx --prerelease allow --from kagimcp==1.0.0rc2 kagimcp (where 1.0.0rc2 is replaced with the version to install).
Applicable Scenarios and Limitations
kagimcp is suitable for scenarios that require Kagi search and web content extraction capabilities in MCP-compatible clients, such as letting an AI assistant search the web or fetch page body content. In terms of limitations: a valid Kagi API key is required; OAuth2 is not currently supported; the kagi_fastgpt and kagi_summarizer tools are currently unavailable; other specific quota, billing, or platform support details are not yet provided in the official text.