Kagi MCP Server

Kagi MCP server using kagi-ken package

Local serverstdioPython

What is the Kagi MCP server?

Connect Kagi to Claude, Cursor or any other MCP client and it stops being a tab you switch to. Kagi MCP server using kagi-ken package. The kagi mcp server is what makes that connection.

What the server does

Node.js MCP server providing Kagi search, summarization and AI assistant tools using your existing Kagi session token.

  • Search — Kagi web search with multiple query support
  • Summarizer — URL/content summarization with customizable formats
  • Assistant — AI-powered conversations using Kagi's AI models

Installation

@duange/kagi-mcp on npm is all you need. Most clients run it directly, so configuration is a few lines and a restart.

Available tools

The toolset is worth reading before you wire it up, because it tells you what the integration is really for:

  • kagi_search_fetch — Fetch web results based on one or more queries using the Kagi Search API. Results are numbered continuously for easy reference
  • kagi_summarizer — Summarize content from URLs using the Kagi Summarizer API. Supports various document types including webpages, videos, and audio
  • kagi_assistant — Interact with Kagi's AI assistant models for conversations and queries
  • Installation — 1. Clone the repository: bash git clone https://github.com/z23cc/kagi-mcp.git cd kagi-mcp
  • Debugging — Use the MCP Inspector to debug: bash npx @modelcontextprotocol/inspector node ./src/index.js
  • Contributing — 1. Fork the repository 2. Create a feature branch 3. Make your changes 4. Test with the MCP Inspector 5. Submit a pull request

Credentials and setup notes

Configuration is passed through the environment: KAGI_SESSION_TOKEN, KAGI_SEARCH_COOKIE, KAGI_MODEL_LIST, KAGI_DEFAULT_MODEL, KAGI_SUMMARIZER_ENGINE. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.

Worth knowing first

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Where it fits

Among the developer tooling options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. Kagi's toolset — kagi_search_fetch, kagi_summarizer, kagi_assistant and 3 more — is a fair guide to whether it matches your workflow. It is maintained by duange; worth a glance at recent repository activity before you build anything load-bearing on it.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Available tools

ToolWhat it does
kagi_search_fetchFetch web results based on one or more queries using the Kagi Search API. Results are numbered continuously for easy reference.
kagi_summarizerSummarize content from URLs using the Kagi Summarizer API. Supports various document types including webpages, videos, and audio.
kagi_assistantInteract with Kagi's AI assistant models for conversations and queries.
Installation1. **Clone the repository:** bash git clone https://github.com/z23cc/kagi-mcp.git cd kagi-mcp
DebuggingUse the MCP Inspector to debug: bash npx @modelcontextprotocol/inspector node ./src/index.js
Contributing1. Fork the repository 2. Create a feature branch 3. Make your changes 4. Test with the MCP Inspector 5. Submit a pull request

How to install the Kagi MCP server

{
  "mcpServers": {
    "kagi-mcp": {
      "command": "npx",
      "args": ["-y", "@duange/kagi-mcp"],
      "env": {
        "KAGI_SESSION_TOKEN": "YOUR_SESSION_TOKEN_HERE",
        "KAGI_SEARCH_COOKIE": "YOUR_KAGI_SEARCH_COOKIE_HERE",
        "KAGI_MODEL_LIST": "o3-pro,claude-4-sonnet,gemini-2-5-pro",
        "KAGI_DEFAULT_MODEL": "claude-4-sonnet",
        "KAGI_SUMMARIZER_ENGINE": "default"
      }
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

VariableDescriptionRequired
KAGI_SESSION_TOKENCredential the server authenticates with.Yes
KAGI_SEARCH_COOKIEConfiguration value read at startup.Optional
KAGI_MODEL_LISTConfiguration value read at startup.Optional
KAGI_DEFAULT_MODELConfiguration value read at startup.Optional
KAGI_SUMMARIZER_ENGINEConfiguration value read at startup.Optional

Example prompts to try

  • Use Kagi to kagi search fetch.
  • Use Kagi to kagi summarizer.
  • Use Kagi to kagi assistant.

Frequently asked questions

It connects Kagi to MCP-compatible AI assistants such as Claude and Cursor, exposing 6 tools (kagi_search_fetch, kagi_summarizer, kagi_assistant, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Kagi directly.