Kagi 服务器 Mcp 服务器
概览
什么是 mcp-servers-kagi?
mcp-servers-kagi 是一个专为 Kagi 的 API 设计的模型上下文协议(MCP)服务器实现。该项目旨在通过提供一个符合模型上下文协议标准的强大服务器框架,促进与 Kagi 服务的无缝互动。它允许开发者高效地将 Kagi 的功能集成到他们的应用程序中。
mcp-servers-kagi 的特点
- MCP 合规性:完全符合模型上下文协议,确保与各种应用程序和服务的兼容性。
- API 集成:简化 Kagi API 的集成,使开发者能够在无需大量设置的情况下利用其功能。
- 公开仓库:该项目是开源的,并在 GitHub 上可用,鼓励社区的合作和贡献。
- 活跃开发:定期更新和改进,以增强功能和性能。
- 文档:提供全面的文档,以帮助开发者有效理解和使用服务器。
如何使用 mcp-servers-kagi
-
克隆仓库:首先从 GitHub 克隆 mcp-servers-kagi 仓库到本地机器。
git clone https://github.com/ac3xx/mcp-servers-kagi.git
-
安装依赖:导航到项目目录并安装必要的依赖。
cd mcp-servers-kagi npm install
-
配置:根据您的需求配置服务器设置。这可能包括 API 密钥、端点和其他参数。
-
运行服务器:启动服务器以开始处理请求。
npm start
-
访问 API:使用提供的端点通过 MCP 服务器与 Kagi 的服务进行交互。
常见问题解答
什么是模型上下文协议?
模型上下文协议是一种标准,旨在促进不同系统和应用程序之间的通信。它提供了一种结构化的方式来交换数据和命令,确保各种平台之间的互操作性。
mcp-servers-kagi 是免费使用的吗?
是的,mcp-servers-kagi 是一个开源项目,发布在 MIT 许可证下,允许任何人自由使用、修改和分发该软件。
我如何为该项目做贡献?
欢迎贡献!您可以通过报告问题、提交功能请求或创建包含改进或错误修复的拉取请求来贡献。有关更多详细信息,请参阅仓库中的贡献指南。
我在哪里可以找到文档?
mcp-servers-kagi 的文档可在仓库中找到。您还可以访问官方模型上下文协议网站以获取更多资源和信息。
我如何报告错误?
如果在使用 mcp-servers-kagi 时遇到任何问题,请在仓库的 GitHub 问题页面上报告。请提供尽可能多的细节,以帮助维护者有效解决问题。
详情
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_search
tool 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
- Implement
kagi_summarize
tool for webpage and text summarization - Implement
kagi_fastgpt
tool for quick responses - Implement
kagi_enrich
tool for fetching enriched news results - Improve error handling and add more robust input validation
- Add more comprehensive usage examples and documentation
- Publish the package to npm for easy installation and use with Claude Desktop and npx
Server配置
{
"mcpServers": {
"mcp-servers-kagi": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/metorial/mcp-container--ac3xx--mcp-servers-kagi--mcp-servers-kagi",
"node ./build/index.js"
],
"env": {
"KAGI_API_KEY": "kagi-api-key"
}
}
}
}