wxapkg-mcp
by houxiang676
README.md
# wxapkg-mcp
Small MCP server for local `.wxapkg` inspection, decryption, and extraction.
This project was generated entirely by AI.
Use only on packages you own or are authorized to analyze. Do not commit or redistribute third-party Mini Program packages or extracted source code.
By default on Windows, the tool searches:
```text
%APPDATA%\Tencent\xwechat\radium\users\*\applet\packages
```
That keeps user-specific IDs such as `8e7b2...` out of the code and lets each teammate run it on their own machine.
## Install
```powershell
cd $env:USERPROFILE\Desktop\wxapkg-mcp
python -m venv .venv
.\.venv\Scripts\python -m pip install -e .
```
## Project Layout
```text
wxapkg-mcp/
|-- README.md
|-- pyproject.toml
|-- setup.py
|-- requirements.txt
|-- src/
| `-- wxapkg_mcp/
| |-- __init__.py
| |-- main.py
| |-- server.py
| |-- cli.py
| `-- core.py
|-- tests/
| `-- test_core.py
`-- .gitignore
```
## CLI
```powershell
.\.venv\Scripts\wxapkg-tool roots
.\.venv\Scripts\wxapkg-tool apps
.\.venv\Scripts\wxapkg-tool appid wx87ceadd15865a6fb "C:\out\wx87ceadd15865a6fb"
.\.venv\Scripts\wxapkg-tool inspect "C:\path\to\__APP__.wxapkg"
.\.venv\Scripts\wxapkg-tool decrypt "C:\path\to\__APP__.wxapkg" "C:\out\__APP__.wxapkg" --appid wx...
.\.venv\Scripts\wxapkg-tool extract "C:\out\__APP__.wxapkg" "C:\out\extracted"
.\.venv\Scripts\wxapkg-tool batch "C:\path\to\packages\wx...\13" "C:\out" --appid wx...
```
## MCP config
After installation, add this to your MCP client configuration:
```json
{
"mcpServers": {
"wxapkg": {
"command": "wxapkg-mcp"
}
}
}
```
**Note:** This assumes you have already run `pip install -e .` to install the package and make the command available.
### Alternative: Using Python module directly
If you prefer to run it as a Python module without installing:
```json
{
"mcpServers": {
"wxapkg": {
"command": "python",
"args": ["-m", "wxapkg_mcp.server"]
}
}
}
```
Exposed tools:
- `find_wechat_package_roots`
- `list_wechat_apps`
- `inspect_wxapkg`
- `decrypt_wxapkg`
- `extract_wxapkg`
- `decrypt_and_extract_dir`
- `decrypt_and_extract_appid`
For most agent workflows, call `list_wechat_apps` first, then `decrypt_and_extract_appid` with the chosen AppID. The server chooses the latest local version by default; pass `version` only when you need a specific version.
TDQS
B3.3/5.0
Scored across 7 tools
Disambiguation4/5
Tools have distinct purposes, though 'decrypt_and_extract_appid' and 'decrypt_and_extract_dir' both combine decrypt and extract, potentially confusing an agent that only wants one step. Overall, the set is well-separated.
Naming Consistency5/5
All tool names follow a consistent verb_noun pattern in snake_case, such as 'decrypt_wxapkg' and 'list_wechat_apps', making them predictable.
Tool Count5/5
With 7 tools, the server is well-scoped for its domain—covering listing, inspection, decryption, and extraction without being overly numerous or sparse.
Completeness5/5
The tool set covers the full workflow for WeChat Mini Program packages: finding, listing, inspecting, decrypting, and extracting. No obvious gaps for the stated purpose.
Maintenance
ActivityStale
ResponsivenessNo issues