wechat-mp-mcp
Allows crawling WeChat Official Account articles via the subscription-account search interface, including account search, article listing, incremental crawling, and fetching article content as Markdown.
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., "@wechat-mp-mcpsearch WeChat account for AI news"
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-mp-mcp
A Model Context Protocol (MCP) server for crawling WeChat Official Account
articles via the mp.weixin.qq.com subscription-account search interface.
Works with any MCP-compatible client (Claude Code, Claude Desktop, Cline, Continue, Cursor, etc.).
What it does
Given a WeChat Official Account name, this server can:
search for the account and resolve its internal
fakeidpull the article list (full history on first crawl, incremental afterwards)
fetch a single article and convert its body to Markdown
store everything in a local SQLite database (deduped by URL)
Requirements
Python 3.10+
A personal WeChat subscription account (订阅号). You log in once via QR code at https://mp.weixin.qq.com/, then this server reuses your login session to call the public-account search interface.
Note: the subscription-account search interface has a daily quota (roughly ~200 calls/day per account). A first-time full crawl of a large public account may need to be spread across multiple days. Incremental crawls cost very few calls.
Install
cd ~/Documents/code/wechat-mp-mcp
python3 -m venv .venv
source .venv/bin/activate
pip install -e .Step 1 — Log in (one-time, repeat when session expires)
wechat-mp-mcp-loginThe script will:
open
https://mp.weixin.qq.com/in your browserask you to paste the dashboard URL after login (it extracts
tokenfrom it)ask you to paste the
Cookie:header value (copy from DevTools → Network)
Credentials are saved to ~/.config/wechat-mp-mcp/auth.json (chmod 600).
Sessions typically last 1–2 hours. When the server returns
"session expired", just re-run wechat-mp-mcp-login.
Step 2 — Run the MCP server
wechat-mp-mcpIt speaks MCP over stdio. You won't normally run it by hand — your MCP client launches it.
Step 3 — Wire it into an MCP client
Generic config (works for Claude Desktop, Cline, Continue, etc.):
{
"mcpServers": {
"wechat-mp": {
"command": "/Users/YOUR_USER/Documents/code/wechat-mp-mcp/.venv/bin/wechat-mp-mcp"
}
}
}For Claude Code (CLI):
claude mcp add wechat-mp /Users/YOUR_USER/Documents/code/wechat-mp-mcp/.venv/bin/wechat-mp-mcpTools exposed
Tool | Purpose |
| Resolve account name → |
| Pull one page of metadata; use for full-history crawl |
| Pull only articles newer than what is stored |
| Fetch + parse one article body to Markdown |
| Query the local store |
Typical workflow
Find the account: ask the LLM "search WeChat account 'XX'". It calls
search_account→ you confirm the rightfakeid.First-time full crawl: ask "crawl all history". The LLM walks
list_articles_pagewithbegin=0, 5, 10, ...until empty. Stop and resume any time — pagination state lives in the DB.Daily incremental: schedule a prompt "pull new posts from 'XX'" — the LLM calls
crawl_incremental(cheap, a few API calls).Read a post: "fetch and summarize <mp.weixin.qq.com/s/...>" — the LLM calls
fetch_article.
Storage
SQLite at ~/.config/wechat-mp-mcp/wechat.db by default. Override with
WECHAT_MP_MCP_DB=/path/to/file.db.
Schema: account(fakeid PK, nickname, ...), article(link PK, fakeid, title,
update_time, body_markdown, ...). Inspect with any SQLite client.
Caveats
The subscription-account search interface is undocumented. The Weixin team can change it at any time; expect to re-tune the request shape occasionally.
Read counts / likes / "看一看" are not available through this path. Those require intercepting the WeChat App's traffic (out of scope).
Be polite: keep
delay_seconds≥ 1.0 between requests, or you'll get rate-limited for 24 hours.
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
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/fdslk/WECHAT-MP-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server