Kagi MCP
The Official Model Context Protocol (MCP) server for Kagi search & other tools.
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
Maintainer
Works with
Installation
Manual Installation
npx kagimcpConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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
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.
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 kagimcpConfigure 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"
}
}
}
}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,languageRestart 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.
Kagi MCP Alternatives — Similar Search & Data Extraction Servers
Looking for alternatives to Kagi MCP? Here are other popular search & data extraction servers you can use with Claude, Cursor, and VS Code.
TrendRadar
★ 58.0kA real-time hotspot monitoring and news aggregation assistant that provides AI-powered analysis of trending topics across multiple platforms via the Model Context Protocol. It enables users to track news and receive automated notifications through va
Scrapling
★ 52.7k🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl!
PDF Math Translate
★ 33.9k[EMNLP 2025 Demo] PDF scientific paper translation with preserved formats - 基于 AI 完整保留排版的 PDF 文档全文双语翻译,支持 Google/DeepL/Ollama/OpenAI 等服务,提供 CLI/GUI/MCP/Docker/Zotero
GPT Researcher
★ 27.2kAn autonomous agent that conducts deep research on any data using any LLM providers
Agent Reach
★ 20.1kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
Xiaohongshu
★ 13.7kMCP for xiaohongshu.com
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.
Set Up Kagi MCP in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.