Purpose
weixin-articles-mcp is an MCP (Model Context Protocol) server used to let LLMs read WeChat official account articles. Its core value lies in native multimodal output: images and video keyframes are returned directly as content blocks, rather than returning a list of image URLs. This way, the LLM can "see" the image content in the same conversation turn without additional clicks or redirects, saving round trips and context overhead.
Main Capabilities
- Reliable WeChat scraping: Uses pure Python httpx GET requests, with no need for Rust binaries or a headless browser.
- Native image content: PNG/JPG are returned as MCP Image blocks, GIFs are filtered out, and each article returns at most 10 images.
- Video processing, covering three embedding types:
- WeChat official account native videos (
<iframe data-mpvid="wxv_*">): Extract the mp4 from inline JS, and evenly extract 8 keyframes via ffmpeg. - Tencent Video (v.qq.com iframe): Use yt-dlp + ffmpeg to extract keyframes.
- WeChat Channels (
<mp-common-videosnap>): Obtain complete metadata (duration, dimensions, HD cover, full description, like count, publisher verification) and cover image via the public batch_get_video_snap API. The video mp4 stream is protected by the WeChat finder protocol and is not supported (see below for details).
- WeChat official account native videos (
- Publish time recovery: Extract the
var ctUnix timestamp that other parsers often miss. - Minimal installation: pip install; ffmpeg is optional for video processing; no Chromium, no Rust.
Usage
Add the same JSON configuration to the MCP server configuration of an MCP client such as Claude Desktop / Claude Code. After configuration is complete, simply paste a WeChat article URL in the conversation, for example:
Read https://mp.weixin.qq.com/s/cexkyzQBRDG3uIF6g5cEbQ
The LLM will receive: article metadata (title, official account, publish time, cover URL), the complete body text in Markdown format, native image content blocks for all inline PNG/JPG images, and 8 keyframe images for each video.
Tool interface:
read_article(url: str) -> list[content_block]
Returns a list of MCP content blocks:
[0]— Text block: metadata + article body Markdown.[1..N]— Image blocks: article images (at most 10, GIFs filtered out).- For each video (at most 3):
- WeChat official account native or Tencent Video: one text marker + 8 keyframe image blocks.
- WeChat Channels: one text marker (including duration, dimensions, like count, publisher, description) + 1 HD cover image block.
On failure, returns a single text block starting with Error: .
Suitable Scenarios
- Let LLMs read, summarize, and analyze WeChat official account articles, including body image content.
- Multimodal tasks that need to directly see images in context (rather than following links).
- Keyframe-level understanding and summarization of videos embedded in articles.
- Processing official account content for personal or research purposes.
Limitations
- Public articles only: Only reads publicly accessible article URLs, and does not bypass any authentication or anti-scraping measures.
- Request frequency: The default request interval is at least 1 second, and can be configured via the environment variable
WEIXIN_FETCH_INTERVAL_S=2.0(or higher) further tightened to prevent being used as a high-frequency scraper. - WeChat Channels has no mp4: WeChat Channels videos in articles do not expose a downloadable mp4 stream to the public network. Their mp4 resides within the WeChat finder protocol, requiring a logged-in WeChat client session, finder-specific encryption (the first 128KB of the mp4 is XOR-encrypted with a fixed key), and interception of the WeChat PC client stream at the network layer. Open-source solutions (such as wx_channels_download, wechatVideoDownload, etc.) achieve this through a MITM HTTPS proxy + WeChat PC client + root certificate installation, which is fundamentally incompatible with how an MCP server runs (no client, no user interaction, no administrator installation). As an alternative, this tool calls WeChat's public batch_get_video_snap API (no cookie or session required), returning the HD cover, full description, duration, dimensions, like count, and publisher verification. If an mp4 file is genuinely needed (archiving, transcoding, frame-by-frame inspection), it can be paired with wx_channels_download: first have the LLM read the article through this MCP to learn which WeChat Channels videos are embedded along with their durations, descriptions, and covers; then decide whether to obtain the original mp4; if so, open the article in the WeChat PC client running wx_channels_download and play it, then click the download button it injects.
- Features not yet supported (listed in the roadmap): enhanced anti-scraping handling, ASR subtitles (faster-whisper, for native and Tencent Video), full-text search of read articles, and Official Account subscription/new article notifications.
- Contribution directions: PRs are welcome, especially for WeChat Channels URL handling, compatibility with uncommon publisher template variants, and more test fixtures (different article styles). Issue feedback:https://github.com/jj-cheng25/weixin-articles-mcp/issues
Disclaimer
This tool is for personal, educational, and research use only. It does only the following: reads publicly accessible WeChat article URLs using a standard browser User-Agent (mp.weixin.qq.com/s/...); calls only WeChat public API endpoints that accept empty authentication fields (i.e., those WeChat designed to be accessible without login); enforces a minimum 1-second request interval by default to prevent being repurposed as a high-frequency scraper. It does not do the following: use cookies, login sessions, or any user credentials; bypass any technical protection, anti-scraping measure, or encrypted stream (for example, WeChat Channels mp4 is intentionally not supported); decrypt, reverse engineer, or circumvent WeChat's protocol-level protections; store, cache, or redistribute scraped content beyond the immediate response. Users must comply with WeChat's Terms of Service themselves, respect content copyright, and not flood mp.weixin.qq.com. The author and contributors assume no responsibility for misuse.
License
MIT — see LICENSE for details.