wecom-doc-mcp
Allows AI assistants to access and read Enterprise WeChat documents in real time. It supports fetching documents by URL, converting them to Markdown, saving a browser cookie locally for authenticated requests, and checking whether the saved cookie is still valid. It can handle Enterprise WeChat documents, spreadsheets, smart sheets, and mind maps.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
๐ 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: wecom-docs-mcp-server
๐ ๏ธ 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/SIE-Operations-and-Maintenance-Team/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 โโโ ๐ฅ /dop-api/opendoc โ clientVars.isLogin?๐ 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 |
| โ Verified |
๐๏ธ Slides |
| ๐ง No dedicated parser |
๐ง Mind Maps |
| โ Verified |
๐ Flowcharts |
| ๐ง No dedicated parser |
๐ Smart Sheets |
| โ Verified |
โ Verified: exercised against real documents. Spreadsheets (4 worksheet tabs), smart sheets (15 worksheets / 2103 rows) and documents (2 files) were verified in this round; mind maps were verified by the original author (this round only added rendering unit tests, the fetching logic is unchanged).
๐งช Implemented, needs a sample: code path implemented and covered by synthetic cases, but no real document of this type was available; a payload mismatch raises a clear error.
๐ง No dedicated parser: the payload shape is unknown, so the tool falls back to extracting the page HTML, strips toolbar/menu nodes, and labels the result as page text.
Spreadsheets (src/sheet.ts): cells are not part of the document-text payload but live in
collab_client_vars.initialAttributedText.text[0].related_sheet as
base64 + zlib + protobuf, rendered as one Markdown table per worksheet.
tab=<sheetId>in the URL selects the worksheet (forwarded to the API); otherwise the default tab is read;at most 100 data rows per call by default, with an explicit note of how many were omitted; use
rowStart/rowEnd(1-based, header excluded) โ non-numeric or out-of-range values are reported;rows above the header (template title, dropdown option definitions) are listed separately;
date cells hold Excel serial numbers (e.g.
46303= 2026-10-08).
Smart Sheets (src/smartsheet.ts): a different payload โ plain JSON in text[0].workbook
(sheets, dashboards, forms) and text[0].smartsheet.
Column names carry their type (e.g.
็ถๆ(ๅ้),ๅผๅงๆถ้ด(ๆฅๆ)); single-select/person columns resolve to option names; dates are converted from millisecond timestamps to local dates; number/formula columns show the computed result; unsupported shapes are marked[ๆช่งฃๆ็็ฑปๅN];one request returns a single worksheet โ other worksheets need
tab=<sheetId>in the link, otherwise the tool fails with an explicit message;row order follows the view definition (matching the UI); form-backed worksheets fall back to the payload's own order; skipped empty rows are reported.
Re-runnable checks (scripts kept in a local temp directory, not committed): verify-sheet.ts,
verify-fixes.ts, verify-varint.ts, verify-smartsheet.ts (real responses), verify-mind.ts,
and verify-e2e.ts (needs a live cookie; covers worksheets, real documents, real smart sheets,
parameter validation, error messages, and cookie leak prevention โ copy it into the project root
and run npx tsx verify-e2e.ts).
๐ฆ Tech Stack
Dependency | Purpose |
| MCP protocol implementation |
| HTML parsing |
| HTML โ Markdown conversion |
| TypeScript runtime |
๐ License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
This server cannot be deployed
Maintenance
Related MCP Connectors
Agent document workspace with wallet auth. Create, update and share markdown docs. By AutEng.ai
Markdown workspace for AI agents: read, write, organize, and share markdown documents.
Convert PDFs, Office docs, websites and audio into AI-ready Markdown, then search and ask your docs.
Share HTML/Markdown documents via URL instantly. Create, edit, delete docs from any AI tool.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables access to Yuque (่ฏญ้) documentation through cookie-based authentication, supporting document retrieval, search, TOC navigation, and content management from knowledge bases via URL or namespace.4675 npm4MIT
- AlicenseAqualityFmaintenanceWeCom (Enterprise WeChat) document operations via MCP โ create, read, and edit Docs and Smartsheets. 9 tools. Fills the doc-CRUD gap: existing WeCom MCP servers only support webhook messaging97MIT
- 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-
- AlicenseAqualityDmaintenanceAllows AI assistants to fetch and read Enterprise WeChat documents in real time using cookie authentication and HTML-to-Markdown conversion.3MIT