npx claudepluginhub kkk0913/weixin-plugin-cc-cxWeChat channel for Claude Code — bridge WeChat messages to Claude Code via MCP
WeChat channel plugin for Claude Code — bridge WeChat messages to Claude Code via MCP.
git clone https://github.com/kkk0913/claude-plugin-weixin.git
cd claude-plugin-weixin
npm install
npm run build
# Create symlink for Claude Code plugin system
ln -s "$(pwd)" ~/.claude/plugins/local/wechat
Then add to ~/.claude/plugins/installed_plugins.json:
{
"version": 2,
"plugins": {
"wechat@local": [
{
"scope": "user",
"installPath": "~/.claude/plugins/local/wechat",
"version": "1.0.0",
"installedAt": "2026-04-04T00:00:00.000Z"
}
]
}
}
Restart Claude Code or run /reload-plugins.
On first launch, the server prints a QR code URL to stderr:
wechat channel: scan QR to login:
https://liteapp.weixin.qq.com/q/...?bot_type=3
Scan the QR code with WeChat. Session is saved to ~/.claude/channels/weixin/account.json.
The WeChat iLink bot API does not support token refresh. When the session expires (e.g. after extended downtime), the plugin automatically displays a new QR code — just scan again. No restart required.
New WeChat users require pairing by default:
/wechat:access pair <code>Modes (configured in ~/.claude/channels/weixin/access.json):
| Mode | Behavior |
|---|---|
pairing | New users get a pairing code (default) |
allowlist | Only pre-approved users can message |
disabled | All inbound messages are dropped |
| Tool | Description |
|---|---|
reply | Send text + optional file attachments to a WeChat user |
react | Not supported (WeChat has no emoji reactions) |
download_attachment | Download an inbound media file to local inbox |
edit_message | Send a replacement message (WeChat has no edit API) |
src/
├── server.ts # MCP server, polling loop, message routing
├── config/
│ └── access.ts # Access control (pairing/allowlist/disabled)
├── weixin/
│ ├── api.ts # WeChat iLink bot API client
│ ├── types.ts # TypeScript interfaces
│ ├── crypto.ts # AES-128-ECB for CDN media
│ └── media.ts # Upload/download media files
└── util/
└── helpers.ts # Utility functions
npm run dev # Watch mode
npm run build # One-time build
npm start # Run server directly
~/.claude/channels/weixin/ stores:
account.json — login session (token, user ID, bot ID)access.json — access control configinbox/ — downloaded media filesMIT