Kagi ServerSAFE
A Model Context Protocol server implementation for Kagi's API
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
[](https://smithery.ai/protocol/kagi-server) MCP server for Kagi API integration
This is a TypeScript-based MCP server that integrates the Kagi Search API. It demonstrates core MCP concepts by providing:
- Tools for performing web searches and other operations using Kagi's API (currently in private beta)
Features
Implemented Tools
kagi_search- Perform web searches using Kagi- Takes a query string and optional limit as parameters
- Returns search results from Kagi's API
Planned Tools (Not Yet Implemented)
kagi_summarize- Generate summaries of web pages or textkagi_fastgpt- Get quick responses using Kagi's FastGPTkagi_enrich- Fetch enriched news results on specific topics
Development
Install dependencies:
npm install
Build the server:
npm run build
For development with auto-rebuild:
npm run watch
Environment Setup
Create a .env file in the root directory with your Kagi API key:
KAGI_API_KEY=your_api_key_here
Make sure to add .env to your .gitignore file to keep your API key secure.
Installation
Installing via Smithery
To install Kagi Server for Claude Desktop automatically via Smithery:
npx @smithery/cli install kagi-server --client claude
To use with Claude Desktop, add the server config:
On MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json On Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"kagi-server": {
"command": "/path/to/kagi-server/build/index.js",
"env": {
"KAGI_API_KEY": "your_api_key_here"
}
}
}
}Debugging
Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector, which is available as a package s
b59798b114daOBSERVED · 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-server --env KAGI_API_KEY=${KAGI_API_KEY} -- npx -y [email protected]{
"mcpServers": {
"kagi-server": {
"command": "npx",
"args": [
"-y",
"[email protected]"
],
"env": {
"KAGI_API_KEY": "${KAGI_API_KEY}"
}
}
}
}Exposed tools (1)
1 read · 0 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
kagi_search | read | Perform web search using Kagi |
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
- declared (1 observation(s))
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (1)
@modelcontextprotocol/sdk, axios, dotenv, @types/jest, @types/node, jest, ts-jest, typescript
Gates applied: no_behavioural_pass.
b59798b114dafull audit observations/trust-audit/mcp-server/ac3xx__kagi-server.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 | b59798b114da | SAFE | B | 89 | first audit |
Questions
What is the Kagi Server MCP server?
A Model Context Protocol server implementation for Kagi's API
What tools does Kagi Server expose?
1 in total: 1 read-only, 0 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is Kagi Server 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 Server need?
It reads KAGI_API_KEY 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 Server run?
It speaks stdio, so it runs as a local process your client starts. It is published on npm as kagi-server at 0.1.0.
How current is this page?
The grade is for one exact copy of the source (b59798b114da), read on 2026-10-08. The repository is watched and re-audited when it changes.