KA
OfficialSearch

Kagi Search MCP Server Closed Beta Access

Request closed beta access to the MCP server and Kagi Search API by emailing [email protected] to get your invite and enable search features.

Quick Install
npx -y @kagisearch/kagimcp

Overview

The Kagi MCP server is a Model Context Protocol (MCP) adapter that exposes Kagi Search and Kagi’s summarization features to MCP-enabled clients (Claude, Codex CLI, other MCP hosts). It allows language models to call Kagi’s web search and summarizer tools as external “tool” invocations so model-assisted workflows can retrieve up-to-date web results and generate concise summaries of URLs, videos, or web pages.

Access to the Kagi Search API is currently closed beta. Before configuring or running the MCP server, request an invite by emailing [email protected]. Once your API key is issued, the MCP server can be installed locally, mounted into local model clients (Claude Desktop / Code, Codex CLI), or run via a manifest/installer like Smithery.

Features

  • Exposes Kagi Search as MCP tools for model-driven search queries
  • URL / video summarization using Kagi’s summarizer engines
  • Configurable summarizer engine (multiple engines supported)
  • Compatible with Claude (Desktop/Code) and Codex CLI via MCP integration
  • Local development mode with MCP inspector for debugging
  • Simple environment-driven configuration and logging control
  • Optional HTTP transport and host/port configuration for custom deployments

Installation / Configuration

Note: first request closed beta access via [email protected] to obtain KAGI_API_KEY.

Install uv (runtime used by the server):

MacOS / Linux

curl -LsSf https://astral.sh/uv/install.sh | sh

Windows (PowerShell)

powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

Install via Smithery

npx -y @smithery/cli install kagimcp --client claude

Add Kagi MCP to Codex CLI

codex mcp add kagi --env KAGI_API_KEY=<YOUR_API_KEY_HERE> -- uvx kagimcp

Configure Claude Desktop (example JSON snippet)

{
  "mcpServers": {
    "kagi": {
      "command": "uvx",
      "args": ["kagimcp"],
      "env": {
        "KAGI_API_KEY": "YOUR_API_KEY_HERE",
        "KAGI_SUMMARIZER_ENGINE": "cecil"
      }
    }
  }
}

Add to Claude Code from CLI

claude mcp add kagi -e KAGI_API_KEY="YOUR_API_KEY_HERE" KAGI_SUMMARIZER_ENGINE="cecil" -- uvx kagimcp

Local development (clone and run)

git clone https://github.com/kagisearch/kagimcp.git
cd kagimcp

# create venv via uv and activate
uv venv
source .venv/bin/activate    # macOS/Linux
# or
.venv/Scripts/activate       # Windows

# install dependencies
uv sync

Run with MCP CLI (optional)

# if mcp[cli] is installed
mcp dev /ABSOLUTE/PATH/TO/PARENT/FOLDER/kagimcp/src/kagimcp/server.py

Debugging / Inspector

npx @modelcontextprotocol/inspector uvx kagimcp
# or with local directory
npx @modelcontextprotocol/inspector uv --directory /path/to/kagimcp run kagimcp

Configuration Reference

Environment VariablePurposeExample
KAGI_API_KEYYour closed-beta API key from KagiKAGI_API_KEY=sk_XXXX
KAGI_SUMMARIZER_ENGINESelect summarizer engine (defaults to cecil)KAGI_SUMMARIZER_ENGINE=cecil
FASTMCP_LOG_LEVELLog verbosity for the MCP serverFASTMCP_LOG_LEVEL=ERROR

CLI options:

  • –http : enable streamable HTTP transport
  • –port, –host : set server host/port when using HTTP mode

Available Tools / Resources

  • Search tool: run web queries and return ranked results and snippets
  • Summarizer tool: ingest URLs (web pages, YouTube links) and return condensed summaries
  • MCP Inspector UI: web-based tool for testing requests and viewing tool responses locally
  • GitHub repo: https://github.com/kagisearch/kagimcp
  • Support / invite: [email protected] (required for API access)

Use Cases

  • Ask a model a web-fact question and let it call Kagi Search:
    • Prompt: “Who was Time’s 2024 Person of the Year?” → model invokes Kagi search tool to fetch current articles and cites sources.
  • Summarize multimedia or long web pages:
    • Prompt: “Summarize this video: https://www.youtube.com/watch?v=jNQXAC9IVRw” → model invokes the summarizer tool and returns a concise overview with timestamps.
  • Integrate with Claude Desktop:
    • Add the MCP server to Claude’s config so agents can use Kagi tools during multi-step reasoning tasks (research, cite, summarize).
  • Local development and testing:
    • Use the MCP Inspector to craft tool calls, inspect the tool response JSON, and iterate on agent prompts before deploying.

Notes and Security

  • The Kagi API is closed beta — request access via [email protected]. The server will not be useful without a valid KAGI_API_KEY.
  • For production or shared environments, prefer secure secret storage patterns rather than plain environment variables. Refer to project docs/issue notes in the repo for community suggestions on secure key storage.
  • If you encounter conflicts with built-in client search (e.g., Claude or Codex), disable the client’s native web search to avoid duplicate or competing tools.

For more details, run the inspector or consult the GitHub repository for code examples and issue history.

Tags:search