by KSroido
Provides free Kagi web search and URL summarization through session tokens, exposing MCP‑compatible tools that mimic the official Kagi API without requiring a paid key.
Access Kagi's search and summarizer capabilities using user session tokens instead of the paid API. The server presents two MCP tools – kagi_search_fetch for web queries and kagi_summarizer for summarizing arbitrary URLs – and works with any MCP‑compatible client such as Claude Desktop, Cursor, Windsurf, Cline, or Hermes.
uvx:
pip install kagi-session2api-mcp # or
uvx kagi-session2api-mcp
kagi-session2api-mcp
For remote access, start HTTP mode:
kagi-session2api-mcp --http --host 0.0.0.0 --port 8000
kagimcp format.kagi_search_fetch (full‑text web search) and kagi_summarizer (URL summarization).site:, lang:, filetype:, etc.).Q: Do I need a Kagi paid plan? A: No. The server works with standard session tokens obtained from a free Kagi account.
Q: Will my account be at risk? A: Using session tokens to bypass the official API may violate Kagi’s Terms of Service and could lead to suspension or banning. Use at your own risk.
Q: How many requests can I make? A: Each token is limited to 5 requests per second. Adding more tokens scales the throughput linearly.
Q: How are expired tokens handled? A: The server detects 401/403 responses or login redirects and automatically disables the offending token while keeping others active.
Q: Can I change the summarizer model?
A: Yes, set summarizer_engine in the TOML config (options: cecil, agnes, daphne, muriel).
Q: What transport modes are supported? A: StdIO (default, for local MCP clients) and HTTP (for remote access).
Free Kagi Search MCP server — session tokens, no API key needed
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.
⚠️ 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.
kagimcpkagi_search_fetch (web search) and kagi_summarizer (URL summarization)site:, lang:, filetype:, etc.)Works with any MCP-compatible client:
stdio or HTTP transportJust 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.
pip install kagi-session2api-mcp
Or with uvx:
uvx kagi-session2api-mcp
{
"mcpServers": {
"kagi-session": {
"command": "uvx",
"args": ["kagi-session2api-mcp"],
"env": {
"KAGI_SESSION_TOKEN": "YOUR_SESSION_TOKEN_HERE"
}
}
}
}
{
"mcpServers": {
"kagi-session": {
"command": "uvx",
"args": ["kagi-session2api-mcp"],
"env": {
"KAGI_SESSION_TOKENS": "TOKEN_1,TOKEN_2,TOKEN_3"
}
}
}
}
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"
}
}
}
}
https://kagi.com/search?token={THIS_PART}&q=testkagi_search_fetchSearch 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 matchkagi_summarizerSummarize 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.
Stdio (default, for Claude Desktop):
kagi-session2api-mcp
HTTP (for remote access):
kagi-session2api-mcp --http --host 0.0.0.0 --port 8000
MCP Client → FastMCP Server → TokenPool (round-robin) → httpx.AsyncClient → kagi.com
↓
TokenBucket (5 req/s per token)
↓
Auto-disable expired tokens
| 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.
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) |
MIT
Please log in to share your review and rating for this MCP.
Explore related MCPs that share similar capabilities and solve comparable challenges
by exa-labs
Provides real-time web search capabilities to AI assistants via a Model Context Protocol server, enabling safe and controlled access to the Exa AI Search API.
by perplexityai
Enables Claude and other MCP‑compatible applications to perform real‑time web searches through the Perplexity (Sonar) API without leaving the MCP ecosystem.
by MicrosoftDocs
Provides semantic search and fetch capabilities for Microsoft official documentation, returning content in markdown format via a lightweight streamable HTTP transport for AI agents and development tools.
by elastic
Enables natural‑language interaction with Elasticsearch indices via the Model Context Protocol, exposing tools for listing indices, fetching mappings, performing searches, running ES|QL queries, and retrieving shard information.
by graphlit
Enables integration between MCP clients and the Graphlit platform, providing ingestion, extraction, retrieval, and RAG capabilities across a wide range of data sources and connectors.
by ihor-sokoliuk
Provides web search capabilities via the SearXNG API, exposing them through an MCP server for seamless integration with AI agents and tools.
by mamertofabian
Fast cross‑platform file searching leveraging the Everything SDK on Windows, Spotlight on macOS, and locate/plocate on Linux.
by spences10
Provides unified access to multiple search engines, AI response tools, and content processing services through a single Model Context Protocol server.
by cr7258
Provides Elasticsearch and OpenSearch interaction via Model Context Protocol, enabling document search, index management, cluster monitoring, and alias operations.
{
"mcpServers": {
"kagi-session": {
"command": "uvx",
"args": [
"kagi-session2api-mcp"
],
"env": {
"KAGI_SESSION_TOKEN": "<YOUR_SESSION_TOKEN>"
}
}
}
}claude mcp add kagi-session uvx kagi-session2api-mcp