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

wechat-official-workbuddy-mcp

v1.0.2

Published

Local MCP tools for WeChat article and image-post drafts

Readme

微信公众号草稿发布 Connector(市场准备版 1.0.2)

能力与边界

提供六个工具:wechat_check_access、wechat_validate_article_bundle、wechat_create_draft_from_bundle、wechat_validate_tietu_bundle、wechat_create_tietu_draft_from_bundle、wechat_get_draft。只创建草稿,不正式发布、不群发、不删除、不修改账号设置。专家可独立生成内容包,不强绑定 Connector ID。

当前安装状态

市场配置以 npx -y [email protected] 启动,声明 Node 20 runtime 和最低 WorkBuddy 5.0.0。凭证在 WorkBuddy 连接器管理页填写,不使用 .env。包名、bin 与 Connector mcp.json 保持一致。

本地测试使用附带 npm 源码与 tgz:npm ci、npm test;node index.mjs 通过 stdio 启动。启动使用环境变量,不自动读取 .env,以免意外载入其他账号。不要把凭证粘贴到命令历史;可通过 WorkBuddy 本地认证配置进行真实连接检查。

凭证与数据流

在微信开发者平台找到自己的公众号基础信息中的 AppID、AppSecret。AppSecret 重置和管理员验证由本人完成。安装市场 Connector 后由 token 认证表单填写,AppSecret 为密码输入框。按 WorkBuddy 官方说明凭证保存在用户本机并通过环境变量注入;本 MCP 不持久化密钥。 运行时只向 https://api.weixin.qq.com 请求认证、上传内容和读写草稿;不经过开发者服务器。依赖从 npm 仓库下载。token 在内存中使用,不返回模型。草稿状态记录在用户主目录的 .wechat-official-draft-publisher/state,避免写入 npm 缓存目录。

IP 白名单与连接

微信后台的 API IP 白名单需包含本 MCP 实际网络出口。换 Wi-Fi、VPN 或代理后出口可能变化。安装后让客户端调用 wechat_check_access,成功只返回状态和有效期。 40164:把返回的 request_ip 加入 基本配置 → IP白名单,换网络后需重加;40125:到连接器管理页重填 AppSecret,重置前先确认其他服务;40013:检查是否填成微信号或原始ID;48001:未认证订阅号/个人号可能没有草稿箱权限;网络失败:检查 Node 网络出口。获取 token 成功不代表所有草稿权限可用。市场用户不要使用 .env,凭证只在连接器管理页填写。

长文包

必须传入独立发布包的绝对 bundle_path,可位于 Documents、Downloads 或工作区,不依赖 npm 安装目录。 目录包含 article.html、metadata.json、cover.png/jpg/jpeg、images/*.png/jpg/jpeg。HTML 图片 src 使用包内相对路径。可另外生成 article.md、sources.md、visual-plan.md、editor-note.md 供人工审阅,MCP 不读取无关文件。 metadata 至少包含 title、alternate_titles、digest、author、account_name、date、category、keywords、source_input、cover.file、images_generated、ready_for_draft。作者≤8字、标题≤64字、摘要≤120字;图片未生成或内容未准备好,ready_for_draft=false。结构模板随专家包提供。

贴图包

包含 tietu-metadata.json 和 tietu.png/jpg/jpeg。多图可使用 tietu-02.png 或 images/02.png。JSON 字段:format=wechat_tietu,title(≤20字)、content纯文本、tags数组(≤5项)、images有序数组(1~20张)、images_generated、ready_for_draft。描述加标签≤1000字。以上为当前连接器的保守约束。 可附 tietu-copy.md、poster-copy.md(≤140字)、tietu-sources.md、tietu-prompt.md。无真实图片不得伪造就绪状态。

路径与图片安全

bundle_path 必须为绝对路径且不含 ../。使用 realpath 和文件白名单,拒绝符号链接逃逸、敏感系统/凭据目录;不递归读取其他资料。JSON/HTML≤1MB,单张图片输入≤20MB,正文图片最多20张。扩展名和实际PNG/JPEG字节及解码格式必须一致,压缩后每张<1MB;透明背景转白色。准备内容请使用可信 HTML,净化不等于通用安全渲染器。

推荐流程

明确要求上传指定包 → validate → 检查 ready_for_draft → create → get_draft → 返回 media_id/verified → 人工在微信后台审核发布。市场版长文和贴图均强制就绪检查。 创建超时或结果未知时先核对远端草稿,不能删除状态并盲目重试。已有 ID 的读回失败不会重新创建。上传失败可能留下素材,工具不会删除。

验证限制

单元测试及本地 MCP 校验使用假数据和 mock,不执行真实微信写入。微信贴图字段真实兼容性、素材上传权限、客户端密码表单、冷安装与市场审核需后续验收。工具不负责生图,专家需要实际图片生成能力。

参考:官方连接器规范官方专家规范