Skip to main content
Glama
Omni IM Readonly MCP

Omni IM Readonly MCP

by Sereneoned
README.md
# Omni IM Readonly MCP (3-in-1 Personal Edition: WeChat + QQ + Feishu)

[简体中文](./README.zh-CN.md) | English

![Omni IM Readonly MCP Cover](./docs/cover.jpg)

A **100% personal-account, strictly read-only 3-in-1 MCP Server & Antigravity Plugin** unifying **WeChat 4.x + QQ (NTQQ) + Feishu (飞书)** behind **14 clean MCP tools**, with shared **PDF / DOCX / XLSX / PPTX / ZIP / code parsing**, **image resolution & WeChat V2/WXGF decoding**, **offline SenseVoiceSmall voice transcription**, and **Feishu Cloud Docs / Wiki Markdown reading**.

![3-in-1 Architecture](./docs/architecture.jpg)

Zero company IT administrator approval required. Evolved directly from [`wechat-readonly-mcp`](https://github.com/Sereneoned/wechat-readonly-mcp).

---

## Why 3-in-1 Instead of 3 Separate MCPs?

- **One cross-platform search**: *"Did someone send that requirement doc, error screenshot, or meeting decision in WeChat, QQ, or Feishu?"* -> `im_search_messages(keyword="...", platform="all", period="7d")`.
- **One shared multimodal & offline ASR pipeline**: Parses PDF/Word/Excel/PPT/ZIP/code and transcribes **WeChat SILK v3**, **QQ NTQQ `.amr` (`\x02#!SILK_V3`)**, and **Feishu audio** completely offline with `SenseVoiceSmall` (automatically reusing `~/.wechat-readonly-mcp/asr_models` if already installed).
- **Real cross-tenant Feishu personal access**: Powered by official `@larksuite/cli` (`lark-cli v1.0.100+`) user DPoP auth — verified to read personal DMs, **external groups**, **external 1-on-1 chats**, and **shared Feishu Cloud Docs / Sheets / Wikis** as clean Markdown without touching any enterprise admin console.
- **Strictly Read-Only by Construction**: Zero `send` / `reply` / `delete` / `create` tools; hardcoded read-only allowlists for OneBot 11 and `lark-cli`, plus `UNTRUSTED_IM_DATA` prompt-injection framing.

---

## Platform Matrix (Personal Edition)

| Platform | Primary Live Backend | Zero-Config Local Layer (Day 1) | Read Capabilities |
|---|---|---|---|
| **WeChat 4.x** | Built-in local read-only SQLCipher4 + media engine | Local DBs, received files, V2/WXGF images, SILK voice | Full chats, search, context, group members, received files, decoded images, offline ASR, favorites, official accounts, moments |
| **QQ (NTQQ)** | Local **NapCatQQ (OneBot 11 HTTP)** with strict 16-action `get_*` allowlist + offline JSON archive | Auto-scans `Documents/Tencent Files/<uin>/nt_qq/nt_data/{File,Pic,Ptt}` | Full live/archived chats, group members, group files, merged forwards, plus **zero-config local received files, images, and offline SILK `.amr` voice ASR** |
| **Feishu (飞书)** | Official **`lark-cli` (`@larksuite/cli`)** RO allowlist OR direct **OpenAPI `user_access_token`** (100% personal — zero org admin!) | Local Feishu/Lark download & Markdown export folders | Personal & external chats/groups, cross-group message search, group members, **Cloud Docs / Wiki (clean Markdown), Drive search**, files, images, audio |

---

## Quick Start

### 1. Install Dependencies & Antigravity Plugin

```bash
git clone https://github.com/Sereneoned/omni-im-readonly-mcp.git
cd omni-im-readonly-mcp
python scripts/install.py --with-deps --with-asr
```

### 2. Enable Personal Feishu (2 minutes, Zero Company Admin)

```bash
npm install -g @larksuite/cli@latest --allow-scripts=@larksuite/cli
lark-cli config init --new --lang zh_cn
lark-cli auth login --domain im,docs,drive,wiki
```

*(Alternatively, run `python scripts/auth_helper.py feishu --oauth --app-id cli_xxx --app-secret yyy` for direct personal read-only OAuth.)*

### 3. Optional: Live QQ Chat History (Local Files/Images/Voice Work Out of the Box!)

- Local QQ NT `nt_data/File`, `Pic`, and `Ptt` (`.amr` SILK v3 voice) work **immediately with zero config**.
- For live QQ chat text history & group files, start local NapCatQQ with OneBot 11 HTTP (`http://127.0.0.1:3000`) and run:
  ```bash
  python scripts/auth_helper.py qq --onebot-url http://127.0.0.1:3000 --onebot-token "<optional>"
  ```

### 4. Verify All 3 Platforms Live

```bash
python scripts/auth_helper.py status
python -m unittest discover -s tests -v
```

## License

MIT — see [LICENSE](./LICENSE) and [THIRD_PARTY_NOTICES.md](./THIRD_PARTY_NOTICES.md).