A zero-dependency WeChat iLink adapter adds local MCP tools for Grok Bot and Cursor
Source read in fullRead first
Overview
Someone who wants WeChat messages in Grok Bot or Cursor can run this local iLink client and add it as a stdio MCP after a terminal QR login, without installing OpenClaw.
Workflow
- What it is: A standalone WeChat ClawBot adapter that exposes a local stdio MCP server and a CLI for Grok Bot and Cursor, without installing OpenClaw. It is an independent client for the official Weixin iLink HTTPS JSON API, matching Tencent/openclaw-weixin
3.0.0-beta-1(MIT). The README says the official npm package@tencent-weixin/openclaw-weixin-clionly installs an OpenClaw plugin and must not be used as a dependency or installer here. The project was not published to npm at fetch time. - Grok Bot parts used: A local stdio MCP server that you add to Grok Bot (or Cursor) after a CLI login. Tools:
weixin_status(whether a bot token is saved locally; never starts login),weixin_poll(onegetUpdateslong-poll, default about 35s),weixin_send,weixin_send_media, andweixin_typing. Replies attach the cachedcontext_tokenfrom the last inbound message for that user when one is available. Not part of Grok Bot: the local Node.js 20+ client, the WeChat account with the official ClawBot plugin used to scan the bind QR code, the iLink API athttps://ilinkai.weixin.qq.com, and an optional webhook forwarder (src/forward-poller.js) that is not used by the MCP server and is not tied to any one product's webhook URL. Nox.ai/bot/...template link is in the repo. - You need: Node.js 20 or newer, a WeChat client with the official ClawBot plugin enabled, and a machine you control for the CLI login. Optional:
qrcode-terminalsologincan print a scannable QR code in the terminal. The adapter is a local client, not a public hosted WeChat gateway. Not stated in the source: whether a specific Grok Bot paid plan is required, beyond being able to add a local MCP server. - Install: Clone the repo, log in from a real terminal first, then add a local stdio MCP that can reach the same state directory.
- Step 1:
git clonethe repository,cd weixin-grokbot-adapter, and runnode src/cli.js --help. Optional:npm install --global .ornpm linkso theweixin-grokbotcommand is onPATH. Optional:npm install qrcode-terminal. - Step 2: In a real terminal on a machine you control, run
node src/cli.js status(safe, no QR code) andnode src/cli.js login. Scan the printed URL or QR code with the WeChat account that has the ClawBot plugin enabled. If the phone shows a PIN, type it into the terminal. On success, credentials are written tocredentials.jsonin the state directory with mode 600. The MCP server will never request a QR code or start a bind flow. - Step 3: Add a local stdio MCP server. Do not point Grok Bot at a cloud shell that cannot reach your state directory. Example configuration uses
commandnodeandargsof the absolute path to this checkout'ssrc/cli.jsplusmcp. If the CLI is installed globally,commandcan beweixin-grokbotwithargs["mcp"]. Use thenodeexecutable from your own machine (which node). You can setWEIXIN_GROKBOT_STATE_DIRin the MCP server environment so the tool sees the same credentials created at login. Default state directory:~/.weixin-grokbot-adapter.
- After install: The Bot can poll, send text or media, and show a typing indicator, defaulting to the most recently seen inbound WeChat user if no
--tois given.weixin_status/publicStatusreport only whether a token exists, never the token itself. Optionalnode src/cli.js forwardlong-polls inbound messages and POSTs a JSON summary (source,count,messages) toWEIXIN_FORWARD_WEBHOOK_URL; message text and media paths are included; bot tokens are not. Out of scope includes outbound voice (SILK), thumbnail uploads, other-owner and real-name bind flows, and acting as a public hosted gateway. - Did the author run it: The repository has no run records from the author.
node --test test/*.test.jsornpm testis documented for development. A Chinese guide is inREADME.zh-CN.md.
Key points and results
- Maturity: At fetch time on 2026-11-28 the repo was created 2026-11-27T15:50:00Z, last pushed 2026-11-27T16:34:08Z, with 3 commits, 0 stars, 0 forks, 0 open issues or PRs, and license NOASSERTION in the GitHub API facts block. The README states MIT and points to
LICENSE. There is no Grok Bot template link, and no Grok Bot skill or routine files were extracted. - Permissions and boundaries: Login must be started by a person in a terminal, not by the MCP server, so a bot host cannot pop a login prompt just by connecting the tool.
credentials.jsoncontainsbot_tokenand account identifiers, mode 600, and must not be committed, pasted, or shared.weixin_send_mediacan read a local path or fetch an http(s) URL on the machine running the adapter; the README says to give that tool only to hosts you trust. The optional forwarder sends inbound message text to whatever URL you configure. - Known limits: The official OpenClaw plugin installer must not be used as a dependency here. Outbound voice messages and thumbnail uploads are out of scope, as are other-owner and real-name bind flows, automatic markdown filtering, and running as a public gateway. Default long-poll timeout is 35 seconds; empty poll results are normal. Maximum upload is 100 MiB by default.
- Worth borrowing: Keep QR login in a human-controlled CLI, and let the MCP tools only use already saved credentials. Stated in the Login and Security sections of the README.
- Worth borrowing: Point a local MCP at a state directory on the same machine, not a cloud shell that cannot see
credentials.json. From the Grok Bot / Cursor install notes. - Worth borrowing: Have send reuse a cached
context_tokenfrom the last inbound message for that user. From the MCP tools section.
Source
- Platform
- GitHub
- Author
- ma-pony
- Published
- Categories
- Code and repos
What this evidence label means
Source read in full
We read the source (post, article or transcript). That only means the original was read. It does not mean this site reproduced the author's results.