wecom-doc-mcp
Provides tools to fetch and convert Enterprise WeChat documents to Markdown, with cookie-based authentication for SSO-protected documents.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@wecom-doc-mcp 帮我读取这个企业微信文档:https://doc.weixin.qq.com/doc/w3_xxx"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
📄 wecom-doc-mcp
Let AI read your Enterprise WeChat docs — in real time.
🤔 Why
Enterprise WeChat documents sit behind SSO. AI assistants can't access them.
This MCP server bridges the gap: provide your browser cookie once, and the server handles authenticated fetching + HTML-to-Markdown conversion on every request.
💬 "帮我看下这个文档: https://doc.weixin.qq.com/doc/w3_xxx"
│
▼
┌─────────────┐ 🍪 ┌──────────────┐ 📝 ┌──────────┐
│ Claude Code │ ──Cookie──▶ │ MCP Server │ ──HTML──▶ │ Markdown │
└─────────────┘ └──────────────┘ └──────────┘Related MCP server: feishu-reader
🛠️ Tools
Tool | Description |
📖 | Fetch a document by URL → return Markdown |
🍪 | Save cookie locally ( |
✅ | Verify if saved cookie is still valid |
🚀 Quick Start
Step 1 — Install
git clone https://github.com/Tiansiyu-tj/wecom-doc-mcp.git
cd wecom-doc-mcp
npm installStep 2 — Register with Claude Code
Add to ~/.mcp.json:
{
"mcpServers": {
"wecom-doc": {
"command": "npx",
"args": ["tsx", "/path/to/wecom-doc-mcp/src/index.ts"]
}
}
}Step 3 — Get Your Cookie 🍪
1. 🌐 Open doc.weixin.qq.com → log in
2. 🔧 F12 → Network tab
3. 📋 Click any request → copy the Cookie header valueStep 4 — Use It
You: 帮我设置企业微信 Cookie: <paste>
Claude: ✅ Cookie 已保存
You: 帮我看下这个文档: https://doc.weixin.qq.com/doc/w3_xxx
Claude: # 文档标题
这是文档的内容...📐 Architecture
wecom-doc-mcp
┌─────────────────────┐
│ │
fetch_wecom_doc ──┤ 📡 /dop-api/opendoc│
│ │ Call WeChat's │
│ │ internal API for │──── 📝 Markdown
│ │ document JSON data │
│ │ │
│ │ 🧹 cleanDocText │
│ │ Strip HYPERLINK │
│ │ markup → clean text │
│ │ │
│ │ 📄 Fallback: │
│ │ cheerio + turndown │
│ └─────────────────────┘
│
set_wecom_cookie ─── 💾 ~/.claude/wecom-doc-mcp/.env (mode 600)
│
check_wecom_auth ─── 🏥 GET doc.weixin.qq.com → 200?🔐 Cookie Auth
Two modes, your choice:
Mode | How | When |
💾 Persistent |
| Set once, use forever (until expiry) |
⚡ Per-request | Pass | Override on the fly |
🔒 Cookie file lives outside the project directory — never committed, never shared,
chmod 600.
📑 Supported Document Types
Type | URL Pattern | Status |
📝 Documents |
| ✅ Verified |
📊 Spreadsheets |
| 🔧 Untested |
🎞️ Slides |
| 🔧 Untested |
🧠 Mind Maps |
| ✅ Verified |
🔀 Flowcharts |
| 🔧 Untested |
📋 Smart Sheets |
| 🔧 Untested |
📦 Tech Stack
Dependency | Purpose |
| MCP protocol implementation |
| HTML parsing |
| HTML → Markdown conversion |
| TypeScript runtime |
📄 License
MIT
Available Tools
3 toolscheck_wecom_authA
检查当前保存的 Cookie 是否仍然有效
Inputs: no named parameters.
fetch_wecom_docA
抓取企业微信文档内容并转为 Markdown。支持文档、表格、幻灯片等类型。
Inputs: url (required), cookie.
set_wecom_cookieA
保存企业微信 Cookie 到本地配置文件,后续请求自动使用。Cookie 获取:浏览器登录 doc.weixin.qq.com → F12 → Network → 复制 Cookie 头。
Inputs: cookie (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool has a distinct purpose: fetching document content, saving authentication credentials, and verifying authentication validity. No overlap or ambiguity between them.
All tool names follow a consistent verb_noun pattern using snake_case: fetch_wecom_doc, set_wecom_cookie, check_wecom_auth.
With 3 tools, the server is well-scoped for its purpose of fetching WeCom documents with authentication management. Each tool earns its place.
The set covers authentication setup, validation, and document fetching. A minor gap is the lack of a tool to list or search documents, but the core workflow is complete for fetching known documents.
Maintenance
Related MCP Connectors
Share HTML/Markdown documents via URL instantly. Create, edit, delete docs from any AI tool.
Turn any web page into clean Markdown for your AI assistant. OAuth sign-in, no API key.
Read authorized public pages as Markdown or HTML metadata. Operated by an autonomous AI agent.
Read any web page as clean Markdown for AI agents: fetch, search, metadata, links. SSRF-safe.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables reading and extracting content from WeChat public account articles using browser automation, allowing AI models to analyze and summarize WeChat articles through natural language requests.463MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI tools to extract Feishu documents (Docx/Wiki) via Feishu Open API and convert them to Markdown format with local image downloading and authentication.1-
- FlicenseNot gradedqualityDmaintenanceProvides retrieval of WeChat Work and Feishu developer documentation, enabling AI assistants to query API references without switching browsers.20 npm19-
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage Yuque (语雀) documents via MCP protocol, with cookie-based login that does not require a super membership.17 npm4MIT