Skip to main content
Glama

📄 wecom-doc-mcp

Let AI read your Enterprise WeChat docs — in real time.

MCP Node TypeScript License

English · 中文


🤔 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_wecom_doc

Fetch a document by URL → return Markdown

🍪 set_wecom_cookie

Save cookie locally (chmod 600)

check_wecom_auth

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 install

Step 2 — Register with Claude Code

Add to ~/.mcp.json:

{
  "mcpServers": {
    "wecom-doc": {
      "command": "npx",
      "args": ["tsx", "/path/to/wecom-doc-mcp/src/index.ts"]
    }
  }
}
1. 🌐  Open doc.weixin.qq.com → log in
2. 🔧  F12 → Network tab
3. 📋  Click any request → copy the Cookie header value

Step 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?

Two modes, your choice:

Mode

How

When

💾 Persistent

set_wecom_cookie → saved to ~/.claude/wecom-doc-mcp/.env

Set once, use forever (until expiry)

⚡ Per-request

Pass cookie param to fetch_wecom_doc

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

/doc/

✅ Verified

📊 Spreadsheets

/sheet/

🔧 Untested

🎞️ Slides

/slide/

🔧 Untested

🧠 Mind Maps

/mind/

✅ Verified

🔀 Flowcharts

/flowchart/

🔧 Untested

📋 Smart Sheets

/smartsheet/

🔧 Untested

📦 Tech Stack

Dependency

Purpose

@modelcontextprotocol/sdk

MCP protocol implementation

cheerio

HTML parsing

turndown

HTML → Markdown conversion

tsx

TypeScript runtime

📄 License

MIT


A
license - permissive license
-
quality - not tested
C
maintenance

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

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