The Official Model Context Protocol (MCP) server for Kagi search & other tools.
Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"kagimcp": {
"args": [
"-y",
"@smithery/cli"
],
"command": "npx"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
Before anything, unless you are just using non-search tools, ensure you have access to the search API. It is currently in closed beta and available upon request. Please reach out to support@kagi.com for an invite.
Run this in your terminal to verify the server starts. Then let us know if it worked — your result helps other developers.
npx -y '@smithery/cli' 2>&1 | head -1 && echo "✓ Server started successfully"
After testing, let us know if it worked:
Five weighted categories — click any category to see the underlying evidence.
Model Context Protocol (MCP) Python SDK does not enable DNS rebinding protection by default
### Description The Model Context Protocol (MCP) Python SDK does not enable DNS rebinding protection by default for HTTP-based servers. When an HTTP-based MCP server is run on localhost without authentication using `FastMCP` with streamable HTTP or SSE transport, and has not configured `TransportSecuritySettings`, a malicious website could exploit DNS rebinding to bypass same-origin policy restrictions and send requests to the local MCP server. This could allow an attacker to invoke tools or ac
MCP Python SDK vulnerability in the FastMCP Server causes validation error, leading to DoS
A validation error in the MCP SDK can cause an unhandled exception when processing malformed requests, resulting in service unavailability (500 errors) until manually restarted. Impact may vary depending on the deployment conditions, and presence of infrastructure-level resilience measures. Thank you to Rich Harang for reporting this issue.
MCP Python SDK has Unhandled Exception in Streamable HTTP Transport, Leading to Denial of Service
If a client deliberately triggers an exception after establishing a streamable HTTP session, this can lead to an uncaught ClosedResourceError on the server side, causing the server to crash and requiring a restart to restore service. Impact may vary depending on the deployment conditions, and presence of infrastructure-level resilience measures. Thank you to Rich Harang for reporting this issue.
Click any tool to inspect its schema.
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in search
Web and local search using Brave Search API
Context7 Platform -- Up-to-date code documentation for LLMs and AI code editors
Production ready MCP server with real-time search, extract, map & crawl.
mini cli search engine for your docs, knowledge bases, meeting notes, whatever. Tracking current sota approaches while being all local
MCP Security Weekly
Get CVE alerts and security updates for Kagimcp and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
An MCP server backed by the Kagi API. It exposes search and extraction tools to MCP-compatible clients.
kagi_search_fetch - web, news, videos, podcasts, and image search with optional page extracts, filters, and Kagi lenses.kagi_extract - fetch a page's full content as markdown.Note: The previous
kagi_fastgptandkagi_summarizertools have been removed. Both are planned to return in a future release.
We run a hosted MCP server at https://mcp.kagi.com/mcp — no install required. Point any HTTP-capable MCP client at it and authenticate with your Kagi API key.
OAuth2 isn't supported yet (it's on our roadmap), so for now grab your API key from the dashboard and pass it via Bearer HTTP authentication.
Example with Claude Code:
claude mcp add kagi https://mcp.kagi.com/mcp --transport http --header "Authorization: Bearer $(read -sp 'API key: ' k; echo $k)" --scope user
Prefer to run it yourself? See Client Setup for the local uvx install, or Self-Hosting to host the HTTP server on your own infrastructure.
KAGI_API_KEY.uv for the recommended uvx install path.Install uv:
curl -LsSf https://astral.sh/uv/install.sh | sh
Windows:
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
codex mcp add kagi --env KAGI_API_KEY=<YOUR_API_KEY_HERE> -- uvx kagimcp
Codex writes MCP configuration to ~/.codex/config.toml.
Install uv first.
MacOS/Linux:
curl -LsSf https://astral.sh/uv/install.sh | sh
Windows:
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
Then in your Claude Desktop config (found through Settings -> Developer -> Edit Config):
{
"mcpServers": {
"kagi": {
"command": "uvx",
"args": ["kagimcp"],
"env": {
"KAGI_API_KEY": "YOUR_API_KEY_HERE"
}
}
}
}
claude mcp add kagi -e KAGI_API_KEY="YOUR_API_KEY_HERE" -- uvx kagimcp
npx -y @smithery/cli install kagimcp --client claude
Add to your Kiro MCP config file (~/.kiro/settings/mcp.json for global, or .kiro/settings/mcp.json for project-scoped) using the same mcpServers JSON as Claude Desktop. See the Kiro MCP documentation for more details.
Edit the OpenCode configuration file in ~/.config/opencode/opencode.json and add the following:
{
"mcp": {
"kagi": {
"type": "local",
"command": ["uvx", "kagimcp"],
"enabled": true,
"environment": {
"KAGI_API_KEY": "<YOUR_API_KEY_HERE>"
}
}
}
}
Who was Time's 2024 person of the year?extract the full content of https://en.wikipedia.org/wiki/Model_Context_Protocol| Environment variable | Description |
|---|---|
KAGI_API_KEY | Required Kagi API key. |
FASTMCP_LOG_LEVEL | Logging level, for example ERROR. |
KAGI_SEARCH_TIMEOUT | Search timeout in seconds. Defaults to 10. |
KAGI_EXTRACT_TIMEOUT | Extract timeout in seconds. Defaults to 30. |
KAGI_MAX_RETRIES | Max retry attempts after the first request. Defaults to 2; set 0 to disable retries. |
KAGI_HIDDEN_PARAMS | Comma-separated search params to hide from the LLM-facing schema. |
Hideable search params:
workflow, extract_count, limit, include_domains, exclude_domains, time_relative, after, before, file_type, lens_id
Example:
KAGI_HIDDEN_PARAMS="extract_count,after,before,time_relative,include_domains,exclude_domains"
git clone https://github.com/kagisear
... [View full README on GitHub](https://github.com/kagisearch/kagimcp#readme)