Zlatanwic/wechat-article-read-mcp
Free支持微信公众号内容提取,绕过微信反爬机制
FreeFree tier
About Zlatanwic/wechat-article-read-mcp
A Rust-based MCP (Model Context Protocol) server for reading WeChat official account (微信公众号) article content. It uses a headless Chrome browser to render WeChat article pages, extracts the title, author, publish time, and body text, and returns the data as structured JSON to AI clients such as Claude Desktop. The project is inspired by weixin-read-mcp and reimplemented in Rust to achieve faster startup, lower memory usage, type safety, and easier distribution as a single binary.
Key Features
Single binary distribution — no Python or virtual environment required
Implements the MCP (Model Context Protocol) via stdio JSON-RPC
Uses headless Chrome (Chrome DevTools Protocol) to render JavaScript-heavy wechat pages
CSS selector-based structured extraction of title, author, publish time, and full text
Bypasses WeChat's anti-scraping mechanisms that block standard web scraping
Fast cold startup (milliseconds) and low memory footprint due to Rust compilation
Pros & Cons
Pros
- Single binary — easier to distribute than Python-based alternatives
- Fast cold startup (compiled to native binary, no interpreter overhead)
- Lower memory usage due to Rust's lack of garbage collection
- Type-safe at compile time, reducing runtime errors
- Efficient HTML parsing and text processing
- Actively bypasses WeChat anti-scraping via browser rendering
Cons
- Requires Chrome or Chromium to be installed on the system
- Dependency on headless Chrome may be heavy for some environments
- Parsing may break if WeChat changes its page structure or anti-scraping measures
- Compilation requires Rust toolchain if building from source (though pre-built binaries are available)
Best For
Enabling LLMs (e.g., Claude Desktop, Gemini, Minimax) to read and understand WeChat official account articles that are otherwise inaccessible due to anti-scraping measuresExtracting structured content from WeChat articles for AI-powered summarization, analysis, or knowledge retrieval
FAQ
为什么 MCP 启动后无响应?
通常是因为 stdout 被日志污染。该项目的日志已配置输出到 stderr,请检查是否有其他 print 语句干扰了 JSON-RPC 通信。
find_element 超时怎么办?
可能是页面加载慢或 URL 不是有效的微信文章链接。请确认 URL 以 https://mp.weixin.qq.com/s/ 开头且可访问。
文章内容为空是什么原因?
可能是微信反爬虫机制导致的。建议降低请求频率或确认 headless Chrome 设置是否正确。
找不到 Chrome 怎么办?
请确认系统已安装 Chrome 或 Chromium,或设置 CHROME 环境变量指向可执行文件路径。