Provides access to Kagi's search engine, content summarization, and AI assistant capabilities using session tokens, enabling web search with multiple queries, URL/content summarization with customizable formats, and AI-powered conversations using Kagi's AI models.
kagi-ken-mcp
Node.js MCP server providing Kagi search, summarization and AI assistant tools using your existing Kagi session token.
Features
- Search: Kagi web search with multiple query support 
- Summarizer: URL/content summarization with customizable formats 
- Assistant: AI-powered conversations using Kagi's AI models 
Environment Variables
The server requires different environment variables depending on which features you want to use:
For Search and Summarization only:
- KAGI_SESSION_TOKEN: Your Kagi session token
- KAGI_SUMMARIZER_ENGINE: Summarizer engine to use (optional, default: "default")
For Assistant feature (in addition to the above):
- KAGI_SEARCH_COOKIE: Your- _kagi_search_cookie value
- KAGI_MODEL_LIST: Comma-separated list of available AI models (required for assistant)
- KAGI_DEFAULT_MODEL: Default model to use (optional, uses first from list if not specified)
Setup
Get Required Tokens
Session Token
- Visit Kagi Settings 
- Copy the Session Link 
- Extract the - tokenvalue
- Set - KAGI_SESSION_TOKENenv variable
Search Cookie (for Assistant feature)
- Open browser developer tools (F12) 
- Go to Kagi.com and login 
- In Application/Storage tab, find Cookies for kagi.com 
- Copy the value of - _kagi_search_cookie
- Set - KAGI_SEARCH_COOKIEenv variable
Model Configuration (for Assistant feature)
- Set - KAGI_MODEL_LISTwith comma-separated available models (e.g., "o3-pro,claude-4-sonnet,gemini-2-5-pro")
- Optionally set - KAGI_DEFAULT_MODELto specify default model
Claude Desktop
Add to claude_desktop_config.json:
Post-install
Disable Claude Desktop's built-in websearch so it'll use this here MCP server. And maybe add this to your "Personal preferences" (i.e., system prompt) in Settings:
Claude Code
Add MCP server to Claude Code:
Post-install
Disable Claude Code's built-in web search (optional) by setting the permission in the relevant .claude/settings*.json file:
Usage: 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=sczwaYyaevY" for summarizer.
Tools
kagi_search_fetch
Fetch web results based on one or more queries using the Kagi Search API. Results are numbered continuously for easy reference.
Parameters:
- queries(array of strings): One or more search queries
kagi_summarizer
Summarize content from URLs using the Kagi Summarizer API. Supports various document types including webpages, videos, and audio.
Parameters:
- url(string): URL to summarize
- summary_type(enum):- "summary"for paragraph prose or- "takeaway"for bullet points (default:- "summary")
- target_language(string, optional): Language code (e.g.,- "EN"for English, default:- "EN")
kagi_assistant
Interact with Kagi's AI assistant models for conversations and queries.
Parameters:
- message(string): The message or question to send to the assistant
- model(string, optional): AI model to use (default: uses configured default model)
- web_search(boolean, optional): Enable web search integration (default: true)
- image(string, optional): Base64 encoded image for vision models
Development
Project Structure
Installation
- Clone the repository: git clone https://github.com/z23cc/kagi-mcp.git cd kagi-mcp
- Install dependencies: npm install
Running in Development Mode
Debugging
Use the MCP Inspector to debug:
Contributing
- Fork the repository 
- Create a feature branch 
- Make your changes 
- Test with the MCP Inspector 
- Submit a pull request 
Related Projects
- czottmann/kagi-ken - Unofficial session token-based Kagi client, Node 
- czottmann/kagi-ken-cli - Unofficial Node session token-based CLI tool, Node 
- Official Kagi MCP Server - Python 
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Enables integration with Kagi search engine services including web search, content summarization from URLs, and AI assistant conversations. Uses session tokens to access Kagi's search API, summarizer, and AI models directly within MCP-compatible applications.