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

@upjiang/eventanalyzer-mcp

v1.0.1

Published

MCP 服务:埋点事件分析工具 (Node.js 版本)

Readme

EventAnalyzer MCP Server (Node.js)

埋点事件分析工具的 MCP 服务 - Node.js 版本

功能特性

提供 5 个强大的 MCP Tools,帮助分析和验证埋点数据:

  1. query_event_fields - 查询事件字段定义
  2. analyze_tracking_data - 分析埋点数据,检测类型错误、枚举值错误等
  3. explain_field - 解释字段含义和枚举值
  4. find_field_in_code - 在项目代码中搜索字段使用位置
  5. compare_events - 比较两个事件的字段差异

安装使用

方式 1: npx 直接使用(推荐)

在 Cursor 的 MCP 配置文件中添加:

{
  "mcpServers": {
    "EventAnalyzer-Node": {
      "command": "npx",
      "args": ["-y", "@upjiang/eventanalyzer-mcp"]
    }
  }
}

方式 2: 全局安装

npm install -g @upjiang/eventanalyzer-mcp

然后在 Cursor 配置中:

{
  "mcpServers": {
    "EventAnalyzer-Node": {
      "command": "eventanalyzer-mcp"
    }
  }
}

环境变量配置

可选:自定义埋点 API 地址

export EVENT_API_BASE_URL=https://your-api-domain.com/api/event

默认使用:https://tptest-3d66.top/trans/api/event

使用示例

1. 查询事件字段定义

// Tool: query_event_fields
{
  "event": "LlwResExposure",
  "show_details": true
}

2. 分析埋点数据

// Tool: analyze_tracking_data
{
  "data": "eyJldmVudCI6ICJMbHdSZXNFeHBvc3VyZSIsIC4uLn0=",  // Base64 或 JSON
  "check_required": false
}

3. 解释字段含义

// Tool: explain_field
{
  "event": "LlwResExposure",
  "field_name": "resource_type",
  "show_enum": true
}

4. 搜索字段在代码中的位置

// Tool: find_field_in_code
{
  "field_name": "resource_id",
  "project_path": "/path/to/your/project",
  "max_results": 50
}

5. 比较两个事件

// Tool: compare_events
{
  "event1": "LlwResExposure",
  "event2": "LlwResDownBtnClick"
}

技术栈

  • FastMCP - 简化的 MCP SDK 框架
  • TypeScript - 类型安全的开发体验
  • Zod - 运行时参数验证
  • Node.js - >=18.0.0

开发

# 克隆项目
git clone https://github.com/upjiang/ai-mcp-study.git
cd ai-mcp-study/mcp-list/packages/EventAnalyzer-node

# 安装依赖
npm install

# 开发模式运行
npm run dev

# 编译
npm run build

与 Python 版本的对比

| 特性 | Python 版本 | Node.js 版本 | |------|------------|-------------| | 传输协议 | stdio + HTTP/SSE | stdio only | | 部署方式 | Docker + Nginx | npm + npx | | 功能范围 | 5 个 Tools | 5 个 Tools | | 使用场景 | 远程服务器部署 | 本地 Cursor 使用 |

License

MIT

作者

upjiang