Kagi MCP server
The Kagi MCP server allows integration with the Kagi Search API to perform web searches using TypeScript.
Perform Web Searches: Use the
kagi_searchtool to execute web searches with Kagi's API by providing a query string and an optional limit (default 10, max 100).Future Capabilities: Planned features include summarization (
kagi_summarize), quick responses (kagi_fastgpt), and enriched news results (kagi_enrich), though these are not yet implemented.Environment Setup: Configure the server with a
.envfile containing your Kagi API key.Debugging: Use the MCP Inspector for debugging server communications.
Integration: Easily install and configure for use with Claude Desktop via Smithery.
Integrates Kagi Search API capabilities, allowing web searches with customizable result limits to retrieve information from Kagi's search engine.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Kagi MCP serversearch for the best hiking trails near Seattle"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
kagi-server MCP 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 KagiTakes 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
Related MCP server: Kagi MCP Server
Development
Install dependencies:
npm installBuild the server:
npm run buildFor development with auto-rebuild:
npm run watchEnvironment Setup
Create a .env file in the root directory with your Kagi API key:
KAGI_API_KEY=your_api_key_hereMake 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 claudeTo 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 script:
npm run inspectorThe Inspector will provide a URL to access debugging tools in your browser.
Usage
Once the server is running and connected to Claude Desktop, you can use it to perform web searches. For example:
Ask Claude: "Can you search for information about the latest advancements in quantum computing?"
Claude will use the
kagi_searchtool to fetch results from Kagi's API.Claude will then summarize or analyze the search results for you.
Note: The planned tools (summarize, fastgpt, enrich) are not yet implemented and cannot be used.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request. Some areas for contribution include:
Implementing the planned tools (summarize, fastgpt, enrich)
Improving error handling and input validation
Enhancing documentation and usage examples
License
This project is licensed under the MIT License.
Roadmap
Implement
kagi_summarizetool for webpage and text summarizationImplement
kagi_fastgpttool for quick responsesImplement
kagi_enrichtool for fetching enriched news resultsImprove error handling and add more robust input validation
Add more comprehensive usage examples and documentation
Publish the package to npm for easy installation and use with Claude Desktop and npx
Available Tools
1 toolkagi_searchC
Perform web search using Kagi
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| query | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It mentions 'Perform web search' which implies read-only behavior, but doesn't disclose any behavioral traits like rate limits, authentication needs, response format, or potential side effects. This leaves significant gaps for a tool with external dependencies.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise—a single sentence with zero waste. It's front-loaded with the core purpose and efficiently communicates the essential function without unnecessary details.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no annotations, no output schema, and low schema description coverage, the description is incomplete. It doesn't address behavioral aspects, parameter usage, or result expectations, making it inadequate for a tool that interacts with an external web search service.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It adds no meaning beyond the schema—doesn't explain what 'query' should contain, how 'limit' affects results, or any parameter nuances. The schema defines types and constraints, but the description offers no semantic context.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Perform web search') and the resource/service ('using Kagi'), which is specific and unambiguous. However, with no sibling tools mentioned, it cannot demonstrate differentiation from alternatives, so it doesn't reach the highest score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives, prerequisites, or any contextual limitations. It simply states what the tool does without offering usage instructions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
v1.0.0- First observed
kagi_search
TDQS
Scored across 1 tool
With only one tool, there is no possibility of ambiguity or overlap between tools. The tool's purpose is clearly defined as performing web searches using Kagi, leaving no room for misselection.
A single tool inherently has perfect naming consistency, as there are no other tools to compare it against. The name 'kagi_search' follows a clear verb_noun pattern, but consistency cannot be assessed across a set of one.
A single tool is too few for a server that appears to be focused on web search functionality, as it lacks complementary operations like summarization, filtering, or handling search results. This minimal scope feels incomplete for the domain.
The tool surface is severely incomplete for a web search domain, as it only provides raw search capability without tools for processing, refining, or managing search results. This creates significant gaps that will limit agent effectiveness.
Maintenance
Related MCP Connectors
Web search, AI agent, and content extraction via You.com APIs
Web search for AI agents — one tool across 6 engines, routed to the cheapest + cached.
Web search and page-reading for AI agents. One-click OAuth connect, or a Caesar API key.
Search your knowledge bases from any AI assistant using hybrid RAG.
Related MCP Servers
- AlicenseCqualityDmaintenanceAllows the use of Kagi's API for web searching and content enrichment through methods like fastgpt, enrich/web, and enrich/news.32MIT
- AlicenseNot gradedqualityDmaintenanceEnables integration with Kagi search engine services including web search, content summarization from URLs, and AI assistant conversations. Uses session tokens to access Kagi's search API, summarizer, and AI models directly within MCP-compatible applications.6 npm3MIT
- AlicenseAqualityDmaintenanceProvides free web search and URL summarization using Kagi session tokens, compatible with any MCP client.283MIT
- AlicenseNot gradedqualityDmaintenanceProvides web search capabilities to AI assistants using the Kagi search API, enabling parallel queries and formatted results.5 npm3MIT