# Kagi

> Ad-free, high-quality web search and page-to-markdown extraction from an AI agent.

[Canonical HTML page](https://top-mcps.com/mcp/kagi) · [server.json](https://top-mcps.com/mcp/kagi.json) · [methodology](https://top-mcps.com/about/methodology)

## Install

### Claude Desktop — `claude_desktop_config.json`

Paste under mcpServers. Fully quit and reopen Claude after editing.

```json
{
  "mcpServers": {
    "kagi": {
      "command": "uvx",
      "args": [
        "kagimcp"
      ],
      "env": {
        "KAGI_API_KEY": "${KAGI_API_KEY}"
      }
    }
  }
}
```

### Claude Code — `CLI or .mcp.json`

Run from your repo. Commit .mcp.json to share with your team.

```shell
# export KAGI_API_KEY=your_kagi_api_key
claude mcp add kagi -- uvx kagimcp
```

### Cursor — `.cursor/mcp.json`

Global path: ~/.cursor/mcp.json. Reload window after editing.

```json
{
  "mcpServers": {
    "kagi": {
      "command": "uvx",
      "args": [
        "kagimcp"
      ],
      "env": {
        "KAGI_API_KEY": "${KAGI_API_KEY}"
      }
    }
  }
}
```

### VS Code — `.vscode/mcp.json`

VS Code uses the "servers" key (not "mcpServers").

```jsonc
{
  "servers": {
    "kagi": {
      "command": "uvx",
      "args": [
        "kagimcp"
      ],
      "env": {
        "KAGI_API_KEY": "${KAGI_API_KEY}"
      }
    }
  }
}
```

### Windsurf — `~/.codeium/windsurf/mcp_config.json`

Open via Cascade → hammer icon → Configure.

```json
{
  "mcpServers": {
    "kagi": {
      "command": "uvx",
      "args": [
        "kagimcp"
      ],
      "env": {
        "KAGI_API_KEY": "${KAGI_API_KEY}"
      }
    }
  }
}
```

### Cline — `cline_mcp_settings.json`

Open via the Cline sidebar → MCP Servers → Edit.

```json
{
  "mcpServers": {
    "kagi": {
      "command": "uvx",
      "args": [
        "kagimcp"
      ],
      "env": {
        "KAGI_API_KEY": "${KAGI_API_KEY}"
      }
    }
  }
}
```

### Continue — `~/.continue/config.json`

Continue uses modelContextProtocolServers with a transport block.

```json
{
  "experimental": {
    "modelContextProtocolServers": [
      {
        "transport": {
          "type": "stdio",
          "command": "uvx",
          "args": [
            "kagimcp"
          ],
          "env": {
            "KAGI_API_KEY": "${KAGI_API_KEY}"
          }
        }
      }
    ]
  }
}
```

### Codex CLI — `~/.codex/config.toml`

Codex uses TOML. Each server is a [mcp_servers.<name>] subtable.

```shell
# ~/.codex/config.toml
[mcp_servers.kagi]
command = "uvx"
args = [
  "kagimcp",
]
env = { KAGI_API_KEY = "${KAGI_API_KEY}" }
```

### Zed — `~/.config/zed/settings.json`

Zed calls them "context_servers". Settings live-reload on save.

```jsonc
{
  "context_servers": {
    "kagi": {
      "command": {
        "path": "uvx",
        "args": [
          "kagimcp"
        ]
      },
      "env": {
        "KAGI_API_KEY": "${KAGI_API_KEY}"
      }
    }
  }
}
```

### ChatGPT — `ChatGPT → Apps directory`

Kagi doesn't ship a hosted HTTPS endpoint today. ChatGPT supports remote MCP servers only — to use this server in ChatGPT you'll need to deploy it to a public HTTPS URL first (e.g. via Cloudflare Workers or Vercel) or wait for an official remote build.

```none

```

## At a glance

- **Maintainer:** Kagi
- **Transport:** stdio, Streamable HTTP
- **Auth model:** API key
- **Required secrets:** KAGI_API_KEY
- **Supported clients:** Claude, Cursor, Any MCP-compatible client, Kagi subscription
- **License:** MIT
- **Language:** Python
- **Latest version:** latest
- **Last verified:** 2026-05-27
- **GitHub stars:** 396 (fetched 2026-06-02T11:55:52.254Z)
- **Score:** 84/100 (rubric 2026-04 — see https://top-mcps.com/about/methodology)
- **Source:** https://github.com/kagisearch/kagimcp

## Quick answer

**What it does.** Exposes two Kagi tools: kagi_search_fetch (web/news/video/podcast/image search with extraction) and kagi_extract (full page content as markdown).

**Best for:**
- Spam-free web search
- Page-to-markdown extraction
- Personal Kagi-subscriber workflows
- Quality-over-quantity retrieval
- News, video, podcast, image search

**Not for:**
- Free-only workflows (paid subscription required)
- Very high request volumes
- Use cases where extracting full markdown is unnecessary

## Description

The official Kagi MCP exposes Kagi's ad-free, paid-subscription search alongside an extraction tool that returns full page content as markdown. API-key auth, MIT, with stdio and HTTP transports.

## Why it matters

Kagi's subscriber model removes ads and SEO spam from results — a noticeable quality lift for agent retrieval where junk results waste tokens.

## Key features

- kagi_search_fetch + kagi_extract tools
- Ad-free search index
- Bearer-token auth
- stdio (local) + HTTP (multi-tenant)
- MIT, vendor-maintained

## FAQ

### Why pay for search?

Kagi removes ads and SEO spam. For agent retrieval, junk results waste tokens — paying for quality often nets a smaller total context bill.

### Free tier?

No — Kagi requires a paid subscription to access the API.

### Open source?

Yes — MIT-licensed at github.com/kagisearch/kagimcp.

## Changelog

- **2026-05-27** — Refreshed install snippets and fact sheet; verified for 2026.
- **2025-02-20** — Initial directory listing.
