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

@kelvinjhu/lexiang-search

v1.0.4

Published

乐享知识库AI问答MCP服务器

Downloads

20

Readme

Lexiang Search MCP Server

npm version License: MIT

这是一个基于 Model Context Protocol (MCP) 的服务器,允许 LLM (如 Claude) 直接访问腾讯乐享 (Lexiang) 知识库,进行智能问答和知识检索。

✨ 功能特性

  • 全站知识检索: 支持对乐享全站、指定知识库 (Space) 或团队 (Team) 进行搜索。
  • 智能问答: 基于乐享 AI 引擎,提供精准的问答服务。
  • 流式响应: 支持流式 (Streaming) 输出,实时反馈思考过程和答案。
  • 多轮对话: 支持 Session 管理,保持上下文连贯。
  • 灵活配置: 支持通过环境变量配置默认模型 (QA Mode) 和超时时间。
  • 安全可靠: App Key/Secret 通过环境变量配置,不暴露给 LLM。

📦 安装

npm install -g @kelvinjhu/lexiang-search

或者直接使用 npx:

npx -y @kelvinjhu/lexiang-search

🚀 配置 (Claude Desktop)

在您的 claude_desktop_config.json 文件中添加以下配置:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "lexiang": {
      "command": "npx",
      "args": ["-y", "@kelvinjhu/lexiang-search"],
      "env": {
        "LEXIANG_APP_KEY": "您的乐享AppKey",
        "LEXIANG_APP_SECRET": "您的乐享AppSecret",
        "LEXIANG_TIMEOUT": "120000",
        "LEXIANG_QA_MODE": "reasoning",
        "LOG_LEVEL": "INFO"
      }
    }
  }
}

注意: 请确保替换 LEXIANG_APP_KEYLEXIANG_APP_SECRET 为您真实的凭证。

🛠️ 使用指南

配置完成后,重启 Claude Desktop。您可以在对话中直接使用自然语言调用工具:

  • 全站搜索: "乐享里关于‘报销流程’的规定是什么?"
  • 指定范围搜索: "在知识库 ID 为 123456 中搜索‘健康评估算法’。"
  • 多轮对话: "接上一个问题,那具体的计算公式是怎样的?"

🔧 开发与调试

本地构建

# 安装依赖
npm install

# 构建
npm run build

# 运行
node dist/cli.js

环境变量

| 变量名 | 说明 | 必填 | 默认值 | |Data | Description | Required | Default | |---|---|---|---| | LEXIANG_APP_KEY | 乐享应用 Key | 是 | - | | LEXIANG_APP_SECRET | 乐享应用 Secret | 是 | - | | LEXIANG_TIMEOUT | 请求超时时间 (毫秒) | 否 | 60000 (60秒) | | LEXIANG_QA_MODE | 默认问答模式 (normal, reasoning, research 等) | 否 | normal | | LOG_LEVEL | 日志级别 (DEBUG, INFO, WARN, ERROR) | 否 | INFO |

📄 License

MIT