wecom-doc-mcp
Provides tools to fetch and convert Enterprise WeChat documents to Markdown, with cookie-based authentication for SSO-protected documents.
Click on "Install 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 是否仍然有效
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, so the description must disclose behavioral traits. It only states the purpose without clarifying what happens if the cookie is invalid, whether the operation is read-only, or any side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, concise sentence with no extraneous information. It is appropriately front-loaded for quick comprehension.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given zero parameters, no output schema, and simple purpose, the description is adequate but incomplete. It does not describe the return value or behavior on failure, leaving the agent uncertain about the tool's output.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
No parameters defined, so schema coverage is 100%. Per guidelines, 0 params yields a baseline of 4. The description does not need to add parameter details.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool checks whether the saved Cookie is still valid, using a specific verb and resource. It is distinct from siblings (fetch_wecom_doc, set_wecom_cookie) which handle document fetching and cookie setting.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The context suggests this tool is for verifying authentication before using sibling tools, but no explicit when-to-use or when-not-to-use guidance is provided. The sibling names imply usage order.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
fetch_wecom_docA
抓取企业微信文档内容并转为 Markdown。支持文档、表格、幻灯片等类型。
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | 企业微信文档链接,如 https://doc.weixin.qq.com/doc/xxx | |
| cookie | No | 可选,临时 Cookie。不传则使用已保存的 Cookie |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description bears full responsibility for behavioral disclosure. It explains the core conversion action and notes supported file types, but fails to mention error handling, rate limits, authentication requirements beyond an optional cookie, or any side effects. The description is adequate but not comprehensive.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise—a single sentence in Chinese—that immediately conveys the core action (fetch and convert) and scope (document types). It is front-loaded and contains no filler. Every word carries meaning.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the presence of sibling auth tools and no output schema, the description lacks crucial context. It does not explain prerequisites (e.g., need for prior authentication via set_wecom_cookie), what happens if cookie is invalid, or the format of the returned Markdown. For a tool with two parameters and moderate complexity, this is insufficiently complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with clear descriptions for both parameters: URL example and cookie explanation. The tool description adds general capability info but not parameter-specific details. Since the schema already covers parameter meanings, baseline 3 is appropriate; the description does not significantly enhance parameter understanding beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: fetching WeCom document content and converting to Markdown, supporting various types like docs, tables, and slides. The name fetch_wecom_doc aligns perfectly, and siblings set_wecom_cookie and check_wecom_auth are distinct auth-related tools, making differentiation easy.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for converting WeCom documents to Markdown but does not explicitly state when to use this tool versus alternatives or prerequisites. It mentions optional cookie but does not clarify if prior cookie setting (via sibling tool) is needed for successful fetch. No exclusions or conditions provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
set_wecom_cookieA
保存企业微信 Cookie 到本地配置文件,后续请求自动使用。Cookie 获取:浏览器登录 doc.weixin.qq.com → F12 → Network → 复制 Cookie 头。
| Name | Required | Description | Default |
|---|---|---|---|
| cookie | Yes | 完整的 Cookie 字符串 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, but the description discloses key behavioral traits: the cookie is saved to a local configuration file and automatically used for subsequent requests. This is sufficient for a simple setter tool, though it does not mention error handling or validation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise with two sentences, each providing essential information: the action and the acquisition method. No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has only one parameter and no output schema, the description is sufficiently complete. It explains the purpose, how to get the input, and the effect, though it could mention what happens if the cookie is invalid.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema covers 100% of parameters with a basic description for 'cookie'. The tool description adds value by explaining how to obtain the cookie value (browser steps), which is crucial semantic context beyond the schema's '完整的 Cookie 字符串'.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description explicitly states the action ('保存', save) and resource ('企业微信 Cookie 到本地配置文件'), and distinguishes it from siblings by specifying that the cookie will be automatically used in subsequent requests, differentiating from fetch_wecom_doc and check_wecom_auth.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides a clear method for obtaining the cookie (from browser), implying that this tool is a prerequisite for siblings. However, it does not explicitly state when to use or when not to use alternatives, though the context strongly implies usage before fetch_wecom_doc or check_wecom_auth.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
3 tool updates
v1.0.0- First observed
check_wecom_auth - First observed
fetch_wecom_doc - First observed
set_wecom_cookie
TDQS
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
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Share HTML/Markdown documents via URL instantly. Create, edit, delete docs from any AI tool.
Read any web page as clean Markdown for AI agents: fetch, search, metadata, links. SSRF-safe.
Persistent docs and memory for AI agents — read, write, organize & search a shared workspace.
Read a URL as clean markdown, screenshot a website, url to PDF. Web access for agents, no signup.
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.447MIT
- 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 gradedqualityCmaintenanceProvides retrieval of WeChat Work and Feishu developer documentation, enabling AI assistants to query API references without switching browsers.1819-
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to manage Yuque (语雀) documents via MCP protocol, with cookie-based login that does not require a super membership.131MIT
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