Kagi Search logo

Kagi Search

Organization
kagisearch

The Official Model Context Protocol (MCP) server for Kagi search & other tools.

Publisherkagisearch
Repositorykagimcp
LanguagePython
Forks
36
Stars
383
Available tools
0
Transport typestdio
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    Kagi Search exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    383 stars and 36 forks from the linked repository.

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:

bash
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:

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

Setup with OpenAI

Codex CLI

To add the Kagi mcp server to codex cli, you will need to use the following command:

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

This will write out the configuration to ~/.codex/config.toml, so if you need to update/rotate your API key, update your key there before running codex again.

Codex CLI comes with its own built-in search (via --search flag), but it is disabled by default. So to deconflict between search and Kagi, just don't enable it.

Setup with Claude

Claude Desktop

json
// 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
      }
    }
  }
}

Claude Code

Add the Kagi mcp server with the following command (setting summarizer engine optional):

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

Now claude code can use the Kagi mcp server. However, claude code comes with its own web search functionality by default, which may conflict with Kagi. You can disable claude's web search functionality with the following in your claude code settings file (~/.claude/settings.json):

json
{
  "permissions": {
    "deny": [
      "WebSearch"
    ]
  }
}

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:

bash
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:

bash
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:

bash
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

bash
# `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

json
# 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:

bash
# 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
  • There may be more secure ways of plugging into the MCP. A user wrote down some details here
  • The --http cli option can be used to toggle streamable HTTP transport on. Can use along with --port and --host args.

Installation

TypingMind
Prerequisites:

Node.js 18+

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

Use Kagi Search MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once Kagi Search is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add Kagi Search as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the Kagi Search MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "kagi-search": {
      "command": "npx",
      "args": [
        "-y",
        "null"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the Kagi Search MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the Kagi Search MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Kagi Search to help me with this task?
Kagi Search
Sure. I read it.
Here is what I found using Kagi Search.

Frequently asked questions

What is the Kagi Search MCP server used for?

Kagi Search is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use Kagi Search MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use Kagi Search with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use Kagi Search MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With Kagi Search connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect Kagi Search MCP to TypingMind?

Kagi Search runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does Kagi Search MCP provide in TypingMind?

Kagi Search exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use Kagi Search MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If Kagi Search requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇