npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@vrs-soft/wecom-aibot-mcp

v2.4.19

Published

企业微信智能机器人 MCP 服务 - Claude Code 审批通道

Downloads

4,461

Readme

wecom-aibot-mcp

English | 中文文档

Enterprise WeChat AI Bot MCP Service - Remote Approval Channel for Claude Code

Handle Claude Code approval requests via WeChat, even when away from your computer.

Features

  • 🔐 Remote Approval: Approve/deny sensitive operations (Bash/Write/Edit) via WeChat cards
  • 🔍 Full Command View: Approval cards include a detail link — open in browser to view the complete command
  • 💬 Bidirectional Communication: Real-time task progress notifications
  • 📱 Headless Mode: Switch to WeChat interaction when leaving terminal
  • 🤖 Multi-bot Support: Multiple bots for team and group chat scenarios
  • 🌐 Remote Deployment: MCP server can be deployed on a remote host with Bearer Token auth
  • 🔄 Auto-reconnect: Channel mode automatically reconnects after network interruption or server restart

Architecture

┌─────────────────┐      MCP (stdio)      ┌──────────────────────┐
│  Claude Code    │  ──────────────────▶  │  Channel MCP Proxy   │
│  (MCP Client)   │  ◀──────────────────  │  (local, SSE client) │
└─────────────────┘                       └──────────────────────┘
                                                    │ SSE
                                                    ▼
                                          ┌─────────────────────┐
                                          │  wecom-aibot-mcp    │
                                          │  HTTP MCP Server    │
                                          │  (local or remote)  │
                                          └─────────────────────┘
                                                    │
                                            WebSocket Connection
                                                    ↓
                                          ┌─────────────────────┐
                                          │  Enterprise WeChat  │
                                          └─────────────────────┘
                                                    │
                                                    ↓
                                          ┌─────────────────────┐
                                          │  User WeChat Client │
                                          │  (Mobile/Desktop)   │
                                          └─────────────────────┘

Installation

Prerequisites

  • Node.js >= 18
  • Enterprise WeChat account (with bot creation permission)
  • Claude Code

Step 1: Create Enterprise WeChat Bot

  1. Login to WeChat Work admin portal: https://work.weixin.qq.com
  2. Go to "Management Tools" → "Smart Bot"
  3. Click "Create Bot" → "Manual Creation"
  4. Fill in bot name (e.g., "Claude Approval Assistant")
  5. In "API Configuration":
    • Select "Use Long Connection"
    • Click "Get Secret"
  6. Record Bot ID and Secret

Step 2: Run Configuration Wizard

npx @vrs-soft/wecom-aibot-mcp --setup

Choose the appropriate role flag:

| Command | Role | Description | |---------|------|-------------| | --setup | Interactive | Guides through local or remote setup | | --setup --server | Server-side | Configure bot + Token, no local MCP config | | --setup --channel | Channel client | Connect to remote server, write Channel MCP config | | --setup --server --channel | Full local | HTTP + Channel full install |

Start server after setup:

npx @vrs-soft/wecom-aibot-mcp --http-only --start

Commands

| Command | Description | |---------|-------------| | --start / --stop | Start/stop background service | | --status | View service status and bot list | | --config | Modify default bot configuration | | --add / --delete | Add/delete bot | | --set-token [token] | Set Auth Token (for remote deployment) | | --set-token --clear | Clear Auth Token | | --debug | Start in foreground with debug output | | --http-only | Start HTTP MCP Server only (server-side use) | | --channel-only | Configure Channel MCP only (requires MCP_URL) | | --clean-cache | Clear CC registry cache | | --upgrade | Force upgrade global configs | | --uninstall | Complete uninstall |

Run Modes

| | Channel Mode | HTTP Mode | |-|-------------|-----------| | Message delivery | SSE push (instant) | /loop heartbeat polling | | Latency | Immediate | ≤1 minute | | Claude account | claude.ai direct only | Any (including API relay) | | Reconnect | Auto (including server restart) | Auto via heartbeat |

To enter WeChat mode, tell Claude: "Now contact me via WeChat" — this triggers the headless-mode skill automatically.

Claude startup command for Channel mode:

claude --dangerously-load-development-channels server:wecom-aibot-channel

Usage Example

Headless Mode (Remote Approval)

You: Now contact me via WeChat

Claude: Entered WeChat mode. All interactions will go through Enterprise WeChat.

[You leave the computer. Claude needs to run a command.]

WeChat receives approval card:
┌──────────────────────────────┐
│ 【Pending Approval】Bash      │
│ Command: npm run build...    │
│ 📋 TaskID: approval_xxx      │
│ [Allow Once] [Default] [Deny]│
│ Details: View full command   │
└──────────────────────────────┘

[Tap "Allow Once" on phone, or open "View full command" to see complete output]

Claude continues execution and sends the result to WeChat.

You: I'm back

Claude: Exited WeChat mode.

Timeout Auto-Approval

Configure in the bot config file or via wecom-aibot.json:

{
  "autoApproveTimeout": 600
}
  • autoApproveTimeout: Timeout in seconds (default 600s = 10 minutes)
  • After timeout: operations within the project directory are auto-allowed; operations outside or delete commands are auto-denied

Troubleshooting

# Check if service is running
curl http://127.0.0.1:18963/health

# Channel unavailable ("Channels are not currently available")
# → Using API key or relay service? Switch to HTTP mode instead.

# Channel fails to reconnect after server restart
# → Auto-reconnect triggers within 5 seconds; no manual action needed.
#    Requires v2.4.13 or later.

# Approval detail page shows "Unauthorized"
# → Upgrade to v2.4.14 or later; the /approval/ path is now auth-exempt.

# Port conflict
lsof -i :18963 | grep LISTEN
kill <PID>

# Clean up stale ccId registrations after disconnect
npx @vrs-soft/wecom-aibot-mcp --clean-cache

MCP Tools

| Tool | Description | Key Parameters | |------|-------------|----------------| | send_message | Send message to WeChat | content, cc_id, target_user | | get_pending_messages | Get pending messages (long poll) | cc_id, timeout_ms | | enter_headless_mode | Enter WeChat mode | cc_id, robot_id, mode | | exit_headless_mode | Exit WeChat mode | cc_id | | check_connection | Check WebSocket connection status | - | | list_robots | List all configured bots | - | | get_connection_stats | Get connection stats and logs | recent_logs |

License

MIT · Enterprise WeChat Bot Docs · Channels Reference