kagi-server MCP Server
镜像
简介
Kagi-Server 是一个基于 TypeScript 的 MCP 服务器,集成了 Kagi 搜索 API,允许 AI 助手执行网络搜索。
功能
kagi_search
: 执行网页搜索并返回结果- 计划中功能: 网页摘要、FastGPT 集成、新闻内容富化
安装步骤
1. 获取 API 密钥
在 Kagi 获取 API 密钥
2. 安装服务器
方法 A: 通过 Smithery 安装
npx @smithery/cli install kagi-server --client claude
方法 B: 手动安装
git clone <repository-url>
cd kagi-server
npm install
npm run build
3. 配置
创建 .env
文件:
KAGI_API_KEY=your_api_key_here
为 Claude Desktop 添加配置:
{
"mcpServers": {
"kagi-server": {
"command": "/path/to/kagi-server/build/index.js",
"env": {
"KAGI_API_KEY": "your_api_key_here"
}
}
}
}
配置文件位置:
- MacOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
%APPDATA%/Claude/claude_desktop_config.json
使用方法
一旦配置完成,简单地在 Claude 中提出需要搜索的问题,例如:
你能搜索一下最近的火星任务进展吗?
Claude 将使用 kagi_search
工具获取最新信息并为您总结结果。
调试
使用内置的 MCP Inspector 进行调试:
npm run inspector
开发命令
npm install # 安装依赖
npm run build # 构建服务器
npm run watch # 开发模式 (自动重建)
更多详细信息,请访问 Smithery 项目页面。