MCP ExplorerExplorer

Kagi MCP server

@kagisearchon 11 days ago
102 MIT
FreeOfficial
Analytics
#search#summarizer
<a href="https://glama.ai/mcp/servers/xabrrs4bka">

Overview

What is Kagi MCP server

Kagi MCP is a server designed to integrate Kagi’s search capabilities and summarization functions with various applications, particularly for use with Claude Desktop. It provides an interface for developers to utilize Kagi’s features through a Multi-Context Protocol (MCP) server model.

Use cases

The main use cases for Kagi MCP include conducting searches for specific queries, such as identifying notable individuals or summarizing content from various media formats. It can be employed for both customer support scenarios and research tasks requiring quick data retrieval and synthesis.

How to use

To use Kagi MCP, first ensure access to the search API, which is available by request. Then, install ‘uv’ and configure the server with required API keys and summarization engine settings. After setting up the configuration file for Claude Desktop, you can pose queries that differ based on the intended purpose, like searching for information or summarizing videos.

Key features

Key features of Kagi MCP include support for varied query types (search and summarization), integration with Claude Desktop, and customizable logging levels. Additionally, it allows users to choose different summarization engines to tailor the output according to their preferences.

Where to use

Kagi MCP can be used in applications that involve interactive querying or content summarization, such as chatbots, virtual assistants, or any other tools that benefit from enhanced information retrieval and processing, especially within environments that deploy Claude Desktop.

Content

Kagi MCP server

smithery badge

Kagi Server MCP server

Setup Intructions

Before anything, unless you are just using non-search tools, ensure you have access to the search API. It is currently in closed beta and available upon request. Please reach out to [email protected] for an invite.

Install uv first.

MacOS/Linux:

curl -LsSf https://astral.sh/uv/install.sh | sh

Windows:

powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

Installing via Smithery

Alternatively, you can install Kagi for Claude Desktop via Smithery:

npx -y @smithery/cli install kagimcp --client claude

Setup with Claude Desktop

Pose query that requires use of a tool

e.g. “Who was time’s 2024 person of the year?” for search, or “summarize this video: https://www.youtube.com/watch?v=jNQXAC9IVRw” for summarizer.

Debugging

Run:

npx @modelcontextprotocol/inspector uvx kagimcp

Local/Dev Setup Instructions

Clone repo

git clone https://github.com/kagisearch/kagimcp.git

Install dependencies

Install uv first.

MacOS/Linux:

curl -LsSf https://astral.sh/uv/install.sh | sh

Windows:

powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

Then install MCP server dependencies:

cd kagimcp

# Create virtual environment and activate it
uv venv

source .venv/bin/activate # MacOS/Linux
# OR
.venv/Scripts/activate # Windows

# Install dependencies
uv sync

Setup with Claude Desktop

Using MCP CLI SDK

# `pip install mcp[cli]` if you haven't
mcp install /ABSOLUTE/PATH/TO/PARENT/FOLDER/kagimcp/src/kagimcp/server.py -v "KAGI_API_KEY=API_KEY_HERE"

Manually

Pose query that requires use of a tool

e.g. “Who was time’s 2024 person of the year?” for search, or “summarize this video: https://www.youtube.com/watch?v=jNQXAC9IVRw” for summarizer.

Debugging

Run:

# If mcp cli installed (`pip install mcp[cli]`)
mcp dev /ABSOLUTE/PATH/TO/PARENT/FOLDER/kagimcp/src/kagimcp/server.py

# If not
npx @modelcontextprotocol/inspector \
      uv \
      --directory /ABSOLUTE/PATH/TO/PARENT/FOLDER/kagimcp \
      run \
      kagimcp

Then access MCP Inspector at http://localhost:5173. You may need to add your Kagi API key in the environment variables in the inspector under KAGI_API_KEY.

Advanced Configuration

  • Level of logging is adjustable through the FASTMCP_LOG_LEVEL environment variable (e.g. FASTMCP_LOG_LEVEL="ERROR")
  • Summarizer engine can be customized using the KAGI_SUMMARIZER_ENGINE environment variable (e.g. KAGI_SUMMARIZER_ENGINE="daphne")
    • Learn about the different summarization engines here

Tools

kagi_search_fetch
Fetch web results based on one or more queries using the Kagi Search API. Use for general search and when the user explicitly tells you to 'fetch' results/information. Results are from all queries given. They are numbered continuously, so that a user may be able to refer to a result by a specific number.
kagi_summarizer
Summarize content from a URL using the Kagi Summarizer API. The Summarizer can summarize any document type (text webpage, video, audio, etc.)

Comments