Skip to main content
Glama

Kagi MCP Server

Official
by kagisearch
MIT License
163
  • Apple
  • Linux

Kagi 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 support@kagi.com 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

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 } } } }
Claude Code

Add the Kagi mcp server with the following command (setting summarizer engine optional):

claude mcp add kagi -e KAGI_API_KEY="YOUR_API_KEY_HERE" KAGI_SUMMARIZER_ENGINE="YOUR_ENGINE_CHOICE_HERE" -- uvx kagimcp

Now claude code can use the Kagi mcp server. However, claude code comes with its own web search functionality by default, which may conflict with Kagi. You can disable claude's web search functionality with the following in your claude code settings file (~/.claude/settings.json):

{ "permissions": { "deny": [ "WebSearch" ] } }

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
# 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 } } } }

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")
    • Relevant issue: https://github.com/kagisearch/kagimcp/issues/4
  • 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
Install Server
A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

Tools

Kagi 검색 기능과 Claude AI를 통합하는 MCP 서버로, Claude가 최신 정보가 필요한 질문에 답할 때 실시간 웹 검색을 수행할 수 있도록 해줍니다.

  1. 설정 지침
    1. Smithery를 통해 설치
    2. Claude Desktop으로 설정
    3. 도구 사용이 필요한 포즈 쿼리
    4. 디버깅
  2. 로컬/개발자 설정 지침
    1. 복제 저장소
    2. 종속성 설치
    3. Claude Desktop으로 설정
    4. 도구 사용이 필요한 포즈 쿼리
    5. 디버깅
  3. 고급 구성

    Related MCP Servers

    • -
      security
      F
      license
      -
      quality
      An MCP server that integrates with Claude to provide smart documentation search capabilities across multiple AI/ML libraries, allowing users to retrieve and process technical information through natural language queries.
      Last updated -
      Python
    • A
      security
      F
      license
      A
      quality
      MCP server that allows Claude AI to interact directly with MySQL databases, enabling query execution and table information retrieval through natural language.
      Last updated -
      1
      3
      4
      JavaScript
    • A
      security
      A
      license
      A
      quality
      An MCP server that allows Claude AI to search, explore, and compare arXiv papers efficiently through a custom-built local server.
      Last updated -
      4
      6
      Python
      MIT License
      • Linux
      • Apple
    • A
      security
      A
      license
      A
      quality
      MCP server that provides Claude AI assistants with the ability to search the web, get news, and perform research using the You.com API.
      Last updated -
      4
      TypeScript
      MIT License
      • Linux
      • Apple

    View all related MCP servers

    MCP directory API

    We provide all the information about MCP servers via our MCP API.

    curl -X GET 'https://glama.ai/api/mcp/v1/servers/kagisearch/kagimcp'

    If you have feedback or need assistance with the MCP directory API, please join our Discord server