Content
# Tool List
Directly communicate with Claude Code in QQ. Send and receive messages through the official QQ robot API, supporting image recognition, file processing, and rich media replies.
This project references: [OpenClaw QQBot](https://github.com/tencent-connect/openclaw-qqbot). The initial version has limited functionality, and PR submissions are welcome.
<img width="1592" height="732" alt="image" src="https://github.com/user-attachments/assets/a2a17800-a662-4c5f-a7ee-b5aa6e417d7d" />
## Prerequisites
- [Bun](https://bun.sh) >= 1.0
- [Claude Code](https://claude.ai/code) CLI >= 2.1.87
- A robot account applied for on the [QQ Open Platform](https://q.qq.com) (obtain AppID and AppSecret, and it is recommended to use the **special entry for lobsters** to apply for the robot)
## Installation
Clone the repository to your local machine, **using ~/qqbot-channel as an example**:
```bash
git clone https://github.com/ZhongtaoWang/qqbot-claude-channel.git ~/qqbot-channel
cd ~/qqbot-channel
bun install
```
## Configuration
Run once, and credentials will be written to `~/.claude.json`, taking effect for all projects:
```bash
claude mcp add qqbot \
--scope user \
--env QQ_APPID=Your AppID \
--env QQ_APP_SECRET=Your AppSecret \
-- bun ~/qqbot-channel/qqbot.ts
```
After completion, there is no need to place a configuration file in any working directory, and qqbot will automatically load in all Claude Code sessions.
> If you need a whitelist or sandbox mode, append `--env QQ_ALLOWED_USERS=openid1,openid2` / `--env QQ_SANDBOX=true`.
## Launch
Run in **any directory**:
```bash
claude --dangerously-load-development-channels server:qqbot
```
Send a message to the robot in QQ to start a conversation.
## Usage Scenarios
This is a **remote control channel for Claude Code**. Typical usage:
- **Remote task execution**: Send instructions to the robot on QQ, and Claude will help you write code, modify files, and run scripts on the server.
- **Image analysis**: Send a screenshot or photo, and Claude will directly reply with the analysis result after multimodal recognition.
- **Voice interaction** (TODO): Send a voice message, automatically convert it to text, and then process it with Claude.
- **File processing**: Send PDF, DOCX, code files, and Claude will read the content and reply.
- **Tool permission approval**: When Claude needs to perform sensitive operations (such as deleting files), it will ask you through QQ messages:
- Reply `yes {id}` to allow this execution.
- Reply `no {id}` to reject.
- Reply `always {id}` to always allow the tool (valid within this session).
## Environment Variables
| Variable | Required | Description |
| --- | --- | --- |
| `QQ_APPID` | Yes | QQ robot AppID |
| `QQ_APP_SECRET` | Yes | QQ robot AppSecret |
| `QQ_ALLOWED_USERS` | No | User openid whitelist, comma-separated, empty allows all |
| `QQ_SANDBOX` | No | `"true"` uses sandbox API, default `"false"` |
| `WHISPER_MODEL` | No | (TODO) Voice recognition model (tiny/base/small/medium/large), default `base` |
| `WHISPER_LANG` | No | (TODO) Recognition language, default `zh` |
| `STT_API_URL` | No | (TODO) External STT API address (priority over local Whisper) |
| `STT_API_KEY` | No | (TODO) External STT API key |
## Uninstallation
```bash
# Remove MCP registration
claude mcp remove qqbot --scope user
# Delete project code
rm -rf ~/qqbot-channel
```
## License
MIT