Kagi MCP Server
OfficialKagi MCP 서버
설정 지침
시작하기 전에, 검색 이외의 도구만 사용하는 경우가 아니라면 검색 API에 대한 액세스 권한이 있는지 확인하십시오. 현재 비공개 베타 상태이며 요청 시 제공됩니다. 초대장을 받으려면 support@kagi.com으로 문의하십시오.
먼저 uv를 설치하십시오.
MacOS/Linux:
curl -LsSf https://astral.sh/uv/install.sh | shWindows:
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"Smithery를 통한 설치
또는 Smithery를 통해 Claude Desktop용 Kagi를 설치할 수 있습니다:
npx -y @smithery/cli install kagimcp --client claudeOpenAI 설정
Codex CLI
codex cli에 Kagi mcp 서버를 추가하려면 다음 명령어를 사용해야 합니다:
codex mcp add kagi --env KAGI_API_KEY=<YOUR_API_KEY_HERE> -- uvx kagimcp이 명령어는 ~/.codex/config.toml에 구성을 작성하므로, API 키를 업데이트하거나 교체해야 하는 경우 codex를 다시 실행하기 전에 해당 파일에서 키를 업데이트하십시오.
Codex CLI에는 자체 내장 검색 기능(--search 플래그를 통해)이 포함되어 있지만 기본적으로 비활성화되어 있습니다. 따라서 검색과 Kagi 간의 충돌을 피하려면 해당 기능을 활성화하지 마십시오.
Claude 설정
Claude Desktop
// 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",
"KAGI_SUMMARIZER_ENGINE": "YOUR_ENGINE_CHOICE_HERE" // Defaults to "cecil" engine if env var not present
}
}
}
}Claude Code
다음 명령어로 Kagi mcp 서버를 추가하십시오 (요약 엔진 설정은 선택 사항):
claude mcp add kagi -e KAGI_API_KEY="YOUR_API_KEY_HERE" KAGI_SUMMARIZER_ENGINE="YOUR_ENGINE_CHOICE_HERE" -- uvx kagimcp이제 claude code에서 Kagi mcp 서버를 사용할 수 있습니다. 단, claude code에는 기본적으로 자체 웹 검색 기능이 포함되어 있어 Kagi와 충돌할 수 있습니다. claude code 설정 파일(~/.claude/settings.json)에 다음을 추가하여 claude의 웹 검색 기능을 비활성화할 수 있습니다:
{
"permissions": {
"deny": [
"WebSearch"
]
}
}도구 사용이 필요한 질문하기
예: 검색의 경우 "Who was time's 2024 person of the year?", 요약의 경우 "summarize this video: https://www.youtube.com/watch?v=jNQXAC9IVRw"
디버깅
실행:
npx @modelcontextprotocol/inspector uvx kagimcpRelated MCP server: sysauto Ask MCP Server
로컬/개발 설정 지침
저장소 복제
git clone https://github.com/kagisearch/kagimcp.git
종속성 설치
먼저 uv를 설치하십시오.
MacOS/Linux:
curl -LsSf https://astral.sh/uv/install.sh | shWindows:
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"그런 다음 MCP 서버 종속성을 설치하십시오:
cd kagimcp
# Create virtual environment and activate it
uv venv
source .venv/bin/activate # MacOS/Linux
# OR
.venv/Scripts/activate # Windows
# Install dependencies
uv syncClaude Desktop 설정
MCP CLI SDK 사용
# `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"수동 설정
# 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",
"KAGI_SUMMARIZER_ENGINE": "YOUR_ENGINE_CHOICE_HERE" // Defaults to "cecil" engine if env var not present
}
}
}
}도구 사용이 필요한 질문하기
예: 검색의 경우 "Who was time's 2024 person of the year?", 요약의 경우 "summarize this video: https://www.youtube.com/watch?v=jNQXAC9IVRw"
디버깅
실행:
# 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그런 다음 http://localhost:5173에서 MCP Inspector에 액세스하십시오. Inspector의 환경 변수 KAGI_API_KEY에 Kagi API 키를 추가해야 할 수도 있습니다.
고급 구성
로깅 수준은
FASTMCP_LOG_LEVEL환경 변수를 통해 조정할 수 있습니다 (예:FASTMCP_LOG_LEVEL="ERROR")요약 엔진은
KAGI_SUMMARIZER_ENGINE환경 변수를 사용하여 사용자 지정할 수 있습니다 (예:KAGI_SUMMARIZER_ENGINE="daphne")다양한 요약 엔진에 대한 자세한 내용은 여기에서 확인하십시오.
MCP에 연결하는 더 안전한 방법이 있을 수 있습니다. 한 사용자가 여기에 세부 정보를 기록해 두었습니다.
--httpCLI 옵션을 사용하여 스트리밍 가능한 HTTP 전송을 켤 수 있습니다.--port및--host인수와 함께 사용할 수 있습니다.
Available Tools
2 toolskagi_extractA
Extract the content of a web page as markdown using the Kagi Extract API. Use this to read the full content of a page when needed.
Inputs: url (required). Returns: result
kagi_search_fetchA
Fetch web results for a query using the Kagi Search API. Use for general search and when the user explicitly tells you to 'fetch' results/information. Results are numbered so that a user may refer to a result by a specific number.
Inputs: query (required), after, limit, before, +7 more. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
Each tool has a clearly distinct purpose: one extracts page content, the other fetches search results. There is no overlap or ambiguity between them.
Both tools follow a consistent 'kagi_' prefix combined with a verb_noun pattern ('extract' and 'search_fetch'), making naming predictable and clear.
With only two tools, the set is minimal but still covers the core search and extract functionalities. However, it feels thin compared to typical MCP servers, which might offer more diverse operations.
The server provides the essential operations for its domain: searching and retrieving content. While additional tools like summarization could be useful, the current set is reasonably complete for basic tasks.
Maintenance
Related MCP Connectors
Augments MCP Server - A comprehensive framework documentation provider for Claude Code
Hosted Web Crawler MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.
Web search API and MCP server for developers building AI agents.
Related MCP Servers
- AlicenseAqualityCmaintenanceAn MCP server that enables Claude to perform web searches using Perplexity's API with intelligent model selection based on query intent and support for domain and recency filtering.64MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that integrates with Sonar API to provide Claude with real-time web search capabilities for comprehensive research.MIT
- AlicenseDqualityDmaintenanceMCP server that provides Claude AI assistants with the ability to search the web, get news, and perform research using the You.com API.42MIT
- AlicenseCqualityDmaintenanceMCP server integrating the Kagi Search API to perform web searches using the kagi_search tool.1MIT