Navigation
Kagi MCP Server (Node.js): Lightning-Fast, Seamless Scale - MCP Implementation

Kagi MCP Server (Node.js): Lightning-Fast, Seamless Scale

Future-proof your apps with the lightning-fast Kagi MCP Server (Node.js) — developer-friendly, seamlessly scalable, and built for modern API mastery. Elevate performance, today." )

Developer Tools
4.4(55 reviews)
82 saves
38 comments

Ranked in the top 8% of all AI tools in its category

About Kagi MCP Server (Node.js)

What is Kagi MCP Server (Node.js): Lightning-Fast, Seamless Scale?

A high-performance Node.js server enabling AI assistants to perform web searches via the Kagi API. Built with TypeScript and the official MCP SDK, it offers instant scalability and pre-formatted results. Designed to avoid tool naming conflicts, it’s ready to use without compilation.

How to Use Kagi MCP Server (Node.js): Lightning-Fast, Seamless Scale?

Quickly deploy with a single command using npx or install from source. Configure your environment with your Kagi API key and integrate into platforms like Claude Desktop or Cursor:

  • Run directly: KAGI_API_KEY=your_key npx github:elliottlawson/kagi-mcp-server
  • For Claude Desktop: Add MCP config with the specified command and environment variables
  • Cursor setup: Define the server via the UI with the provided command template

Kagi MCP Server (Node.js) Features

Key Features of Kagi MCP Server (Node.js): Lightning-Fast, Seamless Scale?

  • Parallel search processing: Handle multiple queries simultaneously
  • Structured results: Pre-formatted outputs optimized for AI consumption
  • TypeScript foundation: Built with robust type safety and official SDK integration
  • No build required: Use pre-compiled code out of the box
  • Conflict-free naming: Unique kagi_web_search tool identifier

Use Cases of Kagi MCP Server (Node.js): Lightning-Fast, Seamless Scale?

Power real-time search capabilities in AI applications:

  • Enable chatbots to fetch live web data for queries like “Who is Time’s 2024 Person of the Year?”
  • Support multi-query workflows for research or comparison tasks
  • Integrate with enterprise platforms needing scalable search backend

Kagi MCP Server (Node.js) FAQ

FAQ from Kagi MCP Server (Node.js): Lightning-Fast, Seamless Scale?

  • How do I get a Kagi API key? Request access via [email protected]
  • Can I modify the source code? Yes, install dependencies and rebuild with npm run build
  • How do I debug? Use the MCP Inspector tool with the provided command templates
  • How do I adjust logging? Set the DEBUG environment variable
  • Why the unique tool name? To prevent conflicts with other MCP servers sharing generic tool names

Content

Kagi MCP Server (Node.js)

A Node.js implementation of the Kagi MCP server that provides web search capabilities to AI assistants using the Kagi search API.

Features

  • Web search using the Kagi API
  • Support for multiple search queries in parallel
  • Formatted search results
  • Built with TypeScript and the official MCP SDK
  • Pre-built and ready to use (no build step required)
  • Unique tool name (kagi_web_search) to avoid conflicts with other MCP servers

Setup Instructions

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.

Prerequisites

  • Node.js 18 or higher
  • Kagi API key

Quick Start (No Installation)

You can run the server directly without installing it using npx:

KAGI_API_KEY=your_api_key_here npx github:elliottlawson/kagi-mcp-server

Installation

  1. Clone the repository:
git clone https://github.com/elliottlawson/kagi-mcp-server.git
cd kagi-mcp-server
  1. Run directly (no build required):
KAGI_API_KEY=your_api_key_here node build/index.js

If you want to modify the code, you'll need to install dependencies and rebuild:

npm install
npm run build

Setup with Claude Desktop

Add the following MCP config to your Claude Desktop configuration:

{
  "mcpServers": {
    "kagi": {
      "command": "npx",
      "args": ["github:elliottlawson/kagi-mcp-server"],
      "env": {
        "KAGI_API_KEY": "YOUR_API_KEY_HERE"
      }
    }
  }
}

Alternatively, if you've cloned the repository:

{
  "mcpServers": {
    "kagi": {
      "command": "node",
      "args": ["ABSOLUTE_PATH_TO_REPO/build/index.js"],
      "env": {
        "KAGI_API_KEY": "YOUR_API_KEY_HERE"
      }
    }
  }
}

Setup with Cursor

  1. Go to Cursor Settings -> MCP -> Add new MCP server
  2. Configure your MCP:
    * Name: Kagi Search
    * Type: command
    * Command: npx github:elliottlawson/kagi-mcp-server
    * Environment Variables: KAGI_API_KEY=YOUR_API_KEY_HERE

Ask an AI Assistant a Question Requiring Search

For example: "Use Kagi to search for who was time's 2024 person of the year?"

The AI will use the kagi_web_search tool to perform the search, avoiding conflicts with other search tools.

Debugging

Run the MCP Inspector to debug the server:

npx @modelcontextprotocol/inspector npx github:elliottlawson/kagi-mcp-server

Or if you've cloned the repository:

npx @modelcontextprotocol/inspector node build/index.js

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.

Development

Project Structure

kagi-mcp-server/
├── src/
│   ├── index.ts           # Main entry point
│   ├── kagi-client.ts     # Kagi API client
│   └── utils/
│       └── formatter.ts   # Result formatting utilities
├── build/                 # Pre-built JavaScript files
│   ├── index.js           # Executable entry point
│   ├── kagi-client.js
│   └── utils/
│       └── formatter.js
├── package.json
├── tsconfig.json
└── README.md

Building

If you make changes to the TypeScript code, rebuild the project:

npm run build

Running

To run the server:

npm start

Notes

  • The log level can be adjusted through the DEBUG environment variable
  • The server uses stdio for communication with the MCP client
  • The repository includes pre-built JavaScript files, so no build step is required to use it
  • The tool is named kagi_web_search to avoid conflicts with other MCP servers that might have a generic search tool

Related MCP Servers & Clients