The Kagi MCP Server provides access to Kagi's search and summarization tools:
Web Search: Execute one or more search queries, returning numbered results for easy reference.
Content Summarization: Summarize videos or other content using customizable engines like 'cecil' or 'daphne'.
Claude Desktop Integration: Configure and integrate with Claude Desktop for enhanced functionality.
Customization Options: Adjust logging levels via the
FASTMCP_LOG_LEVELenvironment variable.Requirements: Needs a Kagi API key and access to Kagi's closed beta search API.
Integrates with Kagi search API to provide search capabilities to Claude AI, allowing Claude to answer questions requiring up-to-date information through internet search
Kagi MCP server
Setup Intructions
Before anything, unless you are just using non-search tools, ensure you have access to the search API. It is currently in closed beta and available upon request. Please reach out to support@kagi.com for an invite.
Install uv first.
MacOS/Linux:
Windows:
Installing via Smithery
Alternatively, you can install Kagi for Claude Desktop via Smithery:
Setup with OpenAI
Codex CLI
To add the Kagi mcp server to codex cli, you will need to use the following command:
This will write out the configuration to ~/.codex/config.toml, so if you need to update/rotate your API key, update your key there before running codex again.
Codex CLI comes with its own built-in search (via --search flag), but it is disabled by default. So to deconflict between search and Kagi, just don't enable it.
Setup with Claude
Claude Desktop
Claude Code
Add the Kagi mcp server with the following command (setting summarizer engine optional):
Now claude code can use the Kagi mcp server. However, claude code comes with its own web search functionality by default, which may conflict with Kagi. You can disable claude's web search functionality with the following in your claude code settings file (~/.claude/settings.json):
Pose query that requires use of a tool
e.g. "Who was time's 2024 person of the year?" for search, or "summarize this video: https://www.youtube.com/watch?v=jNQXAC9IVRw" for summarizer.
Debugging
Run:
Related MCP server: Database Tools for Claude AI
Local/Dev Setup Instructions
Clone repo
git clone https://github.com/kagisearch/kagimcp.git
Install dependencies
Install uv first.
MacOS/Linux:
Windows:
Then install MCP server dependencies:
Setup with Claude Desktop
Using MCP CLI SDK
Manually
Pose query that requires use of a tool
e.g. "Who was time's 2024 person of the year?" for search, or "summarize this video: https://www.youtube.com/watch?v=jNQXAC9IVRw" for summarizer.
Debugging
Run:
Then access MCP Inspector at http://localhost:5173. You may need to add your Kagi API key in the environment variables in the inspector under KAGI_API_KEY.
Advanced Configuration
Level of logging is adjustable through the
FASTMCP_LOG_LEVELenvironment variable (e.g.FASTMCP_LOG_LEVEL="ERROR")Relevant issue: https://github.com/kagisearch/kagimcp/issues/4
Summarizer engine can be customized using the
KAGI_SUMMARIZER_ENGINEenvironment variable (e.g.KAGI_SUMMARIZER_ENGINE="daphne")Learn about the different summarization engines here
The
--httpcli option can be used to toggle streamable HTTP transport on. Can use along with--portand--hostargs.