Skip to main content
Glama

Kagi MCP Server

Official
by kagisearch
MIT License
93
  • Apple
  • Linux

Kagi MCP 服务器

设置说明

首先,除非您只使用非搜索工具,否则请确保您有权访问搜索 API。该 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安装 Kagi for Claude Desktop:

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

然后通过http://localhost:5173访问 MCP 检查器。您可能需要在检查器的环境变量中,将 Kagi API 密钥添加到KAGI_API_KEY下。

高级配置

  • 可以通过FASTMCP_LOG_LEVEL环境变量调整日志记录级别(例如FASTMCP_LOG_LEVEL="ERROR"
  • 可以使用KAGI_SUMMARIZER_ENGINE环境变量定制摘要引擎(例如KAGI_SUMMARIZER_ENGINE="daphne"
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

    • A
      security
      F
      license
      A
      quality
      An MCP protocol server that enables web search functionality using the Tavily API, allowing AI assistants to perform internet searches in real-time.
      Last updated -
      4
      2
      Python
    • -
      security
      F
      license
      -
      quality
      An MCP server that connects AI assistants to SearchAgora, enabling users to search for, discover, and purchase products across the web through natural language conversations.
      Last updated -
      1
      Python
      • Apple
    • -
      security
      F
      license
      -
      quality
      A MCP server that allows AI assistants to interact with the browser, including getting page content as markdown, modifying page styles, and searching browser history.
      Last updated -
      5
      TypeScript
    • A
      security
      A
      license
      A
      quality
      An MCP server implementation that allows AI assistants to access, search, and interact with Dev.to content, including fetching articles, retrieving user information, and publishing new content.
      Last updated -
      10
      53
      Python
      MIT License
      • 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