Kagi MCP
Enables web search capabilities via Kagi Search API and content summarization of documents, videos, and audio using Kagi Summarizer API
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Kagi MCP search for recent developments in quantum computing"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Kagi MCP (Node.js)
A Node.js implementation of the Kagi Model Context Protocol (MCP) server. This provides a more stable alternative to the official Python implementation, especially when running multiple instances.
Features
Search web content using Kagi Search API
Summarize documents, videos, and audio using Kagi Summarizer API
No port conflicts when running multiple instances
Full compatibility with Claude Desktop
Related MCP server: MCP Web Research Server
Prerequisites
Node.js 18 or higher
Kagi API key (request from support@kagi.com)
Note: The Search API is in closed beta. You may need to request access separately.
Installation
Method 1: Using npx (Recommended for Claude Desktop)
No installation needed! Claude Desktop can run the package directly using npx.
Method 2: Install from npm
npm install -g kagi-mcpOr use it directly with npx:
npx kagi-mcpMethod 3: Install from GitHub directly
npm install -g github:yuki-yano/kagi-mcpMethod 4: Install from source
git clone https://github.com/yuki-yano/kagi-mcp.git
cd kagi-mcp
npm install
npm run build
npm linkConfiguration
Environment Variables
KAGI_API_KEY(required): Your Kagi API keyKAGI_SUMMARIZER_ENGINE(optional): Summarization engine - cecil (default), agnes, daphne, or muriel
Claude Desktop Configuration
Add the following to your Claude Desktop config file:
MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Method 1: Using npx (Recommended - No installation required)
{
"mcpServers": {
"kagi": {
"command": "npx",
"args": ["kagi-mcp"],
"env": {
"KAGI_API_KEY": "your-kagi-api-key"
}
}
}
}This method automatically downloads and runs the latest version from npm without requiring manual installation.
Method 2: Using globally installed package
{
"mcpServers": {
"kagi": {
"command": "kagi-mcp",
"env": {
"KAGI_API_KEY": "your-kagi-api-key"
}
}
}
}Claude Code Configuration
To use with Claude Code CLI, run the following command:
claude mcp add kagi -s user -e KAGI_API_KEY="your-kagi-api-key" -- npx kagi-mcpThis will:
Add the Kagi MCP server to your Claude Code configuration
Set it up at the user level (
-s user)Configure your API key as an environment variable
Use npx to automatically download and run the latest version from npm
You can also use the MCP inspector for debugging:
# Method 1: Using npx (requires npm package to be published)
KAGI_API_KEY="your-kagi-api-key" npx @modelcontextprotocol/inspector npx kagi-mcp
# Method 2: Using local installation (more reliable)
npm install -g kagi-mcp
KAGI_API_KEY="your-kagi-api-key" npx @modelcontextprotocol/inspector kagi-mcp
# Method 3: Using source build
KAGI_API_KEY="your-kagi-api-key" npx @modelcontextprotocol/inspector node dist/index.jsUsage
The MCP server provides two tools:
kagi_search_fetch
Search the web using Kagi Search API.
{
"queries": ["array of search queries"]
}kagi_summarizer
Summarize content from a URL.
{
"url": "https://example.com/article",
"summary_type": "summary" | "takeaway", // optional
"target_language": "EN" // optional
}Development
# Install dependencies
npm install
# Run in development mode
npm run dev
# Build
npm run build
# Run built version
npm startTroubleshooting
"Malformed authorization token" error
This error indicates that your API key is invalid or not properly formatted. Make sure:
You have a valid Kagi API key from support@kagi.com
The key is correctly set in your environment variable
You're not adding extra quotes or spaces around the key
"401 Unauthorized" error for Search API
The Search API is in closed beta. You may need to:
Request access to the Search API separately from support@kagi.com
Ensure your API key has the necessary permissions
Testing your API key
You can test your API key using the included test script:
KAGI_API_KEY="your-api-key" node test-api.jsLicense
MIT
Available Tools
2 toolskagi_search_fetchA
Fetch web results based on one or more queries using the Kagi Search API. Use for general search and when the user explicitly tells you to 'fetch' results/information. Results are from all queries given. They are numbered continuously, so that a user may be able to refer to a result by a specific number.
Inputs: queries (required).
kagi_summarizerB
Summarize content from a URL using the Kagi Summarizer API. The Summarizer can summarize any document type (text webpage, video, audio, etc.)
Inputs: url (required), summary_type, target_language.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools have clearly distinct purposes: one is for fetching search results from queries, and the other is for summarizing content from URLs. There is no overlap in functionality, making it easy for an agent to choose the right tool based on the task.
Both tools follow a consistent naming pattern with the prefix 'kagi_' followed by a descriptive verb_noun format (search_fetch and summarizer). This consistency aids in predictability and readability.
With only 2 tools, the server feels thin for a search and summarization domain, as it lacks operations like advanced search filtering, result management, or summarization customization. This minimal set may limit agent workflows.
The server covers basic search and summarization but has significant gaps: no tools for updating or deleting search results, handling search history, or managing summarization settings. This incompleteness could lead to agent failures in more complex scenarios.
Maintenance
Related MCP Connectors
A Model Context Protocol server for Wix AI tools
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
MCP Server for Web2MD — convert URLs to Markdown from Claude Desktop, Cursor, etc.
Hosted Web Crawler MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Related MCP Servers
- AlicenseCqualityDmaintenanceA Node.js implementation that enables Claude to interact with Perplexity AI's language models through Anthropic's Model Context Protocol, providing tools for advanced chat completions and quick queries.277 npm6Apache 2.0
- AlicenseBqualityDmaintenanceA Model Context Protocol server that enables Claude to perform web research by integrating Google search, extracting webpage content, and capturing screenshots.3425 npm20MIT
- AlicenseCqualityCmaintenanceA Model Context Protocol server implementation that enables AI assistants like Claude to perform Google searches and retrieve web data directly through natural language requests.1140 npm170MIT
- AlicenseBqualityDmaintenanceA Model Context Protocol server that enables LLM clients like VSCode, Copilot, and Claude Desktop to search the web using Google Programmable Search Engine API.1107 npm12Apache 2.0