Kagi-server integrates Kagi Search API for web searches and tools enhancing search capabilities and development efficiency
Kagi Server is a TypeScript-based MCP (Model Context Protocol) server designed to integrate web search capabilities with AI applications, specifically leveraging the Kagi API. This server supports core MCP concepts by providing tools that can be used within various AI workflows to enhance data gathering and processing tasks.
Kagi Server implements key features aligned with MCP, enabling seamless integration of web search functionalities into AI applications like Claude Desktop, Continue, Cursor, and others. This server includes kagi_search
as a core tool for executing web searches through Kagi's API, which is currently in private beta.
The kagi_search
tool is designed to facilitate quick access to a wide range of information from the internet via the Kagi API. It takes a query string and an optional limit parameter as inputs, and returns search results. This tool leverages the power of the Kagi API to provide rich, relevant information that can be integrated into workflows within AI applications.
In addition to kagi_search
, several other planned tools await implementation:
Each of these tools will further enhance the capabilities of Kagi Server, making it a comprehensive solution for various AI workflows that require detailed and dynamic data sources.
Kagi Server is built to be a fully compliant MCP server, ensuring seamless interaction with other applications adhering to the Model Context Protocol. The architecture follows best practices in web service design and leverages TypeScript for robust development and maintenance.
Here’s how data flows between an AI application (like Claude Desktop) and Kagi Server:
graph TD
A[AI Application] -->|MCP Client| B[MCP Protocol]
B --> C[Kagi Server]
C --> D[Kagi API]
style A fill:#e1f5fe
style C fill:#f3e5f5
style D fill:#e8f5e8
This diagram illustrates the flow of data from an AI application through its MCP client, interacting with the MCP Protocol used by Kagi Server to communicate effectively with Kagi's API.
Kagi Server is compatible with a variety of MCP clients:
MCP Client | Resources | Tools | Prompts | Status |
---|---|---|---|---|
Claude Desktop | ✅ | ✅ | ✅ | Full Support |
Continue | ✅ | ✅ | ✅ | Full Support |
Cursor | ❌ | ✅ | ❌ | Tools Only |
This table provides a quick overview of the server's compatibility with different MCP clients, highlighting where full support or tool-only support is available.
To start developing with Kagi Server, you’ll need to install its dependencies. Run the following command in your terminal:
npm install
Once installed, build the server and run it for development purposes:
npm run build
npm run watch
For Kagi Server to function correctly, you need to ensure that it has access to your Kagi API key. Create a .env
file in the root directory of the project, including your API key:
KAGI_API_KEY=your_api_key_here
Do not commit this file into version control by adding it to your .gitignore
.
Researchers can use Kagi Server to quickly gather relevant information from the web. For example, a researcher might use Claude Desktop combined with Kagi Server to find recent advancements in quantum computing by simply asking:
"Can you search for information about the latest advancements in quantum computing?"
Kagi Server will process this request and retrieve results that are then displayed to the user.
Integrating kagi_summarize
once implemented, a daily news summary tool can be created. The workflow would involve prompting Claude Desktop (or another MCP client) with a task:
"Summarize the latest news related to technology and innovation."
Kagi Server would then use its summarization tool to generate a concise summary of relevant news articles.
To integrate Kagi Server with specific AI applications, you need to follow these steps using the configuration sample provided below. This configuration allows Claude Desktop (as an example) to recognize and utilize Kagi Server's services:
{
"mcpServers": {
"kagi-server": {
"command": "/path/to/kagi-server/build/index.js",
"env": {
"KAGI_API_KEY": "your_api_key_here"
}
}
}
}
Ensure that the command
path is adjusted to match the actual build directory of Kagi Server.
Kagi Server's performance and compatibility with various MCP clients are designed to ensure reliability and robustness. While full support is currently available for Claude Desktop, Continue, and Cursor, tools-only functionality may be limited in some cases due to ongoing development.
To enhance security and performance, you can configure Kagi Server using environment variables or system settings. For example:
.env
file is stored outside of version control.To integrate Kagi Server, follow the steps outlined in "Integration with MCP Clients," ensuring that you configure the correct path for the command
field and set up the necessary environment variables.
kagi_search
?Yes, planned tools include kagi_summarize
for summarizing web pages or text, kagi_fastgpt
for quick responses, and kagi_enrich
for enriched news results. Contributions are welcome!
Kagi Server is designed to work with the Kagi API, focusing on providing a flexible search tool within the MCP framework.
Use the npm run inspector
command provided in the README. This will launch an MCP Inspector that provides tools for debugging server interactions.
Absolutely! Contributions are encouraged and appreciated. Check out the roadmap section for potential areas of improvement and new features to implement.
Contributions are welcome from the community, with a variety of tasks available depending on your interests:
kagi_summarize
, kagi_fastgpt
, and kagi_enrich
.Kagi Server is part of a broader ecosystem designed to support AI applications through robust MCP integrations. Other resources that complement this project include:
For more information on the MCP protocol, visit Model Context Protocol Documentation.
By following these guidelines and leveraging Kagi Server, developers can significantly enhance their AI applications with web search capabilities.
RuinedFooocus is a local AI image generator and chatbot image server for seamless creative control
Access NASA APIs for space data, images, asteroids, weather, and exoplanets via MCP integration
Simplify MySQL queries with Java-based MysqlMcpServer for easy standard input-output communication
Build stunning one-page websites track engagement create QR codes monetize content easily with Acalytica
Learn to set up MCP Airflow Database server for efficient database interactions and querying airflow data
Explore CoRT MCP server for advanced self-arguing AI with multi-LLM inference and enhanced evaluation methods