# 微信小程序逆向 MCP

> Analyze WeChat Mini Program APIs and generate standalone local signing scripts.

- **URL**: https://followmcp.com/en/servers/wx-mp-mcp
- **Category**: Dev Tools
- **Origin**: Community
- **Stars**: 330
- **FMRS Score**: 47/100 (Grade D)
- **Source**: https://github.com/WhiteNightShadow/wx-mp-mcp
- **Transports**: stdio (local process)
- **Runtimes**: Node.js 18+
- **Auth**: No credential needed

## Overview
WeChat Mini Program Reverse Engineering MCP is an MCP server for AI coding tools. It decrypts and analyzes Mini Program packages, captures or imports HTTPS request samples, analyzes signatures, and exports code from an offline sandbox. The project says it reads encrypted packages from disk, passively captures traffic through a proxy, and runs unpacked code copies in a Node.js sandbox; it does not attach to the WeChat process, modify its memory, or open a debug port.

## Best for
- Developers and security researchers working on Mini Programs they own or are authorized to assess.
- Users who can access the local WeChat Mini Program cache and have Node.js available.
- Workflows that reproduce authorized API signing logic in a local script.

## Not for
- Unauthorized access to Mini Programs, bypassing another party's security, or violating service terms.
- Users seeking cloud-hosted or remote analysis.
- Scenarios that require injecting into or debugging the WeChat process.

## Required permissions
- Needs to read wxapkg files in the local WeChat cache; macOS may require Full Disk Access for the program running the MCP, or use of a cache copy.
- Packet capture requires local mitmproxy installation and user-configured proxy and certificates.
- Requires a local Node.js runtime; the README specifies Node.js 18 or later.

## Risks
- Unpacking, signature analysis, and sandbox results depend on the package and samples; the README does not guarantee recovery for every obfuscated or runtime-encrypted case.
- Proxy capture requires HTTPS proxy and certificate configuration; a misconfiguration may affect local network requests.
- Analyze only Mini Programs you own or are authorized to assess, and follow applicable service terms.

## Client config (JSON)
```json
{"mcpServers":{"wx-mp-mcp":{"command":"node","args":["/绝对路径/wx-mp-mcp/dist/index.js"]}}}
```

## Tools (12)
- `mp_list_apps`: List Mini Programs in the local WeChat cache, including appid, version, and package count.
- `mp_decrypt`: Decrypt and extract one wxapkg, finding the latest cached package by appid or using a supplied file path.
- `mp_analyze`: Unpack a Mini Program and analyze signatures, encryption, and APIs, producing reproduction code and a report.
- `mp_analyze_all`: Analyze all Mini Programs found in the local cache.
- `mp_capture_start`: Start mitmproxy capture and save requests as structured JSONL, with optional URL filtering.
- `mp_capture_list`: View captured requests and identify fields such as sign and token.
- `mp_capture_stop`: Stop capture and return the output file path and request count.
- `mp_capture_import`: Import HAR, cURL, JSON request bodies, or JSONL captures and normalize them to JSONL.
- `mp_sign_crack`: Try to infer a signing formula from request samples by enumerating parameter subsets and listed algorithms, and generate reproduction code; it can also consume candidate information from an analysis report.
- `mp_sandbox_modules`: List bundle modules to help locate the signing SDK module.
- `mp_sandbox_run`: Load app-service.js in an offline Node.js sandbox and execute JavaScript.
- `mp_sandbox_export`: Extract required modules and export a standalone .mjs signing script.
