Skip to main content

A zero-dependency WeChat iLink adapter adds local MCP tools for Grok Bot and Cursor

GitHubGitHubma-pony2026-11-27

Code and reposSource read in fullRead first
GitHubGitHubma-pony2026-11-27

Open original

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

  1. 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-cli only 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.
  2. 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 (one getUpdates long-poll, default about 35s), weixin_send, weixin_send_media, and weixin_typing. Replies attach the cached context_token from 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 at https://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. No x.ai/bot/... template link is in the repo.
  3. 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-terminal so login can 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.
  4. 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 clone the repository, cd weixin-grokbot-adapter, and run node src/cli.js --help. Optional: npm install --global . or npm link so the weixin-grokbot command is on PATH. 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) and node 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 to credentials.json in 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 command node and args of the absolute path to this checkout's src/cli.js plus mcp. If the CLI is installed globally, command can be weixin-grokbot with args ["mcp"]. Use the node executable from your own machine (which node). You can set WEIXIN_GROKBOT_STATE_DIR in the MCP server environment so the tool sees the same credentials created at login. Default state directory: ~/.weixin-grokbot-adapter.
  5. 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 --to is given. weixin_status / publicStatus report only whether a token exists, never the token itself. Optional node src/cli.js forward long-polls inbound messages and POSTs a JSON summary (source, count, messages) to WEIXIN_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.
  6. Did the author run it: The repository has no run records from the author. node --test test/*.test.js or npm test is documented for development. A Chinese guide is in README.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.json contains bot_token and account identifiers, mode 600, and must not be committed, pasted, or shared. weixin_send_media can 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_token from 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.

Read the editorial and evidence policy

Other cases in this scenario

This unofficial community project is independent of xAI. xAI has neither approved nor endorsed it. No sign-up. The methods and figures come from the original authors.