kagi-ken-mcp
Unofficial MCP server for working with Kagi *without* API access (you'll need to be a customer). Searches and summarizes. Uses Kagi session token for easy authentication. Works well with your agent.
Install / Use
claude mcp add czottmann -- npx -y github:czottmann/kagi-ken-mcpIf the server publishes to npm under a different name, use that package instead — check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
Development & EngineeringSupported Platforms
Our assessment of kagi-ken-mcp
kagi-ken-mcp scores 81/100 on our quality scale, 3196th of 4,633 Development & Engineering skills we index.
Its MCP Server is 6.7 KB long, well organised into 25 sections with 9 code examples: a thorough specification that gives an agent plenty to work with.
It has 42 GitHub stars, so there is little community track record yet; judge it on its content.
Maintenance, license and trust
- The repository was last updated about 8 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 91/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
kagi-ken-mcp compared with similar skills
All 4 of these similar skills score higher than kagi-ken-mcp; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| kagi-ken-mcp (this skill)by czottmann | 81 | 42 | 8mo ago | MCP Server |
| Agent-Reachby Panniantong | 100 | 89.0k | 17d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 74.3k | today | CLAUDE.md |
| CowAgentby zhayujie | 100 | 47.2k | today | CLAUDE.md |
| ai-job-searchby MadsLorentzen | 100 | 44.8k | today | CLAUDE.md |
Frequently asked questions
- How do I install kagi-ken-mcp?
- Run
claude mcp add czottmann -- npx -y github:czottmann/kagi-ken-mcp. The install tabs above show the steps for each supported agent. - Which AI agents does kagi-ken-mcp work with?
- It is written for Claude Code and Claude Desktop, as a MCP Server file. Other agents that read the same format can often use it too.
- Is kagi-ken-mcp safe to use?
- It is MIT-licensed and scores 91/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is kagi-ken-mcp still maintained?
- The repository was last updated about 8 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
Skill content
View source on GitHubkagi-ken-mcp
A lightweight Node MCP server around the kagi-ken package, providing access to Kagi.com services using Kagi session tokens:
- Search: Searches Kagi
- Summarizer: Uses Kagi's Summarizer to create summaries from URLs or text content
Unlike the official Kagi API which requires API access, this MCP server uses your existing Kagi session to access both search and summarization features.
"Kagi-ken" is a portmanteau of "Kagi" (the service) and "token".
Why?
The Kagi API requires a separate API key, which are invite-only at the moment. If you already have a Kagi subscription but no API access, yet want to programmatically access Kagi's services from LLMs or agents like Claude, this MCP server provides an alternative.
Features
- Search: Fetch web results using Kagi Search with concurrent query processing
- Summarization: Summarize content from URLs with customizable output types and languages
The server supports two methods for using your Kagi session token (see Installation), in this order:
KAGI_SESSION_TOKENenvironment variable~/.kagi_session_tokenfile containing the token string
It includes comprehensive error handling:
- Connection timeouts (10 seconds per search)
- Invalid input validation
- Environment variable validation
- Graceful error formatting
Installation
Node.js 22+ is required.
1. Get Kagi Session Token
- Visit Kagi Settings in your browser
- Copy the Session Link
- Extract the
tokenvalue from the link - Use that value as your session token: save to
~/.kagi_session_token(recommended), alternatively pass asKAGI_SESSION_TOKENenv variable
The server will automatically try the environment variable first, then fall back to the token file.
[!WARNING] Security Note: Keep your session token private. It provides access to your Kagi account.
2.a. Add MCP server to Claude Desktop
Add kagi-ken-mcp to your claude_desktop_config.json which you can open from the Claude Desktop app via Settings → Developer → Local MCP Servers → Edit Config.
Option 1: Using token file (recommended)
{
"mcpServers": {
"kagi-ken-mcp": {
"command": "npx",
"args": ["-y", "github:czottmann/kagi-ken-mcp"]
}
}
}
Option 2: Using environment variable
{
"mcpServers": {
"kagi-ken-mcp": {
"command": "npx",
"args": ["-y", "github:czottmann/kagi-ken-mcp"],
"env": {
"KAGI_SESSION_TOKEN": "YOUR_SESSION_TOKEN_HERE"
}
}
}
}
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:
For web searches, use kagi-ken-mcp MCP server's `kagi_search_fetch` tool.
For summarizing a URL, use the kagi-ken-mcp MCP server's `kagi_summarizer` tool.
2.b. Add MCP server to Claude Code
Option 1: Using token file (recommended)
claude mcp add kagi-ken-mcp --scope user -- npx -y github:czottmann/kagi-ken-mcp
Option 2: Using environment variable
claude mcp add kagi-ken-mcp \
--scope user \
--env KAGI_SESSION_TOKEN="YOUR_SESSION_TOKEN_HERE" -- \
npx -y github:czottmann/kagi-ken-mcp
Post-install
Disable Claude Code's built-in web search (optional) by setting the permission in the relevant .claude/settings*.json file:
{
"permissions": {
"deny": [
"WebSearch"
],
"allow": [
"mcp__kagi-ken-mcp__kagi_search_fetch",
"mcp__kagi-ken-mcp__kagi_summarizer"
]
}
}
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 summarizesummary_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")
Development
Project Structure
kagi-ken-mcp/
├── src/
│ ├── index.js # Main server entry point
│ ├── tools/
│ │ ├── search.js # Search tool implementation
│ │ └── summarizer.js # Summarizer tool implementation
│ └── utils/
│ └── formatting.js # Utility functions
├── package.json
└── README.md
Installation
-
Clone the repository:
git clone <repository-url> cd kagi-ken-mcp -
Install dependencies:
npm install
Running in Development Mode
npm run dev
Debugging
Use the MCP Inspector to debug:
npx @modelcontextprotocol/inspector node ./src/index.js
Then access the inspector at http://localhost:5173. If using environment variables, add your KAGI_SESSION_TOKEN in the environment variables section of the inspector.
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Test with the MCP Inspector
- Submit a pull request
Author
Carlo Zottmann, carlo@zottmann.dev, https://c.zottmann.dev, https://github.com/czottmann.
This project is neither affiliated with nor endorsed by Kagi. I'm just a very happy customer.
[!TIP] I make Shortcuts-related macOS & iOS productivity apps like Actions For Obsidian, Browser Actions (which adds Shortcuts support for several major browsers), and BarCuts (a surprisingly useful contextual Shortcuts launcher). Check them out!
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
- Model Context Protocol
Related Skills
Agent-Reach
89.0kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
headroom
74.3kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
CowAgent
47.2kOpen-source personal AI assistant & Agent Harness. Plans tasks, runs tools and skills, self-evolves with memory and knowledge. Multi-agent, multi-model, multi-channel. Lightweight, extensible, one-line install.
ai-job-search
44.8kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
