npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

kagi-mcp

v0.0.1

Published

Node.js implementation of Kagi MCP server for Model Context Protocol

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 [email protected])
  • 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 [email protected]
  • 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 [email protected]
  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