wechat-mcp
Enables reading WeChat Official Account articles by URL, returning structured Markdown with title, author, publish time, optional cover image, and article body. Supports single-article and batch retrieval (up to 10 URLs) with caching.
Click on "Deploy 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., "@wechat-mcp Summarize this WeChat article: https://mp.weixin.qq.com/s/abc123"
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.
wechat-mcp
Read WeChat Official Account articles directly in Claude Code / Cursor / Windsurf. One config line. Zero API keys. Works in every MCP-compatible client.
中文
这是什么?
wechat-mcp 是一个 Model Context Protocol (MCP) server,让任意 MCP 兼容的 AI 客户端(Claude Code、Claude Desktop、Cursor、Windsurf、Cline 等)直接读取微信公众号文章。
为什么需要它?微信公众号的 robots.txt 禁止了自动化访问,fetch_web、curl 默认情况下都拿不到 mp.weixin.qq.com 下的文章正文。wechat-mcp 绕过这个限制,把文章转成结构化 Markdown 直接喂给你的 AI。
✨ 5 秒演示
把下面这段贴进 Claude Code:
帮我总结一下这篇文章:https://mp.weixin.qq.com/s/xxxxxxxxxxxxxClaude Code 自动调用 read_wechat_article 工具 → 返回标题、作者、正文 → 总结给你。
🚀 安装
Claude Desktop
~/Library/Application Support/Claude/claude_desktop_config.json(macOS)
或 %APPDATA%\Claude\claude_desktop_config.json(Windows):
{
"mcpServers": {
"wechat": {
"command": "npx",
"args": ["-y", "wechat-mcp"]
}
}
}重启 Claude Desktop。搞定。
Cursor
~/.cursor/mcp.json:
{
"mcpServers": {
"wechat": {
"command": "npx",
"args": ["-y", "wechat-mcp"]
}
}
}Claude Code (CLI)
~/.claude.json 或项目内 .claude/settings.json:
{
"mcpServers": {
"wechat": {
"command": "npx",
"args": ["-y", "wechat-mcp"]
}
}
}🛠 工具
read_wechat_article
读取一篇微信文章并返回 Markdown。
输入:
url(string, 必填) — mp.weixin.qq.com 域名的微信文章 URLinclude_images(boolean, 默认 true) — 是否包含内联图片max_length(number, 默认 20000) — 返回内容的最大字符数
输出: 标题 / 作者 / 发布时间 / 封面图(可选)/ Markdown 正文
read_multiple_wechat_articles
批量读取最多 10 篇文章。
输入:
urls(string[], 必填, 1-10 项) — URL 列表
🔍 它怎么绕过 robots.txt?
微信公众号对 fetch/curl 默认 UA 返回降级 HTML,且 robots.txt 声明禁爬。wechat-mcp 通过模拟桌面 Chrome UA 直接发 HTTP 请求拿原始 HTML,再用两套解析器兜底:
标准路径:从
js_contentdiv 提取正文 + 处理内嵌图片新版文章路径:从 JS 变量
cgiDataNew.content_noencode解码(处理 type 9 / 10002 文章)
两套都拿不到时返回结构化错误(404、需关注公众号、登录墙)。
💾 缓存
默认 30 分钟 TTL,进程内最多缓存 200 篇文章。同 URL 重复调用直接命中缓存,不会反复打微信服务器。
🧩 兼容性
Node.js ≥ 18
MCP SDK ≥ 1.0
Claude Code / Claude Desktop / Cursor / Windsurf / Cline / 任意 stdio MCP 客户端
🚧 边界与限制
不支持需要登录/付费的会员文章
不支持视频号内容(仅图文文章)
不支持已被删除/违规下架的文章
高频调用建议加你自己的节流层
🗺 路线图
知乎文章 Provider(同样的"读不到"痛点)
CSDN / 掘金 Provider
微信公众号 RSS 监控模式(定时拉取更新)
多账号 cookie 池(突破登录墙)
🤝 贡献
欢迎 PR!思路:
新增 Provider:在
src/providers/下实现fetch(url) => Markdown接口新增 MCP 工具:在
server.ts注册 + 在 README 文档化修复微信页面结构变化:跑一下
pnpm test,附上原文链接
📜 License
MIT © 2026 lfc1402046
Related MCP server: readgzh
English
wechat-mcp is a Model Context Protocol server that lets any MCP-compatible AI client (Claude Code, Claude Desktop, Cursor, Windsurf, Cline, …) read WeChat Official Account articles directly.
Why? WeChat's robots.txt blocks automated access, and fetch/curl cannot reach mp.weixin.qq.com by default. wechat-mcp bypasses this and returns the article as clean Markdown.
Install
Add this to your MCP client config:
{
"mcpServers": {
"wechat": {
"command": "npx",
"args": ["-y", "wechat-mcp"]
}
}
}That's it. Restart the client and ask your AI to read any mp.weixin.qq.com URL.
Tools
read_wechat_article— read one article, return Markdownread_multiple_wechat_articles— batch up to 10 URLs
License
MIT
Available Tools
2 toolsread_multiple_wechat_articlesA
Read up to 10 WeChat articles at once and return each as Markdown. Use when the user provides a batch of URLs (e.g. from a list they want summarized).
Inputs: urls (required).
read_wechat_articleA
Read a WeChat Official Account (mp.weixin.qq.com) article and return its title, author and Markdown body. Use this whenever the user shares a mp.weixin.qq.com URL or asks you to summarize/read a WeChat article. Returns up to 20,000 chars by default.
Inputs: url (required), max_length, include_images.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The tools are clearly differentiated based on the input scale: one handles a single item, and the other handles a list of items. There is no ambiguity for an agent deciding which function to call based on the user's request format.
The naming convention is highly consistent, using the verb 'read' as the core action for both tools. The snake_case format and structural similarity make the set very easy to read and predict.
With only two tools, the set is appropriately scoped for its singular focus on article consumption. While minimal, having separate tools for single versus batch operations is a sensible division for this specific domain.
The tools cover the core 'read' lifecycle for individual and group articles. However, the surface lacks upstream functionality like searching by keyword or listing all available articles, which would make the set more robust.
Related MCP Connectors
Read WeChat public account articles via MCP. 99.89% anti-scraping success, 50-87% token compression.
Jina AI Reader/Search MCP — turn any URL into clean LLM-ready markdown, plus web search.
Convert files, URLs, and documents to clean, AI-ready Markdown via MCP.
Parse short-video share links into watermark-free direct URLs via MCP for AI assistants.
Related MCP Servers
- AlicenseAqualityDmaintenanceRead WeChat (微信) Official Account articles with native multimodal output — body, images, and video keyframes returned as MCP content blocks. Handles all three embed types: Tencent Video, WeChat-native, and Channels (视频号 metadata via public API).113MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI to read full-text WeChat Official Account articles, returning title, author, publish time, and clean Markdown content.9AGPL 3.0
- AlicenseNot gradedqualityBmaintenanceEnables fetching WeChat public account articles, caching them in SQLite, and reading them as paginated Markdown via MCP, with optional DeepSeek summarization and HTML/Markdown export.MIT
- AlicenseAqualityCmaintenanceEnables agents to retrieve public WeChat Official Account articles as clean Markdown or JSON and parse saved WeChat HTML through MCP tools.22MIT