Kagi MCP

v1.0.0Search & Data Extractionstable

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

kagimcpmcpai-integration
Share:
386
Stars
0
Downloads
0
Weekly
0/5

What is Kagi MCP?

Kagi MCP is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to official model context protocol (mcp) server for kagi search & other tools.

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

This server falls under the Search & Data Extraction category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • The Official Model Context Protocol (MCP) server for Kagi se

Use Cases

Search and summarize with Kagi tools.
Access integrated search functionality.
Query content across multiple sources.
kagisearch

Maintainer

LicenseMIT
Languagepython
Versionv1.0.0
UpdatedMay 20, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx kagimcp

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Kagi MCP

kagimcp is the official Kagi MCP server that connects Claude and other MCP clients to Kagi's ad-free, privacy-first search engine and content extraction service. It exposes two tools — kagi_search_fetch for multi-type web search with optional full-page extraction and Kagi lenses, and kagi_extract for converting any URL into clean markdown — giving AI assistants access to high-quality, unfiltered search results without tracker noise. A Kagi API key is the only external requirement.

Prerequisites

  • A Kagi account with an active API key (generate at https://kagi.com/settings?p=api)
  • Python 3.10 or later with the uv package manager (https://docs.astral.sh/uv/)
  • An MCP-compatible client such as Claude Desktop or Claude Code
1

Generate a Kagi API key

Sign in to your Kagi account, navigate to Settings → API, and create a new API key. Keep it secret — it will be passed as an environment variable.

2

Install via Claude Code (one-liner)

The fastest way to register kagimcp in Claude Code is a single mcp add command that sets the API key inline.

claude mcp add kagi -e KAGI_API_KEY="YOUR_API_KEY_HERE" -- uvx kagimcp
3

Configure Claude Desktop

Add the server to ~/Library/Application Support/Claude/claude_desktop_config.json. The env block injects your Kagi API key at startup.

{
  "mcpServers": {
    "kagimcp": {
      "command": "uvx",
      "args": ["kagimcp"],
      "env": {
        "KAGI_API_KEY": "YOUR_API_KEY_HERE",
        "FASTMCP_LOG_LEVEL": "ERROR"
      }
    }
  }
}
4

Tune optional environment variables

Adjust timeouts and retry behavior to suit your workflow. KAGI_HIDDEN_PARAMS lets you hide certain search parameters from the LLM if you want to enforce fixed filters.

KAGI_SEARCH_TIMEOUT=15
KAGI_EXTRACT_TIMEOUT=45
KAGI_MAX_RETRIES=2
KAGI_HIDDEN_PARAMS=country,language
5

Restart your MCP client and test

Restart Claude Desktop or reload Claude Code. Ask Claude to search for something — it should invoke kagi_search_fetch automatically.

Kagi MCP Examples

Client configuration

Complete Claude Desktop config for kagimcp with recommended environment variables.

{
  "mcpServers": {
    "kagimcp": {
      "command": "uvx",
      "args": ["kagimcp"],
      "env": {
        "KAGI_API_KEY": "YOUR_API_KEY_HERE",
        "FASTMCP_LOG_LEVEL": "ERROR",
        "KAGI_SEARCH_TIMEOUT": "10",
        "KAGI_EXTRACT_TIMEOUT": "30",
        "KAGI_MAX_RETRIES": "2"
      }
    }
  }
}

Prompts to try

Prompts that demonstrate kagi_search_fetch and kagi_extract in action.

- "Search Kagi for 'open source MCP servers 2025' and summarise the top results"
- "Extract the full text of https://kagi.com/stats and tell me how many searches Kagi has processed"
- "Find recent academic papers about retrieval-augmented generation using Kagi"
- "Search for news about AI regulation in the EU published this week"
- "Use Kagi to look up the current price of the Raspberry Pi 5 and list three vendors"

Troubleshooting Kagi MCP

401 Unauthorized or invalid API key error

Verify the KAGI_API_KEY value matches exactly what is shown on the Kagi API settings page. API keys are distinct from your Kagi account password. Regenerate the key if necessary and update all config files.

Tool calls time out on long kagi_extract requests

Increase KAGI_EXTRACT_TIMEOUT in your environment config (default is 30 seconds). Some pages with heavy JavaScript rendering may need 60+ seconds.

uvx kagimcp exits immediately with an import error

Update uv to the latest version ('uv self update') and retry. If the problem persists, install explicitly with 'uv tool install kagimcp' and then invoke 'kagimcp' directly instead of through uvx.

Frequently Asked Questions about Kagi MCP

What is Kagi MCP?

Kagi MCP is a Model Context Protocol (MCP) server that official model context protocol (mcp) server for kagi search & other tools. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Kagi MCP?

Follow the installation instructions on the Kagi MCP GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Kagi MCP?

Kagi MCP works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Kagi MCP free to use?

Yes, Kagi MCP is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More Search & Data Extraction MCP Servers

Explore all search & data extraction servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "kagimcp": { "command": "npx", "args": ["-y", "kagimcp"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Kagi MCP?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides