- Home
- MCP servers
- Kagi
Kagi
- javascript
2
GitHub Stars
javascript
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"z23cc-kagi-mcp": {
"command": "npx",
"args": [
"-y",
"@duange/kagi-mcp"
],
"env": {
"KAGI_MODEL_LIST": "o3-pro,claude-4-sonnet,gemini-2-5-pro",
"KAGI_DEFAULT_MODEL": "claude-4-sonnet",
"KAGI_SEARCH_COOKIE": "YOUR_KAGI_SEARCH_COOKIE_HERE",
"KAGI_SESSION_TOKEN": "YOUR_SESSION_TOKEN_HERE",
"KAGI_SUMMARIZER_ENGINE": "default"
}
}
}
}You can run a self-contained MCP server that exposes Kagi search, summarization, and AI assistant capabilities using your existing Kagi session token and cookies. This server lets you fetch web results, summarize content, and chat with AI models all through a single, configurable endpoint.
How to use
Interact with the kagi-mcp server to perform three core actions: fetch web results via search, summarize URLs or content, and converse with AI models. Use the dedicated tools to choose the action you need: kagi_search_fetch for searches, kagi_summarizer for summarization, and kagi_assistant for AI-powered conversations. When you initiate a request, you provide the necessary inputs (queries, URLs, or messages) and the server returns results that you can present to users or integrate into your application.
How to install
Follow these concrete steps to set up the kagi-mcp server in your environment. You'll run two example configurations that show how to start the MCP server via standard input/output (stdio) methods using Node tooling.
{
"mcpServers": {
"kagi_mcp_desktop": {
"type": "stdio",
"name": "kagi_mcp_desktop",
"command": "npx",
"args": ["-y", "@duange/kagi-mcp"],
"env": {
"KAGI_SESSION_TOKEN": "YOUR_SESSION_TOKEN_HERE",
"KAGI_SEARCH_COOKIE": "YOUR_KAGI_SEARCH_COOKIE_HERE",
"KAGI_MODEL_LIST": "o3-pro,claude-4-sonnet,gemini-2-5-pro",
"KAGI_DEFAULT_MODEL": "claude-4-sonnet",
"KAGI_SUMMARIZER_ENGINE": "default"
}
}
}
}
{
"mcpServers": {
"kagi_mcp_code": {
"type": "stdio",
"name": "kagi_mcp_code",
"command": "claude",
"args": ["mcp", "add", "kagi-mcp", "--scope", "user", "--env", "KAGI_SESSION_TOKEN=YOUR_SESSION_TOKEN_HERE", "--env", "KAGI_SEARCH_COOKIE=YOUR_KAGI_SEARCH_COOKIE_HERE", "--env", "KAGI_MODEL_LIST=o3-pro,claude-4-sonnet,gemini-2-5-pro", "--env", "KAGI_DEFAULT_MODEL=claude-4-sonnet", "npx", "-y", "@duange/kagi-mcp"]
}
}
}
Configuration and usage notes
Environment variables are required to enable the server’s features. The following variables show up in the available configurations:
-
KAGI_SESSION_TOKEN: Your Kagi session token. Required for search and summarization. Optional for other features if not needed.
-
KAGI_SUMMARIZER_ENGINE: The summarizer engine to use. Optional; defaults to the engine named in the config (default).
-
KAGI_SEARCH_COOKIE: The _kagi_search_ cookie value. Required for the assistant feature when you enable web search integration.
-
KAGI_MODEL_LIST: Comma-separated list of available AI models for the assistant. This is required when you enable the assistant feature.
-
KAGI_DEFAULT_MODEL: The default AI model to use if you don’t specify a model in your request. Optional; uses the first model from the list if not provided.
Examples of tool usage
To perform a search, provide one or more queries using the kagi_search_fetch tool. The results are numbered for easy reference.
To summarize a URL, call kagi_summarizer with the URL and optional summary type (summary or takeaway) and target language.
To chat with AI models, use kagi_assistant and pass a message along with optional model and web_search flags to control behavior.
Available 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.
kagi_summarizer
Summarize content from URLs using the Kagi Summarizer API. Supports webpages, videos, and audio with options for summary or takeaway formats.
kagi_assistant
Interact with Kagi’s AI assistant models for conversations and queries, with optional web search integration and vision capabilities.