Kagi MCP Server

Official
by kagisearch
MIT License
51
  • Apple
  • Linux

Integrations

  • Integrates with Kagi search API to provide search capabilities to Claude AI, allowing Claude to answer questions requiring up-to-date information through internet search

Kagi MCP server

Setup Intructions

Before anything, unless you are just using non-search tools, ensure you have access to the search API. It is currently in closed beta and available upon request. Please reach out to support@kagi.com for an invite.

Install uv first.

MacOS/Linux:

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

Windows:

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

Installing via Smithery

Alternatively, you can install Kagi for Claude Desktop via Smithery:

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

Setup with Claude Desktop

// claude_desktop_config.json // Can find location through: // Hamburger Menu -> File -> Settings -> Developer -> Edit Config { "mcpServers": { "kagi": { "command": "uvx", "args": ["kagimcp"], "env": { "KAGI_API_KEY": "YOUR_API_KEY_HERE" "KAGI_SUMMARIZER_ENGINE": "YOUR_ENGINE_CHOICE_HERE" // Defaults to "cecil" engine if env var not present } } } }

Pose query that requires use of a tool

e.g. "Who was time's 2024 person of the year?" for search, or "summarize this video: https://www.youtube.com/watch?v=jNQXAC9IVRw" for summarizer.

Debugging

Run:

npx @modelcontextprotocol/inspector uvx kagimcp

Local/Dev Setup Instructions

Clone repo

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

Install dependencies

Install uv first.

MacOS/Linux:

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

Windows:

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

Then install MCP server dependencies:

cd kagimcp # Create virtual environment and activate it uv venv source .venv/bin/activate # MacOS/Linux # OR .venv/Scripts/activate # Windows # Install dependencies uv sync

Setup with Claude Desktop

Using MCP CLI SDK
# `pip install mcp[cli]` if you haven't mcp install /ABSOLUTE/PATH/TO/PARENT/FOLDER/kagimcp/src/kagimcp/server.py -v "KAGI_API_KEY=API_KEY_HERE"
Manually
# claude_desktop_config.json # Can find location through: # Hamburger Menu -> File -> Settings -> Developer -> Edit Config { "mcpServers": { "kagi": { "command": "uv", "args": [ "--directory", "/ABSOLUTE/PATH/TO/PARENT/FOLDER/kagimcp", "run", "kagimcp" ], "env": { "KAGI_API_KEY": "YOUR_API_KEY_HERE" "KAGI_SUMMARIZER_ENGINE": "YOUR_ENGINE_CHOICE_HERE" // Defaults to "cecil" engine if env var not present } } } }

Pose query that requires use of a tool

e.g. "Who was time's 2024 person of the year?" for search, or "summarize this video: https://www.youtube.com/watch?v=jNQXAC9IVRw" for summarizer.

Debugging

Run:

# If mcp cli installed (`pip install mcp[cli]`) mcp dev /ABSOLUTE/PATH/TO/PARENT/FOLDER/kagimcp/src/kagimcp/server.py # If not npx @modelcontextprotocol/inspector \ uv \ --directory /ABSOLUTE/PATH/TO/PARENT/FOLDER/kagimcp \ run \ kagimcp

Then access MCP Inspector at http://localhost:5173. You may need to add your Kagi API key in the environment variables in the inspector under KAGI_API_KEY.

Advanced Configuration

  • Level of logging is adjustable through the FASTMCP_LOG_LEVEL environment variable (e.g. FASTMCP_LOG_LEVEL="ERROR")
  • Summarizer engine can be customized using the KAGI_SUMMARIZER_ENGINE environment variable (e.g. KAGI_SUMMARIZER_ENGINE="daphne")
    • Learn about the different summarization engines here

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

Tools

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

  1. Setup Intructions
    1. Installing via Smithery
    2. Setup with Claude Desktop
    3. Pose query that requires use of a tool
    4. Debugging
  2. Local/Dev Setup Instructions
    1. Clone repo
    2. Install dependencies
    3. Setup with Claude Desktop
    4. Pose query that requires use of a tool
    5. Debugging
  3. Advanced Configuration

    Related MCP Servers

    • A
      security
      F
      license
      A
      quality
      An MCP protocol server that enables web search functionality using the Tavily API, allowing AI assistants to perform internet searches in real-time.
      Last updated -
      4
      2
      Python
    • -
      security
      A
      license
      -
      quality
      An MCP server that allows Claude and other AI assistants to interact with the YouTube API, providing tools to search videos/channels and retrieve detailed information about them.
      Last updated -
      1
      JavaScript
      MIT License
      • Apple
    • -
      security
      F
      license
      -
      quality
      An MCP server that connects AI assistants to SearchAgora, enabling users to search for, discover, and purchase products across the web through natural language conversations.
      Last updated -
      Python
      • Apple
    • -
      security
      F
      license
      -
      quality
      A MCP server that allows AI assistants to interact with the browser, including getting page content as markdown, modifying page styles, and searching browser history.
      Last updated -
      5
      TypeScript

    View all related MCP servers

    ID: xabrrs4bka