Kagi MCP server

  • Search
TypeScript
MIT
9
  • Apple
A
security – no known vulnerabilities (report Issue)
A
license - permissive license (MIT)
A
quality - confirmed to work

Kagi search API integration

  1. Tools
  2. Prompts
  3. Resources
  4. Server Configuration
  5. README.md

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Tools

Functions exposed to the LLM to take actions

NameDescription
kagi_searchPerform web search using Kagi

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
KAGI_API_KEYYesYour Kagi API key required to authenticate and use the Kagi Search API
README.md

kagi-server MCP Server

smithery badge 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 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 text
  • kagi_fastgpt - Get quick responses using Kagi's FastGPT
  • kagi_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 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.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 inspector

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:

  • 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_summarize tool for webpage and text summarization
  • Implement kagi_fastgpt tool for quick responses
  • Implement kagi_enrich tool for fetching enriched news results
  • Improve 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

GitHub Badge

Glama performs regular codebase and documentation scans to:

  • Confirm that the MCP server is working as expected.
  • Confirm that there are no obvious security issues with dependencies of the server.
  • Extract server characteristics such as tools, resources, prompts, and required parameters.

Our directory badge helps users to quickly asses that the MCP server is safe, server capabilities, and instructions for installing the server.

Copy the following code to your README.md file:

Alternative MCP servers

  • -
    security
    A
    license
    -
    quality
    This server provides: * Fast file search capabilities using Everything SDK * Windows-specific implementation * Complements existing filesystem servers with specialized search functionality
    MIT
  • -
    security
    A
    license
    -
    quality
    A Model Context Protocol (MCP) server for web research. Bring real-time info into Claude and easily research any topic.
    MIT
    • Apple
  • A
    security
    A
    license
    A
    quality
    A Model Context Protocol (MCP) server that provides search and crawl functionality using Search1API.
    MIT
    • Apple
  • A
    security
    A
    license
    A
    quality
    This is a TypeScript-based MCP server that allows searching for New York Times articles from the last 30 days based on a keyword.
    MIT
    • Apple