https://github.com/kagisearch/kagimcp
A Model Context Protocol (MCP) server for Kagi search.
https://github.com/kagisearch/kagimcp
Last synced: 25 days ago
JSON representation
A Model Context Protocol (MCP) server for Kagi search.
- Host: GitHub
- URL: https://github.com/kagisearch/kagimcp
- Owner: kagisearch
- License: mit
- Created: 2024-12-13T02:41:16.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-03-11T18:04:35.000Z (about 1 month ago)
- Last Synced: 2025-03-11T19:23:04.723Z (about 1 month ago)
- Language: Python
- Homepage:
- Size: 56.6 KB
- Stars: 33
- Watchers: 5
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-mcp-servers - Kagi Search - Web search functionality via Kagi's API (🏢 Enterprise-Supported Implementations / Search & Data Retrieval)
- awesome-mcp-servers - Kagi Search - Web search functionality via Kagi's API (🏢 Enterprise-Supported Implementations / Search & Data Retrieval)
- awesome-mcp-zh - Kagi Search
- Awesome-MCP-Servers-directory - Kagi Search - Search the web using Kagi's search API (Search)
- awesome-mcp-servers - Kagi Search - A Model Context Protocol (MCP) server for Kagi search. (Table of Contents / Search)
- awesome-mcp-servers - Kagi Search - A Model Context Protocol (MCP) server for Kagi search. (Table of Contents / Search)
- awesome-mcp-servers - Kagi Search - Search the web using Kagi's search API (Official Servers)
README
# Kagi MCP server
[](https://smithery.ai/server/kagimcp)
## Setup Intructions
> 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.Install uv first.
MacOS/Linux:
```bash
curl -LsSf https://astral.sh/uv/install.sh | sh
```Windows:
```
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
```### Setup with Claude Desktop
```json
# claude_desktop_config.json
# Can find location through:
# Hamburger Menu -> File -> Settings -> Developer -> Edit Config
{
"mcpServers": {
"kagi": {
"command": "uvx",
"args": ["kagimcp"],
"env": {
"KAGI_API_KEY": "YOUR_API_KEY_HERE"
}
}
}
}
```### Installing via Smithery
Alternatively, you can install Kagi for Claude Desktop automatically via [Smithery](https://smithery.ai/server/kagimcp):
```bash
npx -y @smithery/cli install kagimcp --client claude
```### Ask Claude a question requiring search
e.g. "Who was time's 2024 person of the year?"### Debugging
Run:
```bash
npx @modelcontextprotocol/inspector uvx kagimcp
```## Local/Dev Setup Instructions
### Clone repo
`git clone https://github.com/kagisearch/kagimcp.git`### Install dependencies
Install uv first.MacOS/Linux:
```bash
curl -LsSf https://astral.sh/uv/install.sh | sh
```Windows:
```
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
```Then install MCP server dependencies:
```bash
cd kagimcp# Create virtual environment and activate it
uv venvsource .venv/bin/activate # MacOS/Linux
# OR
.venv/Scripts/activate # Windows# Install dependencies
uv sync
```
### Setup with Claude Desktop#### Using MCP CLI SDK
```bash
# `pip install mcp[cli]` if you haven't
mcp install /ABSOLUTE/PATH/TO/PARENT/FOLDER/kagimcp/src/kagimcp/server.py -v "KAGI_API_KEY=API_KEY_HERE"
```#### Manually
```json
# claude_desktop_config.json
# Can find location through:
# Hamburger Menu -> File -> Settings -> Developer -> Edit Config
{
"mcpServers": {
"kagi": {
"command": "uv",
"args": [
"--directory",
"/ABSOLUTE/PATH/TO/PARENT/FOLDER/kagimcp",
"run",
"kagimcp"
],
"env": {
"KAGI_API_KEY": "YOUR_API_KEY_HERE"
}
}
}
}
```
### Ask Claude a question requiring search
e.g. "Who was time's 2024 person of the year?"
### Debugging
Run:
```bash
# If mcp cli installed (`pip install mcp[cli]`)
mcp dev /ABSOLUTE/PATH/TO/PARENT/FOLDER/kagimcp/src/kagimcp/server.py# If not
npx @modelcontextprotocol/inspector \
uv \
--directory /ABSOLUTE/PATH/TO/PARENT/FOLDER/kagimcp \
run \
kagimcp
```
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`.# Notes
- Level of logging is adjustable through the `FASTMCP_LOG_LEVEL` environment variable (e.g. `FASTMCP_LOG_LEVEL="ERROR"`)
- Relevant issue: https://github.com/kagisearch/kagimcp/issues/4