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

@liyanbin666/wechat-messenger

v1.0.0

Published

企业微信 MCP 消息服务 - 用于 Trae AI 发送通知和决策请求

Readme

企业微信 MCP 决策服务

基于 MCP (Model Context Protocol) 的企业微信机器人服务,用于 Trae AI 远程决策确认。

功能特性

  • 决策请求 (wechat_request_decision): 高危操作前发送确认请求到企业微信
  • 信息通知 (wechat_notify_info): 发送普通通知消息
  • 成功通知 (wechat_notify_success): 发送操作成功通知
  • 错误通知 (wechat_notify_error): 发送操作失败通知

安装

# 安装依赖
npm install

# 编译 TypeScript
npm run build

配置

  1. 复制环境变量示例文件:
cp .env.example .env
  1. 编辑 .env 文件,配置你的企业微信机器人 Webhook URL

使用

启动服务

npm start

测试

npm test

MCP Inspector 调试

npm run inspector

Trae 配置

在 Trae 的 MCP 配置中添加:

{
  "mcpServers": {
    "wechat-decision": {
      "command": "node",
      "args": ["D:\\work\\SZ\\YFY\\AI_Store\\mcp-wechat-server\\dist\\index.js"],
      "env": {
        "WECHAT_WEBHOOK_URL": "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=bb78ab00-09c8-4fff-b1fe-744327d524f8"
      }
    }
  }
}

工具说明

wechat_request_decision

向企业微信发送决策请求,等待用户确认。

参数:

  • operation (string, 必需): 操作描述
  • risk_level (string, 可选): 风险等级 (high/medium/low),默认 medium
  • details (string, 可选): 详细信息
  • timeout_seconds (number, 可选): 超时时间(秒),默认 300

返回值:

  • approved: 用户确认
  • rejected: 用户拒绝或超时

wechat_notify_info

发送普通信息通知。

参数:

  • message (string, 必需): 消息内容
  • title (string, 可选): 消息标题,默认 "AI 通知"

wechat_notify_success

发送操作成功通知。

参数:

  • operation (string, 必需): 操作名称
  • details (string, 可选): 详细信息

wechat_notify_error

发送操作失败通知。

参数:

  • operation (string, 必需): 操作名称
  • error_message (string, 必需): 错误信息

工作流程

  1. AI 检测到高危操作,调用 wechat_request_decision
  2. 企业微信群收到 Markdown 格式的决策请求
  3. 用户在群里回复 确认 req_xxx拒绝 req_xxx
  4. AI 根据返回结果继续执行或终止

技术栈

  • TypeScript
  • MCP SDK (@modelcontextprotocol/sdk)
  • Axios (HTTP 请求)
  • Zod (参数校验)

许可证

MIT