Cover image
Try Now
2025-03-16

Knotenimplementierung eines Kagi MCP -Servers

3 years

Works with Finder

1

Github Watches

1

Github Forks

1

Github Stars

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 support@kagi.com 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

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Callycode Limited
  • A geek-themed horoscope generator blending Bitcoin prices, tech jargon, and astrological whimsy.

  • Khalid kalib
  • Write professional emails

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • INFOLAB OPERATIONS 2
  • A medical specialist offering assistance grounded in clinical guidelines. Disclaimer: This is intended for research and is NOT safe for clinical use!

  • Yasir Eryilmaz
  • AI scriptwriting assistant for short, engaging video content.

  • apappascs
  • Entdecken Sie die umfassendste und aktuellste Sammlung von MCP-Servern auf dem Markt. Dieses Repository dient als zentraler Hub und bietet einen umfangreichen Katalog von Open-Source- und Proprietary MCP-Servern mit Funktionen, Dokumentationslinks und Mitwirkenden.

  • OffchainLabs
  • GO -Umsetzung des Ethereum -Beweises des Anteils

  • huahuayu
  • Ein einheitliches API-Gateway zur Integration mehrerer Ethercan-ähnlicher Blockchain-Explorer-APIs mit Modellkontextprotokoll (MCP) für AI-Assistenten.

  • deemkeen
  • Steuern Sie Ihren MBOT2 mit einer Power Combo: MQTT+MCP+LLM

  • zhaoyunxing92
  • 本项目是一个钉钉 MCP (Message Connector Protocol )服务 , 提供了与钉钉企业应用交互的 api 接口。项目基于 Go 语言开发 , 支持员工信息查询和消息发送等功能。

  • pontusab
  • Die Cursor & Windsurf -Community finden Regeln und MCPs

    Reviews

    3 (1)
    Avatar
    user_edEcz9rv
    2025-04-15

    I've been using MCP Code Checker by Marcus Jellinghaus for a while now, and it has significantly improved my coding efficiency. The tool is user-friendly and helps spot errors quickly, ensuring code quality. Highly recommend it for anyone looking to streamline their coding process! Check it out here: https://mcp.so/server/mcp-code-checker/MarcusJellinghaus.