Kagi MCP Server

Official
MIT License
51
  • Apple
  • Linux

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Integrations

  • Integrates with Kagi search API to provide search capabilities to Claude AI, allowing Claude to answer questions requiring up-to-date information through internet search

Kagi MCP サーバー

セットアップ手順

まず最初に、検索ツール以外のツールをご利用の場合を除いて、検索APIにアクセスできることを確認してください。現在クローズドベータ版で、リクエストに応じてご利用いただけます。招待をご希望の場合は、 support@kagi.comまでご連絡ください。

まずuvをインストールします。

MacOS/Linux:

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

ウィンドウズ:

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

Smithery経由でインストール

あるいは、 Smithery経由で Claude Desktop 用の Kagi をインストールすることもできます。

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

Claude Desktopでのセットアップ

// claude_desktop_config.json // Can find location through: // Hamburger Menu -> File -> Settings -> Developer -> Edit Config { "mcpServers": { "kagi": { "command": "uvx", "args": ["kagimcp"], "env": { "KAGI_API_KEY": "YOUR_API_KEY_HERE" "KAGI_SUMMARIZER_ENGINE": "YOUR_ENGINE_CHOICE_HERE" // Defaults to "cecil" engine if env var not present } } } }

ツールの使用を必要とするクエリをポーズする

たとえば、検索の場合は「タイム誌の2024年のパーソン・オブ・ザ・イヤーは誰だったか?」、要約の場合は「このビデオを要約してください: https://www.youtube.com/watch?v=jNQXAC9IVRw 」などです。

デバッグ

走る:

npx @modelcontextprotocol/inspector uvx kagimcp

ローカル/開発環境のセットアップ手順

クローンリポジトリ

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

依存関係をインストールする

まずuvをインストールします。

MacOS/Linux:

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

ウィンドウズ:

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

次に、MCP サーバーの依存関係をインストールします。

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

Claude Desktopでのセットアップ

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"

手動で

# claude_desktop_config.json # Can find location through: # Hamburger Menu -> File -> Settings -> Developer -> Edit Config { "mcpServers": { "kagi": { "command": "uv", "args": [ "--directory", "/ABSOLUTE/PATH/TO/PARENT/FOLDER/kagimcp", "run", "kagimcp" ], "env": { "KAGI_API_KEY": "YOUR_API_KEY_HERE" "KAGI_SUMMARIZER_ENGINE": "YOUR_ENGINE_CHOICE_HERE" // Defaults to "cecil" engine if env var not present } } } }

ツールの使用を必要とするクエリをポーズする

たとえば、検索の場合は「タイム誌の2024年のパーソン・オブ・ザ・イヤーは誰だったか?」、要約の場合は「このビデオを要約してください: https://www.youtube.com/watch?v=jNQXAC9IVRw 」などです。

デバッグ

走る:

# 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

次に、MCP Inspector http://localhost:5173にアクセスします。インスペクターの環境変数KAGI_API_KEYにKagi APIキーを追加する必要がある場合があります。

詳細設定

  • ログレベルは、 FASTMCP_LOG_LEVEL環境変数を通じて調整可能です(例: FASTMCP_LOG_LEVEL="ERROR"
  • サマライザーエンジンは、 KAGI_SUMMARIZER_ENGINE環境変数を使用してカスタマイズできます(例: KAGI_SUMMARIZER_ENGINE="daphne"
    • さまざまな要約エンジンについてはこちらで学んでください

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

Tools

Kagi の検索機能を Claude AI と統合する MCP サーバー。これにより、Claude は最新の情報を必要とする質問に答えるときにリアルタイムの Web 検索を実行できます。

  1. Setup Intructions
    1. Installing via Smithery
    2. Setup with Claude Desktop
    3. Pose query that requires use of a tool
    4. Debugging
  2. Local/Dev Setup Instructions
    1. Clone repo
    2. Install dependencies
    3. Setup with Claude Desktop
    4. Pose query that requires use of a tool
    5. Debugging
  3. Advanced Configuration
    ID: xabrrs4bka