mcp-servers-kagi
by: ac3xx
A Model Context Protocol server implementation for Kagi's API
📌Overview
Purpose: The Kagi Server provides an MCP server integration for the Kagi Search API, enabling enhanced web search capabilities.
Overview: This TypeScript-based server demonstrates core MCP concepts, offering tools for web searches through Kagi's API during its private beta phase.
Key Features:
-
kagi_search: Allows users to perform web searches by submitting a query string, with an option for a result limit. It returns comprehensive search results from Kagi’s API.
-
Planned Tools: Upcoming features include
kagi_summarize
for generating summaries,kagi_fastgpt
for quick responses, andkagi_enrich
for enriched news results on specific topics.
kagi-server MCP Server
MCP server for Kagi API integration.
This TypeScript-based MCP server integrates the Kagi Search API and demonstrates core MCP concepts.
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:
npx @smithery/cli install kagi-server --client claude
Server Config
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
For debugging, use the MCP Inspector:
npm run inspector
Usage
Once the server is running and connected to Claude Desktop, you can perform web searches.
For example:
- Ask Claude: "Can you search for information about the latest advancements in quantum computing?"
- Claude will use the
kagi_search
tool to fetch results from Kagi's API and summarize or analyze the results.
Note: Planned tools are not yet implemented.
Contributing
Contributions are welcome! Areas for contribution include:
- Implementing planned tools (summarize, fastgpt, enrich)
- Improving error handling and input validation
- Enhancing documentation and examples
License
This project is licensed under the MIT License.
Roadmap
- Implement
kagi_summarize
,kagi_fastgpt
, andkagi_enrich
tools - Improve error handling and input validation
- Enhance documentation and usage examples
- Publish the package to npm for easy installation with Claude Desktop and npx