Kagi MCP Server (Node.js)

Kagi MCP Server (Node.js)

site icon
2025.03.16 1
JavaScript网络搜索AI助手支持搜索工具
Kagi MCP Server 是一个基于 Node.js 的实现,通过 Kagi 搜索 API 为 AI 助手提供网络搜索能力。其主要功能包括使用 Kagi API 进行网络搜索、支持并行多查询、格式化搜索结果等。该服务适用于需要集成网络搜索功能的 AI 助手或应用程序。
View on GitHub

Overview

基本能力

产品定位

Kagi MCP Server 是一个为 AI 助手提供网络搜索能力的中间件服务。

核心功能

  • 使用 Kagi API 进行网络搜索
  • 支持并行多查询
  • 格式化搜索结果
  • 基于 TypeScript 和官方 MCP SDK 构建
  • 预构建,无需额外构建步骤
  • 使用唯一工具名称 kagi_web_search 避免与其他 MCP 服务器冲突

适用场景

  • AI 助手需要获取最新网络信息时
  • 需要并行执行多个搜索查询的应用
  • 需要格式化搜索结果的场景

工具列表

  • kagi_web_search: 提供网络搜索能力,返回格式化的搜索结果

常见问题解答

  • 需要先获取 Kagi API 密钥,目前处于封闭测试阶段,需联系 [email protected] 申请

使用教程

使用依赖

  • Node.js 18 或更高版本
  • Kagi API 密钥

安装教程

  1. 快速启动(无需安装):
KAGI_API_KEY=your_api_key_here npx github:elliottlawson/kagi-mcp-server
  1. 完整安装:
git clone https://github.com/elliottlawson/kagi-mcp-server.git
cd kagi-mcp-server
KAGI_API_KEY=your_api_key_here node build/index.js

如需修改代码,需安装依赖并构建:

npm install
npm run build

调试方式

运行 MCP Inspector 进行调试:

npx @modelcontextprotocol/inspector npx github:elliottlawson/kagi-mcp-server

npx @modelcontextprotocol/inspector node build/index.js

访问 http://localhost:5173 进行调试。

许可证

该项目遵循 MIT 开源许可条款,请参阅 MIT 了解完整条款。