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

wordpress-auto-mcp

v0.1.3

Published

WordPress autopost MCP server using Application Passwords (NodeJS)

Readme

WordPress 自动发文 MCP(应用程序密码 + NodeJS)

你在 Cursor 等工具和 AI 聊天时,让 AI 通过本 MCP 发布内容到你的 WordPress(自部署)站点,例如:生成技术方案、总结对话内容等。

前置条件

  • WordPress 站点开启 REST API(默认开启),能访问 WP_BASE_URL/wp-json/
  • 在 WordPress 后台为专用用户生成「应用程序密码」(建议角色:Author)。
  • 本机安装 Node.js(建议 18+;本项目在 Node 20 测试)。

安装

npm i
npm run build

在 Cursor 配置 MCP

在 Cursor 的 Settings JSON(或相应的 MCP 配置入口)里添加:

{
  "mcpServers": {
    "wordpressAutoMcp": {
      "command": "npx",
      "args": ["-y", "wordpress-auto-mcp"],
      "env": {
        "WP_BASE_URL": "https://your-site.example",
        "WP_USERNAME": "your_wp_username",
        "WP_APP_PASSWORD": "xxxx xxxx xxxx xxxx xxxx xxxx",
        "WP_DEFAULT_STATUS": "publish",
        "WP_TIMEOUT_MS": "15000"
      }
    }
  }
}

说明:

  • 本项目仅从 MCP 配置传入的环境变量(env)读取配置
  • 本项目不做本地发布日志/幂等去重:重复调用 wp_publish_post 会重复发文,请务必在“确认发布”后再调用。

使用方式(预览 -> 确认 -> 发布)

  1. 在对话中让 AI 生成文章,并调用 wp_preview_post
  2. AI 会把预览内容展示给你。
  3. 你回复“确认发布”。
  4. AI 调用 wp_publish_post(建议传 finalStatus=publish),返回文章链接。

工具说明:

  • wp_preview_post:返回 draftPayload + contentHash
  • wp_publish_post:输入 draftPayload + contentHash(会校验 hash 防止内容被改动)

常见问题

  • 401/403:检查应用程序密码、用户名、以及该用户是否有发文权限(Author/Editor)。
  • 分类/标签categories/tags 需要传 ID 数组(不是名字)。
  • 内容格式content 建议传 HTML;你也可以先让 AI 产出 Markdown,再自行在发布前转换为 HTML。