wecom-doc-mcp
๐ 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 โ
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโ๐ ๏ธ 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
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Tiansiyu-tj/wecom-doc-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server