Kagi MCP server using kagi-ken package
Connect Kagi to Claude, Cursor or any other MCP client and it stops being a tab you switch to. Kagi MCP server using kagi-ken package. The kagi mcp server is what makes that connection.
Node.js MCP server providing Kagi search, summarization and AI assistant tools using your existing Kagi session token.
@duange/kagi-mcp on npm is all you need. Most clients run it directly, so configuration is a few lines and a restart.
The toolset is worth reading before you wire it up, because it tells you what the integration is really for:
kagi_search_fetch — Fetch web results based on one or more queries using the Kagi Search API. Results are numbered continuously for easy referencekagi_summarizer — Summarize content from URLs using the Kagi Summarizer API. Supports various document types including webpages, videos, and audiokagi_assistant — Interact with Kagi's AI assistant models for conversations and queriesInstallation — 1. Clone the repository: bash git clone https://github.com/z23cc/kagi-mcp.git cd kagi-mcpDebugging — Use the MCP Inspector to debug: bash npx @modelcontextprotocol/inspector node ./src/index.jsContributing — 1. Fork the repository 2. Create a feature branch 3. Make your changes 4. Test with the MCP Inspector 5. Submit a pull requestConfiguration is passed through the environment: KAGI_SESSION_TOKEN, KAGI_SEARCH_COOKIE, KAGI_MODEL_LIST, KAGI_DEFAULT_MODEL, KAGI_SUMMARIZER_ENGINE. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.
Among the developer tooling options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. Kagi's toolset — kagi_search_fetch, kagi_summarizer, kagi_assistant and 3 more — is a fair guide to whether it matches your workflow. It is maintained by duange; worth a glance at recent repository activity before you build anything load-bearing on it.
SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.
| Tool | What it does |
|---|---|
| kagi_search_fetch | Fetch web results based on one or more queries using the Kagi Search API. Results are numbered continuously for easy reference. |
| kagi_summarizer | Summarize content from URLs using the Kagi Summarizer API. Supports various document types including webpages, videos, and audio. |
| kagi_assistant | Interact with Kagi's AI assistant models for conversations and queries. |
| Installation | 1. **Clone the repository:** bash git clone https://github.com/z23cc/kagi-mcp.git cd kagi-mcp |
| Debugging | Use the MCP Inspector to debug: bash npx @modelcontextprotocol/inspector node ./src/index.js |
| Contributing | 1. Fork the repository 2. Create a feature branch 3. Make your changes 4. Test with the MCP Inspector 5. Submit a pull request |
{
"mcpServers": {
"kagi-mcp": {
"command": "npx",
"args": ["-y", "@duange/kagi-mcp"],
"env": {
"KAGI_SESSION_TOKEN": "YOUR_SESSION_TOKEN_HERE",
"KAGI_SEARCH_COOKIE": "YOUR_KAGI_SEARCH_COOKIE_HERE",
"KAGI_MODEL_LIST": "o3-pro,claude-4-sonnet,gemini-2-5-pro",
"KAGI_DEFAULT_MODEL": "claude-4-sonnet",
"KAGI_SUMMARIZER_ENGINE": "default"
}
}
}
}Configuration as documented by the project. Restart the client after saving.
| Variable | Description | Required |
|---|---|---|
| KAGI_SESSION_TOKEN | Credential the server authenticates with. | Yes |
| KAGI_SEARCH_COOKIE | Configuration value read at startup. | Optional |
| KAGI_MODEL_LIST | Configuration value read at startup. | Optional |
| KAGI_DEFAULT_MODEL | Configuration value read at startup. | Optional |
| KAGI_SUMMARIZER_ENGINE | Configuration value read at startup. | Optional |
Kill hallucinated APIs — version-accurate, up-to-date library documentation injected straight into context.
Microsoft's official browser automation server — drive a real browser through the accessibility tree, no screenshots needed.
GitHub's official server — repos, issues, pull requests, Actions and code security, straight from your assistant.
Issue tracking at the speed of conversation — Linear's official hosted server with OAuth and zero install.
Local repository surgery — status, diffs, commits, branches and history for any repo on disk.
Timezone sanity for AI — current time anywhere and correct conversions, without the model doing date math.