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
Add this skill
npx mdskills install czottmann/kagi-ken-mcpWell-documented MCP server providing Kagi search and summarization with clear setup and token management
A lightweight Node MCP server around the kagi-ken package, providing access to Kagi.com services using Kagi session tokens:
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".
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.
The server supports two methods for using your Kagi session token (see Installation), in this order:
KAGI_SESSION_TOKEN environment variable~/.kagi_session_token file containing the token stringIt includes comprehensive error handling:
Connection timeouts (10 seconds per search)
Invalid input validation
Environment variable validation
Graceful error formatting
Node.js 22+ is required.
token value from the link~/.kagi_session_token (recommended), alternatively pass as KAGI_SESSION_TOKEN env variableThe 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.
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.
{
"mcpServers": {
"kagi-ken-mcp": {
"command": "npx",
"args": ["-y", "github:czottmann/kagi-ken-mcp"]
}
}
}
{
"mcpServers": {
"kagi-ken-mcp": {
"command": "npx",
"args": ["-y", "github:czottmann/kagi-ken-mcp"],
"env": {
"KAGI_SESSION_TOKEN": "YOUR_SESSION_TOKEN_HERE"
}
}
}
}
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.
claude mcp add kagi-ken-mcp --scope user -- npx -y github:czottmann/kagi-ken-mcp
claude mcp add kagi-ken-mcp \
--scope user \
--env KAGI_SESSION_TOKEN="YOUR_SESSION_TOKEN_HERE" -- \
npx -y github:czottmann/kagi-ken-mcp
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"
]
}
}
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.
kagi_search_fetchFetch 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 querieskagi_summarizerSummarize 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")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
Clone the repository:
git clone
cd kagi-ken-mcp
Install dependencies:
npm install
npm run dev
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.
Carlo Zottmann, , 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!
Install via CLI
npx mdskills install czottmann/kagi-ken-mcpKagi Ken MCP is a free, open-source AI agent skill. 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
Install Kagi Ken MCP with a single command:
npx mdskills install czottmann/kagi-ken-mcpThis downloads the skill files into your project and your AI agent picks them up automatically.
Kagi Ken MCP works with Claude Code, Claude Desktop, Cursor, Vscode Copilot, Windsurf, Continue Dev, Gemini Cli, Amp, Roo Code, Goose. Skills use the open SKILL.md format which is compatible with any AI coding agent that reads markdown instructions.