Kagi Search

Kagi Search

Search the web using Kagi's search API

224
Stars
26
Forks
0
Releases

Overview

Kagi MCP server (name kagimcp) exposes Kagi's web search API via the Model Context Protocol (MCP), enabling Claude Desktop, Claude Code, and OpenAI Codex-based assistants to perform web searches within their interactions. Access to the Kagi search API is gated in beta and requires a KAGI_API_KEY. The server can be installed with UV (Astral) on macOS/Linux or Windows, and can also be installed via Smithery. It can be wired into Claude Desktop via a JSON config and into Claude Code, and can be registered with Codex CLI using codex mcp add kagi, which writes the configuration to ~/.codex/config.toml. The summarizer engine can be customized with KAGI_SUMMARIZER_ENGINE (default Cecil if not set); examples include Cecil and Daphne. You can toggle the HTTP transport with the --http flag (along with --port and --host) for deployment. For debugging, run the MCP Inspector at http://localhost:5173 and use the provided inspector commands. Advanced configuration also supports FASTMCP_LOG_LEVEL for logging. The README includes local/dev setup steps (clone, venv via uv, uv sync) and pose example queries that require tool use, illustrating how to use the server in practice.

Details

Owner
kagisearch
Language
Python
License
MIT License
Updated
2025-12-07

Features

Kagi Search API MCP integration

Exposes Kagi's web search API through MCP to power web search in Claude and Codex workflows.

Claude Desktop/Code integration

Configures Claude Desktop and Claude Code to call kagimcp via MCP, enabling search results within Claude tools.

Codex CLI integration

Register the MCP server with Codex CLI using codex mcp add kagi; writes config to ~/.codex/config.toml.

Configurable summarizer engine

Summarizer engine controlled via KAGI_SUMMARIZER_ENGINE; defaults to Cecil; supports alternatives like daphne.

Environment variable-based configuration

Requires KAGI_API_KEY and optional KAGI_SUMMARIZER_ENGINE to tailor behavior.

Debugging and MCP Inspector

Debug using MCP Inspector at http://localhost:5173 and inspector commands.

Advanced deployment options

The --http flag enables streamable HTTP transport, with optional --port and --host settings.

Local/Dev setup workflow

Guides for cloning the repo, creating a Python venv with uv, and installing dependencies via uv sync.

Audience

DevelopersIntegrate Kagi search API via MCP for Claude/Code and Codex workflows.
MCP integratorsConfigure MCP to expose Kagi endpoints using KAGI_API_KEY and engine settings.
QA EngineersTest and debug MCP server behavior with inspector and env vars.

Tags

kagimcpsearch-apiclaudecodexuvsummarizer-enginedev-setup