Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here
wechat logo

wechat

xjblszyy/openclaw-channel-wx

Otheropenclawby xjblszyy

Summary

OpenClaw plugin exposing 0 skills across wechat.

Install to Claude Code

openclaw plugin add xjblszyy/openclaw-channel-wx

Run in Claude Code. Add the marketplace first with /plugin marketplace add xjblszyy/openclaw-channel-wx if you haven't already.

README.md

openclaw-channel-wechat

![License: MIT](LICENSE)

OpenClaw 的微信 Channel 插件 —— 通过 wx-filehelper-api 将微信「文件传输助手」接入 OpenClaw,让你在微信里直接与 AI 对话。

特性

  • 双模式网关 — 支持长轮询(Polling)和 Webhook 两种消息接收方式
  • 媒体消息 — 支持图片、文件的收发与转发
  • 多账号 — 可配置多个微信账号同时运行
  • 安全策略 — 支持 open / pairing / allowlist 三种私聊策略
  • 零依赖桥接 — 仅需一个 wx-filehelper-api 实例即可运行

效果展示

| 微信对话 | 管理后台配置 | |:---:|:---:| | !微信文件传输助手对话 | !OpenClaw 通道配置页面 |

架构

微信用户 ←→ 微信客户端 ←→ wx-filehelper-api (:8000)
                                ↕ HTTP API
                        本插件 (ChannelPlugin)
                                ↕
                          OpenClaw Gateway
                                ↕
                        AI Agent (Claude / GPT / ...)

前置条件

快速开始

1. 启动 wx-filehelper-api

git clone https://github.com/CJackHwang/wx-filehelper-api.git
cd wx-filehelper-api
pip install -r requirements.txt
python main.py
# 扫码登录微信,服务默认运行在 http://localhost:8000

确认服务正常:

curl http://localhost:8000/health
# 预期返回: {"status":"ok"}

2. 安装插件

git clone https://github.com/CJackHwang/openclaw-channel-wechat.git
cd openclaw-channel-wechat
npm install

# 以本地插件形式安装到 OpenClaw
openclaw plugins install -l .

3. 配置 OpenClaw(可省略,步骤2中插件安装完即可)

编辑 ~/.openclaw/openclaw.json,在 channels 中添加 wechat

{
  "channels": {
    "wechat": {
      "enabled": true,
      "apiUrl": "http://localhost:8000",
      "gatewayMode": "polling",   // 或 "webhook"
      "pollingTimeout": 30,
      "userName": "我的微信",
      "dmPolicy": "open"
    }
  }
}

4. 启动并验证

openclaw start
或 重启网关
openclaw gateway restart

日志中出现以下内容即表示启动成功:

[default] Initializing WeChat FileHelper gateway...
[default] wx-filehelper-api is healthy
[WeChat Polling] Started (timeout=30s, limit=100)

打开微信,向文件传输助手发送一条消息,观察 AI 是否回复即可。

配置项

| 字段 | 类型 | 默认值 | 说明 | |------|------|--------|------| | enabled | boolean | true | 是否启用 | | apiUrl | string | http://localhost:8000 | wx-filehelper-api 地址 | | gatewayMode | "polling" \| "webhook" | "polling" | 消息接收方式 | | pollingTimeout | number | 30 | 长轮询超时(秒) | | pollingLimit | number | 100 | 每次轮询最大消息数 | | webhookPort | number | 9100 | Webhook 监听端口 | | webhookPath | string | /webhook/wechat | Webhook 路径 | | webhookUrl | string | — | Webhook 外部 URL(反向代理场景) | | filterBotMessages | boolean | true | 过滤机器人自身消息 | | userName | string | WeChat User | 显示名称 | | dmPolicy | "open" \| "pairing" \| "allowlist" | "open" | 私聊策略 | | allowFrom | string[] | — | 允许的发送者 ID 列表 | | debug | boolean | false | 调试日志 |

Webhook 模式

如需使用 Webhook 模式,确保 wx-filehelper-api 能访问到本插件的 Webhook 地址:

{
  "channels": {
    "wechat": {
      "enabled": true,
      "apiUrl": "http://localhost:8000",
      "gatewayMode": "webhook",
      "webhookPort": 9100,
      "webhookPath": "/webhook/wechat",
      "userName": "我的微信"
    }
  }
}

故障排查

| 现象 | 可能原因 | 解决方案 | |------|----------|----------| | Cannot reach wx-filehelper-api | 服务未启动或地址错误 | 检查 apiUrl,确认 curl /health 正常 | | 收不到消息 | 微信未登录 | 重新扫码登录 wx-filehelper-api | | 回复失败 | API 返回错误 | 检查 wx-filehelper-api 日志 | | Too many consecutive errors | 网络不稳定 | 检查网络连接,插件会自动重试 |

项目结构

├── openclaw.plugin.json     # 插件清单
├── package.json             # NPM 包定义
├── tsconfig.json            # TypeScript 配置
├── index.ts                 # 插件入口
├── utils.ts                 # 工具函数
└── src/
    ├── declarations.d.ts    # openclaw/plugin-sdk 类型声明
    ├── types.ts             # 类型定义
    ├── config-schema.ts     # Zod 配置校验
    ├── runtime.ts           # 运行时单例
    ├── api-client.ts        # wx-filehelper-api HTTP 客户端
    ├── message-mapper.ts    # 消息格式映射
    ├── polling.ts           # 长轮询网关
    ├── webhook.ts           # Webhook 网关
    └── channel.ts           # 核心 ChannelPlugin

License

MIT

Related plugins

Browse all →