Kagi MCP

Kagi MCP

A Node.js implementation of the Kagi Model Context Protocol server that enables Claude AI to search the web and summarize documents, videos, and audio using Kagi's APIs.

Category
访问服务器

Tools

kagi_search_fetch

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.

kagi_summarizer

Summarize content from a URL using the Kagi Summarizer API. The Summarizer can summarize any document type (text webpage, video, audio, etc.)

README

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

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-mcp

Or use it directly with npx:

npx kagi-mcp

Method 3: Install from GitHub directly

npm install -g github:yuki-yano/kagi-mcp

Method 4: Install from source

git clone https://github.com/yuki-yano/kagi-mcp.git
cd kagi-mcp
npm install
npm run build
npm link

Configuration

Environment Variables

  • KAGI_API_KEY (required): Your Kagi API key
  • KAGI_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-mcp

This 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.js

Usage

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 start

Troubleshooting

"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:

  1. Request access to the Search API separately from support@kagi.com
  2. 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.js

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选