
ac3xx/mcp-servers-kagi 是从 https://github.com/ac3xx/mcp-servers-kagi. 导入的 MCP 服务器候选
概览
ac3xx/mcp-servers-kagi 是从 https://github.com/ac3xx/mcp-servers-kagi. 导入的 MCP 服务器候选
概述(AI 翻译)
用于Kagi API集成的MCP服务器
这是一个基于TypeScript的MCP服务器,集成了Kagi Search API。它通过提供以下内容演示了MCP的核心概念:
- 使用 Kagi API 进行网页搜索及其他操作的工具(目前处于私测阶段)
特色
实现工具
kagi_search- 使用 Kagi 进行网页搜索- 以查询字符串和可选的极限为参数
- 返回Kagi API的搜索结果
计划中的工具(尚未实施)
kagi_summarize- 生成网页或文本摘要kagi_fastgpt- 使用 Kagi 的 FastGPT 快速回复kagi_enrich- 获取特定主题的丰富新闻结果
发展
安装依赖:
搭建服务器:
关于自动重建的开发:
环境设置
在根目录中用你的 Kagi API 密钥创建一个 .env 文件:
确保在你的 .gitignore 文件中添加 .env] 以保护你的 API 密钥安全。
安装
通过Smithery安装
通过Smithery自动安装Claude Desktop版Kagi服务器:
要配合Claude Desktop使用,添加服务器配置:
在 MacOS 上:~/Library/Application Support/Claude/claude_desktop_config.json
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
kagi-server MCP Server
MCP server for Kagi API integration
This is a TypeScript-based MCP server that integrates the Kagi Search API. It demonstrates core MCP concepts by providing:
- Tools for performing web searches and other operations using Kagi’s API (currently in private beta)
Features
Implemented Tools
kagi_search- Perform web searches using Kagi- Takes a query string and optional limit as parameters
- Returns search results from Kagi’s API
Planned Tools (Not Yet Implemented)
kagi_summarize- Generate summaries of web pages or textkagi_fastgpt- Get quick responses using Kagi’s FastGPTkagi_enrich- Fetch enriched news results on specific topics
Development
Install dependencies:
npm install
Build the server:
npm run build
For development with auto-rebuild:
npm run watch
Environment Setup
Create a .env file in the root directory with your Kagi API key:
KAGI_API_KEY=your_api_key_here
Make sure to add .env to your .gitignore file to keep your API key secure.
Installation
Installing via Smithery
To install Kagi Server for Claude Desktop automatically via Smithery:
npx @smithery/cli install kagi-server --client claude
To use with Claude Desktop, add the server config:
On MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"kagi-server": {
"command": "/path/to/kagi-server/build/index.js",
"env": {
"KAGI_API_KEY": "your_api_key_here"
}
}
}
}
Debugging
Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector, which is available as a package script:
npm run inspector
The Inspector will provide a URL to access debugging tools in your browser.
Usage
Once the server is running and connected to Claude Desktop, you can use it to perform web searches. For example:
- Ask Claude: “Can you search for information about the latest advancements in quantum computing?”
- Claude will use the
kagi_searchtool to fetch results from Kagi’s API. - Claude will then summarize or analyze the search results for you.
Note: The planned tools (summarize, fastgpt, enrich) are not yet implemented and cannot be used.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request. Some areas for contribution include:
- Implementing the planned tools (summarize, fastgpt, enrich)
- Improving error handling and input validation
- Enhancing documentation and usage examples
License
This project is licensed under the MIT License.
Roadmap
安装
npx @smithery/cli install kagi-server --client claude配置
{
"mcpServers": {
"kagi-server": {
"command": "/path/to/kagi-server/build/index.js",
"env": {
"KAGI_API_KEY": "your_api_key_here"
}
}
}
}