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

@weadmin/weixin-minigame-helper-mcp

v0.1.7

Published

WeChat Mini Game MCP Server - Preview, debug, real-device test and publish

Readme

@weadmin/weixin-minigame-helper-mcp

WeChat Mini Game MCP Server — Preview, debug, real-device test and publish WeChat Mini Games from any MCP-compatible AI coding assistant.

Overview

This package provides a Model Context Protocol (MCP) server that enables AI coding assistants (such as Claude, CodeBuddy, Cursor, etc.) to preview, hot-reload, real-device test, and publish WeChat Mini Games — all through natural language.

Quick Start

Use with npx (recommended)

No installation needed. Configure your MCP client with:

{
  "mcpServers": {
    "weixin-minigame-helper": {
      "command": "npx",
      "args": [
        "-y",
        "--prefer-online",
        "@weadmin/weixin-minigame-helper-mcp@latest"
      ]
    }
  }
}

Global install

npm install -g @weadmin/weixin-minigame-helper-mcp

Then configure your MCP client with:

{
  "mcpServers": {
    "weixin-minigame-helper": {
      "command": "weixin-minigame-helper-mcp"
    }
  }
}

MCP Tools

This server exposes the following tools:

run_game

Start a WeChat Mini Game preview. Launches a local dev server and serves the game in a browser.

| Parameter | Type | Required | Description | |---|---|---|---| | workspacePath | string | ✅ | Absolute path to the Mini Game directory (must contain game.js) |

Returns: Local preview URL and port number.

reload_game

Hot-reload the running game preview. If the game is not running yet, it starts automatically.

| Parameter | Type | Required | Description | |---|---|---|---| | workspacePath | string | Only if game not running | Absolute path to the Mini Game directory |

Returns: Confirmation with the preview URL.

get_logs

Retrieve console log entries (log / warn / error) from the running game.

| Parameter | Type | Required | Description | |---|---|---|---| | filter | string | ❌ | JavaScript regex pattern to filter log messages (case-insensitive) |

Returns: Formatted log entries with timestamps and log levels.

real_device_preview

Build and upload the game to WeChat servers for real device testing. Generates a QR code that can be scanned with WeChat.

| Parameter | Type | Required | Description | |---|---|---|---| | workspacePath | string | ✅ | Absolute path to the Mini Game directory |

Requires: AppID and upload private key (see Configuration).

Returns: QR code displayed in the browser preview page.

publish

Upload the game to the WeChat platform as a development version.

| Parameter | Type | Required | Description | |---|---|---|---| | workspacePath | string | ✅ | Absolute path to the Mini Game directory | | version | string | ✅ | Version number (semver, e.g. "1.0.0") | | desc | string | ❌ | Optional release notes |

Returns: Upload confirmation with version and AppID info.

Note: This uploads as a development version. To promote to experience/production, use the WeChat MP Admin Console.

Configuration

For real-device preview and publish, you need to provide:

  1. AppID — Your WeChat Mini Game AppID
  2. Upload Private Key — The private key file for CI uploads (download from WeChat MP Admin Console → Development → Development Settings → Mini Program Code Upload Key)

Option 1: Browser UI

  1. Start a preview with run_game
  2. Click the ⚙️ settings button in the browser preview page
  3. Fill in your AppID and upload the private key file

Option 2: Environment Variables

export WECHAT_APPID="your_appid_here"
export WECHAT_PRIVATE_KEY_PATH="/path/to/private.key"
# Or provide the key content directly:
export WECHAT_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----\n..."

IP Whitelist

WeChat requires your server's public IP to be whitelisted for CI uploads. Add your IP in WeChat MP Admin Console → Development → Development Settings → IP Whitelist.

Tip: The preview page displays your current public IP in the top-right corner for easy copying.

How It Works

AI Assistant ←→ MCP Protocol (stdio) ←→ This Server ←→ Local Dev Server + miniprogram-ci
                                                              ↓
                                                        Browser Preview
                                                        Real Device QR
                                                        WeChat Upload
  1. The MCP server starts a local Express dev server for game preview
  2. Game source files are compiled (ES modules → WeChat-compatible JS) and served in browser
  3. File changes are watched via chokidar for hot-reload
  4. Real-device preview and publish use miniprogram-ci for WeChat platform integration

Requirements

  • Node.js >= 16
  • A WeChat Mini Game project with game.js entry file
  • For real-device / publish: WeChat AppID + upload private key

License

MIT