Kagi KenSAFE
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.
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
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 as `KAGISESSION
1cbe18731c71OBSERVED · 2026-10-08Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add kagi-ken-mcp --env KAGI_SESSION_TOKEN=${KAGI_SESSION_TOKEN} -- npx -y [email protected]{
"mcpServers": {
"kagi-ken-mcp": {
"command": "npx",
"args": [
"-y",
"[email protected]"
],
"env": {
"KAGI_SESSION_TOKEN": "${KAGI_SESSION_TOKEN}"
}
}
}
}Exposed tools (2)
2 read · 0 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
kagi_search_fetch | read | Fetch web results based on one or more queries using the Kagi.com web search engine. Use for general search and when the user explicitly tells you to |
kagi_summarizer | read | Summarize content from a URL using the Kagi.com Summarizer API. The Summarizer can summarize any document type (text webpage, video, audio, etc.) |
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- none-observed
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (1)
@modelcontextprotocol/sdk, kagi-ken, zod
Gates applied: no_behavioural_pass.
1cbe18731c71full audit observations/trust-audit/mcp-server/czottmann__kagi-ken.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-08 | 1cbe18731c71 | SAFE | B | 89 | first audit |
Questions
What is the Kagi Ken MCP server?
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.
What tools does Kagi Ken expose?
2 in total: 2 read-only, 0 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is Kagi Ken safe to connect to an agent?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B.
What credentials does Kagi Ken need?
It reads KAGI_SESSION_TOKEN from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How does Kagi Ken run?
It speaks stdio, so it runs as a local process your client starts. It is published on npm as kagi-ken-mcp at 1.3.0.
How current is this page?
The grade is for one exact copy of the source (1cbe18731c71), read on 2026-10-08. The repository is watched and re-audited when it changes.