wecom-doc-mcp

wecom-doc-mcp

Allows AI assistants to fetch and read Enterprise WeChat documents in real time using cookie authentication and HTML-to-Markdown conversion.

Category
Visit Server

README

<div align="center">

๐Ÿ“„ wecom-doc-mcp

Let AI read your Enterprise WeChat docs โ€” in real time.

MCP Node TypeScript License

<br/>

<p> <img src="https://img.shields.io/badge/ไผไธšๅพฎไฟก-ๆ–‡ๆกฃ-07C160?style=flat-square&logo=wechat&logoColor=white" /> <img src="https://img.shields.io/badge/Claude_Code-Ready-D97706?style=flat-square" /> <img src="https://img.shields.io/badge/Cookie-Auth-red?style=flat-square&logo=cookiecutter&logoColor=white" /> </p>

English ยท ไธญๆ–‡

</div>


๐Ÿค” 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"]
    }
  }
}

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

๐Ÿ” Cookie Auth

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


<div align="center"> <sub>Built with โค๏ธ for teams drowning in enterprise docs</sub> </div>

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured