loaditout.ai
SkillsPacksTrendingLeaderboardAPI DocsBlogSubmitRequestsCompareAgentsXPrivacyDisclaimer
{}loaditout.ai
Skills & MCPPacksBlog

claude-code-wechat

MCP Tool

LinekForge/claude-code-wechat

让 Claude Code 住进你的微信——收消息、发文件、定时问好、远程审批

Install

$ npx loaditout add LinekForge/claude-code-wechat

Platform-specific configuration:

.claude/settings.json
{
  "mcpServers": {
    "claude-code-wechat": {
      "command": "npx",
      "args": [
        "-y",
        "claude-code-wechat"
      ]
    }
  }
}

Add the config above to .claude/settings.json under the mcpServers key.

About

Claude Code WeChat

让 Claude Code 住进你的微信——收消息、发文件、定时问好、远程审批,像一个真正在的人。

  • 消息 — 文字、图片、文件、视频、语音、引用,全支持
  • 审批 — 不在电脑前?微信远程批准 Claude 的操作
  • 心跳 — 每天定时发消息,时间随机,正在聊天时不打扰
  • 记忆 — 重启自动回放最近 200 条对话,标注"上一个实例说的"和"你说的",不混淆历史和当下
  • 安全 — 白名单门控,未授权消息静默丢弃

基于微信官方 ClawBot ilink API + Anthropic 官方 Channels 协议。不逆向,不模拟协议。

微信 (iOS) → ClawBot → ilink API → [本插件] → Claude Code Session
                                        ↕
Claude Code ← wechat_reply / wechat_send_file → ilink API → 微信
前置要求
  • Node.js >= 18 或 Bun >= 1.0
  • Claude Code >= 2.1.81(需 claude.ai 账号登录,不支持 API key)
  • 微信 iOS 最新版(需支持 ClawBot 插件)
  • ffmpeg + ffprobe(可选,视频帧提取)
快速开始

1. 扫码登录

npx claude-code-wechat setup

2. 生成 MCP 配置

npx claude-code-wechat install

3. 启动

claude --dangerously-load-development-channels server:wechat

打开微信,找到 ClawBot,发消息。终端里出现,Claude 回复自动发回微信。

<details> <summary>从源码安装</summary>

git clone https://github.com/LinekForge/claude-code-wechat.git
cd claude-code-wechat
bun install
bun setup.ts

</details>

<details> <summary>白名单管理</summary>

首次使用时,第一个发消息的人自动加入白名单。也可以手动管理:

npx claude-code-wechat setup --allow <id> <昵称>
npx claude-code-wechat setup --list

</details>

架构
wechat-channel.ts  ← 主入口:MCP Server + 工具 + 轮询
├── types.ts       ← 接口和常量
├── config.ts      ← 路径、CDN、超时、日志
├── allowlist.ts   ← 白名单管理
├── ilink-api.ts   ← ilink HTTP 调用层
├── media.ts       ← 媒体加解密、CDN 上传下载
├── chat-log.ts    ← 聊天记录持久化和回放
└── heartbeat.ts   ← 心跳调度和热加载

setup.ts           ← 独立 CLI:扫码登录 + 白名单管理
媒体支持

接收(微信 → Claude)

| 类型 | 处理方式 | |------|---------| | 文字 | 直接转发 | | 图片 | CDN 下载 + AES 解密,Claude 可查看 | | 文件 | CDN 下载 + AES 解密,Claude 可读取 | | 视频 | CDN 下载 + ffmpeg 抽帧,Claude 可查看关键帧 | | 语音 | 微信 ASR 自动转文字 | | 引用 | 显示被引用的原文 |

发送(Claude → 微信)

| 类型 | 使用方式 | |------|---------| | 文字 | `wechat_reply

Tags

anthropicchannelchatbotclaude-codeclawbotilinkmcpwechat

Reviews

Loading reviews...

Quality Signals

8
Stars
0
Installs
Last updated25 days ago
Security: AREADME

Safety

Risk Levelmedium
Data Access
read
Network Accessnone

Details

Sourcegithub-crawl
Last commit3/23/2026
View on GitHub→

Embed Badge

[![Loaditout](https://loaditout.ai/api/badge/LinekForge/claude-code-wechat)](https://loaditout.ai/skills/LinekForge/claude-code-wechat)