Kagi Server
FreeNot checkedProvides web search capabilities to AI assistants using the Kagi search API, enabling parallel queries and formatted results.
About
Provides web search capabilities to AI assistants using the Kagi search API, enabling parallel queries and formatted results.
README
A Node.js implementation of the Kagi MCP server that provides web search capabilities to AI assistants using the Kagi search API.
Features
- Web search using the Kagi API
- Support for multiple search queries in parallel
- Formatted search results
- Built with TypeScript and the official MCP SDK
- Pre-built and ready to use (no build step required)
- Unique tool name (
kagi_web_search) to avoid conflicts with other MCP servers
Setup Instructions
Before anything, ensure you have access to the search API. It is currently in closed beta and available upon request. Please reach out to [email protected] for an invite.
Prerequisites
- Node.js 18 or higher
- Kagi API key
Quick Start (No Installation)
You can run the server directly without installing it using npx:
KAGI_API_KEY=your_api_key_here npx github:elliottlawson/kagi-mcp-server
Installation
- Clone the repository:
git clone https://github.com/elliottlawson/kagi-mcp-server.git
cd kagi-mcp-server
- Run directly (no build required):
KAGI_API_KEY=your_api_key_here node build/index.js
If you want to modify the code, you'll need to install dependencies and rebuild:
npm install
npm run build
Setup with Claude Desktop
Add the following MCP config to your Claude Desktop configuration:
{
"mcpServers": {
"kagi": {
"command": "npx",
"args": ["github:elliottlawson/kagi-mcp-server"],
"env": {
"KAGI_API_KEY": "YOUR_API_KEY_HERE"
}
}
}
}
Alternatively, if you've cloned the repository:
{
"mcpServers": {
"kagi": {
"command": "node",
"args": ["ABSOLUTE_PATH_TO_REPO/build/index.js"],
"env": {
"KAGI_API_KEY": "YOUR_API_KEY_HERE"
}
}
}
}
Setup with Cursor
- Go to Cursor Settings -> MCP -> Add new MCP server
- Configure your MCP:
- Name: Kagi Search
- Type: command
- Command: npx github:elliottlawson/kagi-mcp-server
- Environment Variables: KAGI_API_KEY=YOUR_API_KEY_HERE
Setup with Claude Code
claude mcp add --transport stdio kagi --env KAGI_API_KEY=YOUR_API_KEY_HERE -- npx github:elliottlawson/kagi-mcp-server
Ask an AI Assistant a Question Requiring Search
For example: "Use Kagi to search for who was time's 2024 person of the year?"
The AI will use the kagi_web_search tool to perform the search, avoiding conflicts with other search tools.
Debugging
Run the MCP Inspector to debug the server:
npx @modelcontextprotocol/inspector npx github:elliottlawson/kagi-mcp-server
Or if you've cloned the repository:
npx @modelcontextprotocol/inspector node build/index.js
Then access MCP Inspector at http://localhost:5173. You may need to add your Kagi API key in the environment variables in the inspector under KAGI_API_KEY.
Development
Project Structure
kagi-mcp-server/
├── src/
│ ├── index.ts # Main entry point
│ ├── kagi-client.ts # Kagi API client
│ └── utils/
│ └── formatter.ts # Result formatting utilities
├── build/ # Pre-built JavaScript files
│ ├── index.js # Executable entry point
│ ├── kagi-client.js
│ └── utils/
│ └── formatter.js
├── package.json
├── tsconfig.json
└── README.md
Building
If you make changes to the TypeScript code, rebuild the project:
npm run build
Running
To run the server:
npm start
Notes
- The log level can be adjusted through the
DEBUGenvironment variable - The server uses stdio for communication with the MCP client
- The repository includes pre-built JavaScript files, so no build step is required to use it
- The tool is named
kagi_web_searchto avoid conflicts with other MCP servers that might have a genericsearchtool
Install Kagi Server in Claude Desktop, Claude Code & Cursor
unyly install kagi-mcp-serverInstalls into Claude Desktop, Claude Code, Cursor & VS Code — handles npx, uvx and build-from-source repos for you.
First time? Get the CLI: curl -fsSL https://unyly.org/install | sh
Or configure manually
Run in your terminal:
claude mcp add kagi-mcp-server -- npx -y kagi-mcp-serverFAQ
Is Kagi Server MCP free?
Yes, Kagi Server MCP is free — one-click install via Unyly at no cost.
Does Kagi Server need an API key?
No, Kagi Server runs without API keys or environment variables.
Is Kagi Server hosted or self-hosted?
A hosted option is available: Unyly runs the server in the cloud, no local setup required.
How do I install Kagi Server in Claude Desktop, Claude Code or Cursor?
Open Kagi Server on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
Fetch
Web content fetching and conversion for efficient LLM usage.
AWS KB Retrieval
Retrieval from AWS Knowledge Base using Bedrock Agent Runtime.
by modelcontextprotocolSpring AI MCP Server
Provides auto-configuration for setting up an MCP server in Spring Boot applications.
llm-analysis-assistant
A very streamlined mcp client that supports calling and monitoring stdio/sse/streamableHttp, and can also view request responses through the /logs page. It also
by xuzexin-hzCompare Kagi Server with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All ai MCPs
