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

@lemonbi/chatbi-agent

v1.0.17

Published

ChatBI MCP Server - Lemonbi 的 MCP 服务

Readme

ChatBI MCP Server

ChatBI 数据分析的 MCP (Model Context Protocol) 服务器,支持在 Windsurf、Cursor 等 AI 编辑器中直接调用 ChatBI 接口进行数据分析。

特性

  • ✅ 支持多渠道、多账户的广告投放数据分析
  • ✅ 智能选择 sheet_type(1个账户用 AI_ONE,多个账户用 AI_TWO)
  • ✅ 自动添加 BI_USER_ID 到请求头
  • ✅ 支持流式和非流式接口
  • ✅ 通过 npx 直接使用,无需安装

快速开始

1. 在 Windsurf/Cursor 中配置

编辑配置文件:

  • Windsurf: ~/.windsurf/mcp_config.json
  • Cursor: ~/.cursor/mcp_config.json
{
  "mcpServers": {
    "chatbi-agent": {
      "command": "npx",
      "args": ["@lemonbi/chatbi-agent"],
      "env": {
        "API_BASE_URL": "https://chatbireport.tangelo.com.cn/dbot/api",
        "BI_USER_ID": "rvPemrAuVA"
      }
    }
  }
}

2. 使用示例

在 AI 编辑器中直接提问:

请帮我查询小红书电商账户「BI数据精灵001」在 7 月整月的 BI 数据

或者:

分析7月各渠道名称的投放情况,包括京准通的「BI智能广告投放3号」和小红书的「BI数据精灵001」

MCP 参数格式

重要:MCP 工具直接使用 API 格式,无需转换!

单账户示例

{
  "biz_type": "REPORT",
  "query": "分析7月各渠道名称的投放情况",
  "media": {
    "sheet_type": "AI_ONE",
    "channels": [
      {
        "channel": "jzt",
        "category_tag": "ecom",
        "accounts": ["BI智能广告投放3号"]
      }
    ]
  }
}

多账户示例

{
  "biz_type": "REPORT",
  "query": "分析7月各渠道名称的投放情况",
  "media": {
    "sheet_type": "AI_TWO",
    "channels": [
      {
        "channel": "jzt",
        "category_tag": "ecom",
        "accounts": ["BI智能广告投放3号"]
      },
      {
        "channel": "redbook",
        "category_tag": "soc",
        "accounts": ["BI数据精灵001"]
      }
    ]
  }
}

请求头

{
  "Content-Type": "application/json",
  "BI_USER_ID": "rvPemrAuVA"
}

参数说明

  • biz_type: 业务类型,默认为 REPORT
  • query: 用户的分析查询问题
  • media.sheet_type:
    • AI_ONE: 单账户分析
    • AI_TWO: 多账户分析
    • 自动根据账户数量选择
  • media.channels: 渠道列表
    • channel: 渠道代码
      • jzt - 巨量引擎
      • redbook - 小红书
      • ks - 快手
    • category_tag: 分类标签
      • ecom - 电商
      • soc - 社交
    • accounts: 账户名称列表

工具说明

chat

智能分析工具,根据查询内容自动选择接口:

  • 包含"流式"、"实时"、"进度"等关键词 → 使用流式接口
  • 其他情况 → 使用普通接口(更快)

参数

  • query (必需): 分析查询问题
  • accounts (必需): 账户列表
  • biz_type (可选): 业务类型,默认 REPORT
  • sheet_type (可选): 表单类型,自动选择

环境变量

  • API_BASE_URL: ChatBI API 基础地址,默认 https://chatbireport.tangelo.com.cn/dbot/api
  • BI_USER_ID: BI 用户ID,默认 rvPemrAuVA

本地开发

# 安装依赖
npm install

# 本地测试
node index.js

# 测试参数格式
node test_mcp.js

发布到 npm

# 登录 npm
npm login

# 发布
npm publish --access public

License

MIT