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

sgm-mcp

v0.0.8

Published

SGM MCP Server - Model Context Protocol server for SGM log querying

Downloads

12

Readme

SGM MCP Server

一个基于 Model Context Protocol (MCP) 的 SGM 日志查询服务器,使用 NestJS 框架构建。

📖 简介

SGM MCP Server 是一个 MCP 服务器,提供了查询 SGM(前端监控)日志的标准化接口。通过 MCP 协议,可以方便地在支持 MCP 的 AI 助手或开发工具中查询和分析前端监控日志。

✨ 功能特性

  • 🔍 自定义日志查询 - 支持多维度查询 SGM 自定义日志
  • 📊 白屏监控统计 - 查询白屏统计数据
  • 📋 白屏日志列表 - 获取详细的白屏日志信息
  • 🗺️ 用户轨迹追踪 - 查询日志执行轨迹信息
  • 🔐 身份认证支持 - 支持通过配置或命令行参数传递认证信息
  • 限流保护 - 内置限流机制,批量查询时自动等待

🚀 快速开始

安装

# 使用 npm
npm install -g sgm-mcp

# 使用 pnpm
pnpm add -g sgm-mcp

# 使用 yarn
yarn global add sgm-mcp

使用 npx(无需安装)

npx sgm-mcp

命令行参数配置

也可以通过命令行参数传递认证信息:

node dist/main.js --auth="your-auth-token" --cookie="your-cookie-string"

🛠️ 可用工具

1. get-custom-sgm-log-list

查询 SGM 自定义日志列表

2. get-whitescreen-sgm-log-amount

查询 SGM 白屏统计数据

3. get-whitescreen-sgm-log-list

查询 SGM 白屏日志列表

4. get-log-usertrack

查询 SGM 日志执行轨迹信息

📦 支持的应用

  • jdcdkh-welfare-m - 锦礼采购端 M
  • jdcdkh-welfare-pc - 锦礼采购端 PC
  • jdcdkh-lht-manage - 锦礼管理端