Kagi MCP Server

Official
MIT License
30
  • Apple
  • Linux

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Kagi MCP server

Setup Intructions

Before anything, 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"

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" } } } }

Installing via Smithery

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

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

e.g. "Who was time's 2024 person of the year?"

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" } } } }

e.g. "Who was time's 2024 person of the year?"

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.

Notes

You must be authenticated.

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

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. Setup with Claude Desktop
      1. Installing via Smithery
        1. Ask Claude a question requiring search
          1. Debugging
          2. Local/Dev Setup Instructions
            1. Clone repo
              1. Install dependencies
                1. Setup with Claude Desktop
                  1. Using MCP CLI SDK
                    1. Manually
                    2. Ask Claude a question requiring search
                      1. Debugging
                      2. Notes