GitHub - ac3xx/mcp-servers-kagi: A Model Context Protocol server implementation for Kagi's API (original) (raw)

kagi-server MCP Server

smithery badgeMCP 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:

Features

Implemented Tools

Planned Tools (Not Yet Implemented)

Development

Install dependencies:

Build the server:

For development with auto-rebuild:

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.jsonOn 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:

The 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:

  1. Ask Claude: "Can you search for information about the latest advancements in quantum computing?"
  2. Claude will use the kagi_search tool to fetch results from Kagi's API.
  3. 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:

License

This project is licensed under the MIT License.

Roadmap