Kagi

Provides an MCP server that uses Kagi Search and Summarizer APIs to search and summarize content, with multi-instance support.
  • javascript

0

GitHub Stars

javascript

Language

7 months ago

First Indexed

3 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "yuki-yano-kagi-mcp": {
      "command": "npx",
      "args": [
        "kagi-mcp"
      ],
      "env": {
        "KAGI_API_KEY": "your-kagi-api-key",
        "KAGI_SUMMARIZER_ENGINE": "cecil"
      }
    }
  }
}

You run a dedicated MCP server that connects to Kagi services to perform web search and content summarization, while avoiding port conflicts when you run multiple instances. This makes it easy to wire Kagi-powered capabilities into your client workflow and Claude tooling with minimal setup.

How to use

You use an MCP client to connect to the Kagi MCP server you start on your machine or a remote host. Start the MCP server using one of the available methods, then point your client to the server by using the provided command. The server exposes two main tools you will interact with through the MCP interface: kagi_search_fetch for web searches and kagi_summarizer for summarizing content from a URL. Provide the queries you want searched or the URL you want summarized, and you’ll receive structured results that you can integrate into your workflow.

How to install

Prerequisites you need before starting are Node.js 18 or higher and a Kagi API key.

Method 1: Using npx (Recommended for Claude Desktop) No installation needed. Claude Desktop can run the package directly using npx.

Method 2: Install from npm

npm install -g kagi-mcp

Or use it directly with npx:

npx kagi-mcp

Method 3: Install from GitHub directly

npm install -g github:yuki-yano/kagi-mcp

Method 4: Install from source

git clone https://github.com/yuki-yano/kagi-mcp.git
cd kagi-mcp
npm install
npm run build
npm link

Configuration and notes

Environment variables you need to configure for the MCP server:

KAGI_API_KEY (required): Your Kagi API key
KAGI_SUMMARIZER_ENGINE (optional): Summarization engine - cecil (default), agnes, daphne, or muriel

Claude Desktop configuration

Add the following to your Claude Desktop config file to run the Kagi MCP server via npx or a globally installed package.

{
  "mcpServers": {
    "kagi": {
      "command": "npx",
      "args": ["kagi-mcp"],
      "env": {
        "KAGI_API_KEY": "your-kagi-api-key"
      }
    }
  }
}

Claude Code CLI and inspector

To add the Kagi MCP server to Claude Code CLI and use the inspector for debugging, you can run one of the following commands.

claude mcp add kagi -s user -e KAGI_API_KEY="your-kagi-api-key" -- npx kagi-mcp

Inspector usage (optional)

Use the inspector to debug the MCP setup. You can run the inspector with npx and point it at the running MCP process.

# Method 1: Using npx (requires npm package to be published)
KAGI_API_KEY="your-kagi-api-key" npx @modelcontextprotocol/inspector npx kagi-mcp

# Method 2: Using local installation (more reliable)
npm install -g kagi-mcp
KAGI_API_KEY="your-kagi-api-key" npx @modelcontextprotocol/inspector kagi-mcp

# Method 3: Using source build
KAGI_API_KEY="your-kagi-api-key" npx @modelcontextprotocol/inspector node dist/index.js

Usage endpoints and data structures

The MCP server exposes two endpoints you will typically use through your client:

{ 
  "queries": ["array of search queries"]
}
{ 
  "url": "https://example.com/article",
  "summary_type": "summary" | "takeaway",  
  "target_language": "EN"
}

Troubleshooting and tips

If you encounter a Malformed authorization token error, verify you are using a valid Kagi API key, that it is correctly set as an environment variable, and that there are no extra quotes or spaces.

If you see a 401 Unauthorized error for the Search API, note that the Search API is in closed beta and you may need to request access and ensure your key has the necessary permissions.

You can test your API key with the included test script:

KAGI_API_KEY="your-api-key" node test-api.js

Development

Development commands you may run while building or testing the MCP server include starting in development mode, building, and running the built version.

npm install
npm run dev
npm run build
npm start

Notes

The Kagi MCP server is designed to run multiple instances without port conflicts and to stay compatible with Claude Desktop.

Available tools

kagi_search_fetch

Search web content using the Kagi Search API. Pass an array of queries to retrieve results.

kagi_summarizer

Summarize content from a URL using the Kagi Summarizer API. You can specify the URL, an optional summary type (summary or takeaway), and a target language.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational