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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@1a7432/kimi-search-mcp

v0.1.2

Published

MCP server that wraps Moonshot AI (Kimi) $web_search functionality for intelligent web search

Readme

Kimi Search MCP Server

一个将 Moonshot AI (Kimi) 的 $web_search 功能封装为 MCP (Model Context Protocol) 服务的工具。

✨ 特性

  • 🔍 智能搜索: 使用 Kimi AI 内置的联网搜索功能,比传统搜索 API 更智能
  • 🧠 语义理解: AI 自动理解搜索意图,抓取并整合相关内容
  • 🚀 开箱即用: 通过 npx 一键运行,无需复杂配置
  • 🔌 MCP 兼容: 完全兼容 MCP 协议,可与 avante.nvim、Claude Desktop 等工具集成

📦 安装

方式 1: 通过 npm 安装(推荐)

cd ~/kimi-search-mcp
npm install
npm run build
npm link

方式 2: 直接使用 npx

无需安装,在配置中直接使用 npx 运行即可。

🔑 配置环境变量

~/.zshrc~/.bashrc 中添加:

export MOONSHOT_API_KEY="your-moonshot-api-key-here"

然后重新加载配置:

source ~/.zshrc  # 或 source ~/.bashrc

🚀 使用方法

在 avante.nvim 中使用

~/.config/nvim/lua/plugins/avante.luamcp_servers 配置中添加:

mcp_servers = {
  -- Kimi Search MCP 服务 - 提供 AI 驱动的智能搜索
  ["kimi-search"] = {
    command = "node",
    args = {
      os.getenv("HOME") .. "/kimi-search-mcp/dist/index.js",
    },
    env = {
      MOONSHOT_API_KEY = os.getenv("MOONSHOT_API_KEY"),
    },
    timeout = 60000, -- 60秒超时(搜索可能需要较长时间)
  },
  
  -- 或者使用 npx(如果你没有 npm link)
  ["kimi-search"] = {
    command = "npx",
    args = {
      "-y",
      "--prefix=" .. os.getenv("HOME") .. "/kimi-search-mcp",
      "kimi-search-mcp",
    },
    env = {
      MOONSHOT_API_KEY = os.getenv("MOONSHOT_API_KEY"),
    },
    timeout = 60000,
  },
},

测试运行

# 设置环境变量
export MOONSHOT_API_KEY="your-api-key"

# 运行服务器
cd ~/kimi-search-mcp
node dist/index.js

🛠️ 工具说明

kimi_search

使用 Kimi AI 进行智能联网搜索。

参数:

  • query (必需): 搜索查询,可以是问题、关键词或复杂的描述
  • model (可选): 使用的 Kimi 模型,默认 kimi-k2-0905-preview
    • 可选: kimi-k2-0905-preview, moonshot-v1-8k, moonshot-v1-32k, moonshot-v1-128k

示例:

{
  "query": "Moonshot AI Context Caching 技术是什么?",
  "model": "kimi-k2-0905-preview"
}

🆚 与传统搜索 API 的对比

| 特性 | Kimi Search | 传统搜索 API (Tavily/SerpAPI) | |------|-------------|-------------------------------| | 智能程度 | ⭐⭐⭐⭐⭐ AI 自主决策 | ⭐⭐⭐ 固定搜索逻辑 | | 内容整合 | ⭐⭐⭐⭐⭐ 自动理解和总结 | ⭐⭐ 简单拼接结果 | | 上下文理解 | ⭐⭐⭐⭐⭐ 理解对话上下文 | ⭐ 独立搜索请求 | | 配置复杂度 | ⭐ 仅需 API Key | ⭐⭐⭐ 需要配置多个参数 | | 成本 | 按 Token 计费 | 按请求次数计费 |

📝 工作原理

  1. 接收搜索请求: MCP 客户端发送带有 query 的搜索请求
  2. 调用 Kimi API: 使用 Kimi 的 $web_search builtin function
  3. AI 自动搜索: Kimi 在后端自动执行搜索、抓取、理解
  4. 返回整合结果: 返回经过 AI 理解和整合的搜索结果

🔧 开发

# 安装依赖
npm install

# 开发模式(自动编译)
npm run watch

# 构建
npm run build

📄 许可证

MIT

🙏 致谢

  • Moonshot AI - 提供强大的 Kimi AI 和 $web_search 功能
  • MCP - Model Context Protocol