A Model Context Protocol (MCP) server that provides access to Kagi's premium search and AI capabilities, offering high-quality search results without ads or tracking and AI-powered responses with source citations.
- 🔍 Access to Kagi's premium search engine:
- Ad-free, privacy-focused search results
- High-quality content prioritization
- Comprehensive web coverage
- 🤖 AI-powered search responses via FastGPT:
- Detailed answers to complex questions
- Source citations for fact verification
- Web search integration
- 🔄 Efficient response formatting:
- Clean, structured JSON responses
- Relevant metadata included
- Easy to parse for AI consumption
- 🏗️ Built on the Model Context Protocol
This server requires configuration through your MCP client. Here are examples for different environments:
Add this to your Cline MCP settings:
{
"mcpServers": {
"mcp-kagi-search": {
"command": "node",
"args": ["/path/to/mcp-kagi-search/dist/index.js"],
"env": {
"KAGI_API_KEY": "YOUR_KAGI_API_KEY_HERE"
},
"disabled": false,
"autoApprove": []
}
}
}
For WSL environments, add this to your Claude Desktop configuration:
{
"mcpServers": {
"mcp-kagi-search": {
"command": "wsl.exe",
"args": [
"bash",
"-c",
"KAGI_API_KEY=your-api-key-here node /path/to/mcp-kagi-search/dist/index.js"
]
}
}
}
The server requires the following environment variables:
-
KAGI_API_KEY
(required): Your Kagi API key
The server implements MCP Tools:
Search the web using Kagi Search API. Returns high-quality search results without ads or tracking. Use this tool when you need factual information from the web, especially for recent events, technical topics, or when you need multiple sources.
Parameters:
-
query
(string, required): Search query -
limit
(number, optional): Number of results (default: 10, max: 50) -
offset
(number, optional): Results offset for pagination -
language
(string, optional): Language filter (e.g., "en") -
no_cache
(boolean, optional): Bypass cache for fresh results
Example Usage:
{
"query": "svelte framework",
"limit": 5,
"language": "en"
}
Response Format:
{
"meta": {
"total_results": 24,
"api_balance": 11.87
},
"results": [
{
"title": "Svelte • Web development for the rest of us",
"url": "https://svelte.dev/",
"snippet": "Svelte is a UI framework that uses a compiler...",
"published": null
},
// More results...
]
}
Get AI-powered search responses using Kagi FastGPT. Returns a comprehensive answer with citations to source material. Use this tool when you need a detailed answer to a specific question with references to back up the information.
Parameters:
-
query
(string, required): Query or prompt for FastGPT -
cache
(boolean, optional): Use cached responses if available (default: true) -
web_search
(boolean, optional): Include web search results (default: true)
Example Usage:
{
"query": "What is Svelte framework and how does it differ from React?"
}
Response Format:
{
"answer": "**Svelte** is a modern JavaScript framework designed for building web applications...",
"sources": [
{
"title": "Overview • Docs • Svelte",
"url": "https://svelte.io/docs/svelte/overview",
"snippet": "You can use it to build anything on the web..."
},
// More sources...
],
"meta": {
"api_balance": 11.87
}
}
- Clone the repository
- Install dependencies:
npm install
- Build the project:
npm run build
- Run in development mode:
npm run dev
- Update version in package.json
- Build the project:
npm run build
- Publish to npm:
npm publish
If you receive an error like "Insufficient credit to perform this request", you need to allocate more API credits:
- Go to API Billing
- Add more credits to your account
The Search API is in closed beta and currently available only to Kagi Business (Team) plan users. If you don't have access, consider using the FastGPT API which is available to all Kagi users with API credits.
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - see the LICENSE file for details.
- Built on the Model Context Protocol
- Powered by Kagi Search