Home / MCP / Kagi MCP Server

Kagi MCP Server

Provides Kagi-powered web search and enrichment tools for MCP clients.

other
Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
    "mcpServers": {
        "kagi_mcp": {
            "command": "uv",
            "args": [
                "--directory",
                "path_to_project",
                "run",
                "kagi-mcp"
            ],
            "env": {
                "KAGI_API_KEY": "YOUR_API_KEY"
            }
        }
    }
}

The Kagi MCP Server lets you search the web using the Kagi API and enriches context for natural language models with web content and the latest news. It exposes tools to quickly query the web, add web and news context to prompts, and is designed to be run as an MCP server that your client can connect to for enhanced web-aware responses.

How to use

When you run the Kagi MCP Server, you avail three core tools: ask_fastgpt to search the web and fetch an answer, enrich_web to add web content to your model’s context, and enrich_news to bring in the latest news. Your MCP client will interact with these tools through the MCP interface, enabling you to perform web-enabled queries, keep model context fresh with current information, and access up-to-date news data as part of your conversations.

How to install

Prerequisites you need before starting: Node.js and npm or a Python environment if you choose an alternative setup. The Kagi MCP Server is installed and run via an MCP runtime command (uv). You will typically install the server and then run it through the MCP manager you use.

Install the Kagi MCP server for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install kagi-mcp --client claude

Configuration notes

Claude Desktop stores the server configuration locally on macOS in the user library under Claude’s config, for example at ~/Library/Application\ Support/Claude/claude_desktop_config.json. You can wire up the MCP server there or rely on managed Smithery configurations to boot the MCP server in your environment.

Development/Unpublished Servers Configuration shows how to run the server via the MCP runtime with an API key for Kagi:

"mcpServers": {
  "kagi-mcp": {
    "command": "uv",
    "args": [
      "--directory",
      "path_to_project",
      "run",
      "kagi-mcp"
    ],
    "env": {
      "KAGI_API_KEY": "YOUR API KEY"
    }
  }
}

Additional notes

If you want to test or debug locally, you can run the MCP server with the same command shown in the unpublished configuration snippet. Replace path_to_project with the actual path to your Kagi MCP project and supply your Kagi API key where indicated.

Troubleshooting

If the server fails to start, verify that the MCP runtime tool uv is available in your PATH, the project directory exists, and that the KAGI_API_KEY environment variable is set correctly in your environment or your local MCP configuration file.

Security considerations

Keep your Kagi API key secure. Do not commit it to source control and limit its permissions to only what you need for web search and enrichment.

Available tools

ask_fastgpt

Search the web and locate an answer using the integrated web search capability.

enrich_web

Enrich model context with web content to improve factual grounding and context.

enrich_news

Enrich model context with the latest news headlines and summaries.