Skip to content

sawzhang/claude-channel-weixin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

claude-channel-weixin

Turn WeChat into a Claude Code interface — chat with your AI agent from the app you already use every day.

把微信变成 Claude Code 的入口 — 在你每天都用的 App 里和 AI 助手对话。

License TypeScript

Why This Exists

Claude Code is powerful, but it lives in a terminal. Your team, your family, your life lives in WeChat — the app with 1.3 billion monthly users. This plugin bridges the two: send a message in WeChat, get a response from Claude.

No app switching. No terminal. Just chat.

What You Get

  • Chat with Claude in WeChat — Send text, get intelligent responses powered by Claude Code
  • Voice message support — Voice messages auto-transcribed to text
  • Quoted context — Reply to a message and Claude sees the full context
  • Zero config access — Login once, auto-allowlisted, done
  • Full Claude Code power — Not a wrapper. Your WeChat messages go through the real Claude Code agent with all its tools

How It Works

WeChat App ←→ ilink API ←→ [This Plugin] ←→ Claude Code (MCP stdio)
                                  ↑
                            long-poll for messages
                            sendMessage for replies
  1. Plugin long-polls ilink/bot/getupdates for new WeChat messages
  2. Messages are pushed to Claude Code as notifications/claude/channel events
  3. Claude sees <channel source="weixin" ...> and processes the message
  4. Claude replies via the reply tool → ilink/bot/sendmessage → WeChat

Quick Start

Prerequisites

  • Claude Code installed
  • Bun runtime: curl -fsSL https://bun.sh/install | bash
  • WeChat iOS 8.0.70+ or Android equivalent, with ClawBot plugin enabled

Step 1: Add Marketplace

/plugin marketplace add sawzhang/claude-channel-weixin

Step 2: Install Plugin

/plugin install weixin@sawzhang

Step 3: Login to WeChat

Tell Claude "帮我配置微信" or "login to WeChat" — it will handle the rest. Or manually:

/weixin:configure

Scan QR code → Confirm on phone → Credentials auto-saved.

Step 4: Launch Claude Code

claude --dangerously-skip-permissions --dangerously-load-development-channels plugin:weixin@sawzhang

Done. Send a message to ClawBot in WeChat and Claude will respond.

Note: Only sessions launched with the command above receive WeChat messages. Regular claude sessions are unaffected.

State Files

All state is stored in ~/.claude/channels/weixin/:

File Purpose
account.json Bot credentials (token, baseUrl, accountId)
access.json Access control (allowlist, pending pairings)
sync_buf.json getUpdates cursor (survives restarts)
logs/ Log files

Development

cd weixin/

# Install dependencies
bun install

# Type check
bun build --no-bundle server.ts

# Run MCP server directly
bun server.ts

Project Structure

claude-channel-weixin/
├── .claude-plugin/        # Plugin manifest for Claude Code marketplace
├── weixin/
│   ├── server.ts          # MCP server entry point
│   ├── bin/               # CLI utilities (login, QR code)
│   ├── skills/            # Plugin skills (configure, access)
│   ├── package.json
│   └── .mcp.json          # MCP server config
├── CLAUDE.md
└── README.md

License

MIT

About

WeChat (微信) channel for Claude Code — 在微信里和 Claude 对话

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors