Kagi-Session2API-MCP
Free Kagi Search MCP server — access search and summarizer via session tokens, no API key needed. Works with Claude Desktop, Cursor, Windsurf, Hermes and any MCP client.
Install / Use
claude mcp add KSroido -- npx -y github:KSroido/Kagi-Session2API-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
AI & Machine LearningSupported Platforms
Our assessment of Kagi-Session2API-MCP
Kagi-Session2API-MCP scores 81/100 on our quality scale, 748th of 965 AI & Machine Learning skills we index.
Its MCP Server is 6.9 KB long, well organised into 21 sections with 12 code examples: a thorough specification that gives an agent plenty to work with.
It has 44 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 5 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
- No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
- Its trust signals score 83/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.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands.
Automated pattern scan on 2026-10-13. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
Kagi-Session2API-MCP compared with similar skills
All 4 of these similar skills score higher than Kagi-Session2API-MCP; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| Kagi-Session2API-MCP (this skill)by KSroido | 81 | 44 | 5mo ago | MCP Server |
| claude-memby thedotmack | 100 | 100.3k | today | CLAUDE.md |
| Agent-Reachby Panniantong | 100 | 96.8k | 5d ago | CLAUDE.md |
| Understand-Anythingby Egonex-AI | 100 | 86.1k | 1d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 75.2k | today | CLAUDE.md |
Frequently asked questions
- How do I install Kagi-Session2API-MCP?
- Run
claude mcp add KSroido -- npx -y github:KSroido/Kagi-Session2API-MCP. The install tabs above show the steps for each supported agent. - Which AI agents does Kagi-Session2API-MCP work with?
- It is written for Claude Code, Claude Desktop, Cursor and Windsurf, as a MCP Server file. Other agents that read the same format can often use it too.
- Is Kagi-Session2API-MCP safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. It declares no license and scores 83/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-Session2API-MCP still maintained?
- The repository was last updated about 5 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 Session2API MCP Server
Free Kagi Search MCP server — session tokens, no API key needed
</div>Access Kagi search and summarizer via session tokens — completely free. Works with Claude Desktop, Cursor, Windsurf, Cline, Hermes and any MCP-compatible AI coding assistant/agent.
⭐ Star History
⚠️ EndUser Warning: This project uses Kagi session tokens to access search and summarizer features without the official paid API. This may violate Kagi's Terms of Service. Potential consequences include account suspension or permanent ban. Use at your own risk. The authors assume no liability for any account actions taken by Kagi.
⚠️ Security Warning: Your Kagi session token provides full account access. Treat it like a password. Never share it or commit it to version control.
🌟 Features
- Session-based access: Uses Kagi session tokens instead of the official API ($25/1000 queries) — completely free
- Multi-token pool: Configure multiple tokens for higher throughput with round-robin rotation
- Per-token rate limiting: 5 req/s per token with token bucket algorithm
- API-compatible output: Returns results in the same format as the official
kagimcp - Two tools:
kagi_search_fetch(web search) andkagi_summarizer(URL summarization) - Firefox UA spoofing: Mimics a real Firefox browser for session-based access
- Auto-disable expired tokens: Expired tokens are automatically detected and skipped
- Search operators: Supports Kagi operators (
site:,lang:,filetype:, etc.)
Compatible Platforms
Works with any MCP-compatible client:
- Claude Desktop
- Cursor
- Windsurf
- Cline
- Hermes Agent
- Any MCP client supporting
stdioorHTTPtransport
Quick Install (For AI Agents)
Just paste this prompt to your AI agent:
Install the Kagi Session2API MCP server from https://pypi.org/project/kagi-session2api-mcp/.
Then add it to my MCP:
`uvx kagi-session2api-mcp`
set env KAGI_SESSION_TOKEN to my token (ask me if you don't have it).
If I have multiple tokens, use KAGI_SESSION_TOKENS (comma-separated) instead,
or create a config file at ~/.config/kagi-session2api-mcp/config.toml with:
[kagi]
session_tokens = ["TOKEN_1", "TOKEN_2"]
summarizer_engine = "cecil"
[client]
timeout = 30
max_retries = 2
and set env KAGI_SESSION_CONFIG to that path.
Install Manually
pip install kagi-session2api-mcp
Or with uvx:
uvx kagi-session2api-mcp
Configuration
Option 1: Environment Variable (Single Token)
{
"mcpServers": {
"kagi-session": {
"command": "uvx",
"args": ["kagi-session2api-mcp"],
"env": {
"KAGI_SESSION_TOKEN": "YOUR_SESSION_TOKEN_HERE"
}
}
}
}
Option 2: Environment Variable (Multiple Tokens)
{
"mcpServers": {
"kagi-session": {
"command": "uvx",
"args": ["kagi-session2api-mcp"],
"env": {
"KAGI_SESSION_TOKENS": "TOKEN_1,TOKEN_2,TOKEN_3"
}
}
}
}
Option 3: Config File (Recommended for Multi-Token)
Create ~/.config/kagi-session2api-mcp/config.toml:
[kagi]
session_tokens = [
"YOUR_TOKEN_1_HERE",
"YOUR_TOKEN_2_HERE",
]
summarizer_engine = "cecil"
[client]
timeout = 30
max_retries = 2
Then configure:
{
"mcpServers": {
"kagi-session": {
"command": "uvx",
"args": ["kagi-session2api-mcp"],
"env": {
"KAGI_SESSION_CONFIG": "/path/to/config.toml"
}
}
}
}
Getting Your Session Token
- Log in to kagi.com
- Go to Settings → Account → Session Link
- Copy the token from the session URL:
https://kagi.com/search?token={THIS_PART}&q=test - Use this token in your configuration
Usage
MCP Tools
kagi_search_fetch
Search the web using Kagi:
Search for "Python async tutorial"
Supports Kagi search operators:
site:github.com- Restrict to domain-site:reddit.com- Exclude domainfiletype:pdf- File type filterintitle:python- Title filterlang:zh- Language filterbefore:2024-01-01/after:2024-01-01- Date filters"exact phrase"- Exact match
kagi_summarizer
Summarize any URL:
Summarize https://example.com/article
Options:
summary_type: "summary" (prose) or "takeaway" (bullet points)engine: "cecil" (default), "agnes", "daphne", "muriel"target_language: Language code (e.g., "EN")
⚠️ The summarizer is experimental — it uses Kagi's internal endpoint which may change.
Transport Modes
Stdio (default, for Claude Desktop):
kagi-session2api-mcp
HTTP (for remote access):
kagi-session2api-mcp --http --host 0.0.0.0 --port 8000
Architecture
MCP Client → FastMCP Server → TokenPool (round-robin) → httpx.AsyncClient → kagi.com
↓
TokenBucket (5 req/s per token)
↓
Auto-disable expired tokens
Token Pool Behavior
| Config | Rate Limit | Effective Rate | |--------|-----------|----------------| | 1 token | 5 req/s | 5 req/s | | 2 tokens | 5 req/s each | 10 req/s | | N tokens | 5 req/s each | 5×N req/s |
When a token expires (detected via 401/403 or redirect to login), it is automatically disabled. Remaining tokens continue serving requests.
Differences from Official kagimcp
| Aspect | Official kagimcp | kagi-session2api-mcp |
|--------|-------------------|-------------------|
| Authentication | API key ($25/1000) | Session token (free) |
| Search endpoint | /api/v0/search | /html/search (HTML scraping) |
| Summarizer | /api/v0/summarize | /mother/summary_labs (internal) |
| Rate limiting | Server-side | Client-side (token bucket) |
| api_balance | Returns balance | Always null |
| Cost | Paid | Free (uses existing session) |
Thank you!
Star this repo if you feel it useful, that would help me a lot :)
License
MIT
Related Skills
claude-mem
100.3kPersistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
Agent-Reach
96.8kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
Understand-Anything
86.1kGraphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.
headroom
75.2kCompress 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.
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.
