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)
Built-in safeguards: daily quota cap (default 150), jittered delays, randomized page sizes, work-hours gate.
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.
Why a subscription account? The search interface is normally used by account operators when writing articles ("insert link → from another account"). This server reuses that flow. The account is only used as a login key — you don't need to publish anything from it. Register one at https://mp.weixin.qq.com/ (free, ~15 minutes, ID verification required).
Personal WeChat is NOT touched. Your chat history, payments, and friends are completely unrelated to this — only your subscription-account backend session is used.
Install
git clone https://github.com/fdslk/WECHAT-MP-MCP.git wechat-mp-mcp
cd wechat-mp-mcp
./install.shinstall.sh is idempotent. It will:
check Python 3.10+
create
.venvand install all deps (including Playwright Chromium ~92 MB)prompt you to scan a QR code to log in (Chromium opens automatically)
prompt to register with Claude Code if the
claudeCLI is on your PATH
Rerun it anytime — it skips steps that are already done.
Manual install (if you don't want install.sh)
python3 -m venv .venv
.venv/bin/pip install -e '.[login-auto]' # drop [login-auto] to skip Playwright
.venv/bin/playwright install chromium # ~92 MB one-time
.venv/bin/wechat-mp-mcp-login-auto # opens browser for QR scan
claude mcp add wechat-mp --scope user $(pwd)/.venv/bin/wechat-mp-mcpLogin
install.sh runs login for you. If you skipped it, or your session
expired (typical lifetime 1-2h), re-run:
.venv/bin/wechat-mp-mcp-login-auto # automated: Chromium + QR scan
# or
.venv/bin/wechat-mp-mcp-login # manual: paste URL + Cookie from DevToolsCredentials are saved to ~/.config/wechat-mp-mcp/auth.json (chmod 600).
Wire into other MCP clients
For Claude Code, install.sh does this. For everything else
(Claude Desktop, Cline, Continue, Cursor, etc.), add a stdio entry:
{
"mcpServers": {
"wechat-mp": {
"command": "/absolute/path/to/wechat-mp-mcp/.venv/bin/wechat-mp-mcp"
}
}
}Tools exposed
Tool | Cost | Purpose |
| 1 API call | Resolve account name → |
| 1 API call | Pull one page of metadata. Use for full-history crawl — call repeatedly with growing |
| 1-N API calls | Pull only articles newer than what is stored. Stops on first overlap with local DB |
| 0 (public page) | Fetch + parse one article body to Markdown |
| 0 (local) | Report today's API call usage vs daily cap |
| 0 (local) | Query the local store |
fetch_article doesn't consume the daily quota because article pages
(mp.weixin.qq.com/s/...) are public — only the search backend has a cap.
Typical workflow (natural language)
After wiring into Claude Code, you can just say:
"Search the WeChat account 'Foo Bar' and show me the latest 5 articles."
"Crawl all history for 'Foo Bar' (61 articles total)."
"Show me what's new in 'Foo Bar' today."
"Fetch the latest article and summarize it in 3 bullets."
"How much daily quota have I used?"The LLM chooses the right tool. Full crawl: LLM walks list_articles_page
itself. Incremental: server-side loop in crawl_incremental.
Configuration (env vars)
Var | Default | Effect |
|
| Daily backend-call cap (WeChat's own limit is ~200/day per account — stay below) |
|
| Local-time window for |
|
| Where to put |
|
| SQLite database path |
Anti-detection
A crawler hitting a fixed-interval pagination is the easiest pattern to flag. This server already does:
Jittered delays:
1.5s * [0.7, 2.0]between pages, with ~8% chance of a 30-90s "tea break"Random page sizes: 3-6 articles per request (biased to 5)
Daily quota cap: hard stop at 150 (25% buffer below WeChat's ~200)
Work-hours gate:
crawl_incrementalrefuses outside 8am-11pm by default — real account operators don't run at 3amRealistic headers:
Referermimics the article editor page,X-Requested-With: XMLHttpRequestPublic article pages don't count: bodies are fetched from public URLs, not the rate-limited backend
You can still get rate-limited if you crawl aggressively. The 1-2h cookie expiry is normal session timeout, not a punishment.
Risks
The subscription-account search interface is undocumented. WeChat can change it at any time; expect the request shape to need re-tuning every few months.
Read counts / likes / "看一看" are not available through this path. Those require intercepting the WeChat App's traffic (out of scope).
Use a dedicated subscription account for crawling — don't use one you actively operate. Worst case is a 24h freq-control lock on the search interface; the account itself isn't banned.
Don't share your
auth.json. If WeChat sees the same session from multiple IPs, the account gets flagged as compromised.
Storage
SQLite at ~/.config/wechat-mp-mcp/wechat.db by default. Tables:
account(fakeid PK, nickname, alias, ...)article(link PK, fakeid, title, update_time, body_markdown, ...)quota(date PK, count)— per-day API counter
Inspect with any SQLite client. URL is the article's primary key, so re-crawling never produces duplicates.
Tests
.venv/bin/python tests/test_flows.py # 29 offline checks (no auth needed)
.venv/bin/python tests/live_check.py # E2E against real WeChat (1 search + 1 list + 1 fetch)
.venv/bin/python tests/live_crawl.py <fakeid> # Live incremental crawlLive tests require a valid auth.json. live_check.py uses
WECHAT_MP_TEST_QUERY env var (default: 央视新闻) or first CLI arg
for the target account.
License
MIT — see LICENSE.
Available Tools
6 toolscrawl_incrementalA
Pull only newer articles than what is already stored locally.
Walks pages from newest to older, stopping once a page contains no articles newer than the latest stored update_time, or when max_pages is reached.
Anti-detection: page size varies per call (3-6), delays are jittered, and occasional 30-90s pauses are inserted. Calls are gated to local work hours (env: WECHAT_MP_MCP_WORK_HOURS, default 8-23). Pass override_work_hours=True to bypass the gate for urgent runs.
| Name | Required | Description | Default |
|---|---|---|---|
| fakeid | Yes | ||
| max_pages | No | ||
| delay_seconds | No | ||
| override_work_hours | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description fully covers behavioral traits: anti-detection mechanisms (page size variation, jittered delays, pauses), work hours gating, and stopping condition. Contradictions none.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is fairly concise and well-structured, with purpose first followed by details. Every sentence adds value, but could be slightly more compact. No redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity and absence of output schema, the description covers the core functionality, work hours, and anti-detection. However, it lacks details on return format or what happens on errors, which would enhance completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It explicitly explains override_work_hours and partially explains max_pages (stopping condition), but does not describe fakeid or delay_seconds. Some parameters are hinted but not fully detailed.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: pulling only newer articles than what is stored locally. This distinguishes it from siblings like fetch_article (single article), list_articles_page (non-incremental listing), and list_stored_articles (already stored).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use this tool (incremental updates) and provides context about work hours gate and override. However, it lacks explicit guidance on when not to use it and does not name alternative siblings for specific cases.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
fetch_articleA
Fetch an article's full body, parse to Markdown, and optionally cache it.
url must be a https://mp.weixin.qq.com/s/... link. If save=True and the
article exists in the local store, the markdown body is written back.
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | ||
| save | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden and discloses key behaviors: parsing to Markdown and conditional caching. It mentions that setting save=True writes back if the article exists. It could further clarify behavior for save=False or when the article is not found, but the provided details are sufficient.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise with two sentences and a code block. Every sentence adds value, and the structure is front-loaded with the main action, followed by parameter details.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with only two parameters and no output schema or annotations, the description covers the essentials: the task, URL constraint, and caching behavior. It lacks details on error handling or output format, but given the simplicity, it is nearly complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has 0% description coverage, so the description adds essential meaning: it explains that 'url' must be a specific type of WeChat link and that 'save' controls caching behavior. This goes beyond the schema's type definitions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action: fetching an article's full body, parsing to Markdown, and optionally caching. It specifies the required URL format (mp.weixin.qq.com/s/...), distinguishing it from sibling tools like crawl_incremental or list_articles_page.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context for when to use the tool (to fetch a single article) and includes a specific URL constraint. However, it does not explicitly state when not to use it or mention alternatives, though the sibling tools offer natural differentiation.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_articles_pageA
Fetch one page of articles for a given fakeid and store metadata.
Use this for a first-time full crawl: call repeatedly with begin += count
until the returned articles list is empty. The metadata is upserted into
the local SQLite store; bodies are NOT fetched here.
| Name | Required | Description | Default |
|---|---|---|---|
| fakeid | Yes | ||
| begin | No | ||
| count | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the burden. It discloses that metadata is upserted into a local SQLite store and bodies are not fetched. However, it does not mention permissions, error handling, or whether the operation is destructive beyond upsert.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is short and front-loaded: two sentences with no fluff. Every sentence adds value, stating purpose, usage pattern, and a caveat about bodies.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with 3 params, no output schema, and mutation, the description covers the basic usage pattern and side effect (metadata storage). It lacks parameter details, return value description, and error handling. It is adequate but not exhaustive.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, and the description does not explain what fakeid represents or clarify begin and count beyond their names. The usage pattern implies begin increments by count, but no formal descriptions are given.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Fetch one page of articles for a given fakeid and store metadata.' This is a specific verb+resource action, and distinguishes the tool from siblings like fetch_article (which fetches single article body) and crawl_incremental (incremental crawl).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit guidance: 'Use this for a first-time full crawl: call repeatedly with begin += count until the returned articles list is empty.' It also clarifies that bodies are not fetched here, helping the agent decide when to use this tool.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_stored_articlesC
List articles already stored locally for a given fakeid, newest first.
| Name | Required | Description | Default |
|---|---|---|---|
| fakeid | Yes | ||
| limit | No | ||
| offset | No | ||
| with_body | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description should disclose behavioral traits. It mentions ordering ('newest first'), but lacks info on safety (read-only), authentication needs, side effects, or rate limits. Minimal beyond purpose.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
One concise sentence with verb and resource front-loaded. No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 4 parameters, no output schema, and no annotations, the description is too minimal. It doesn't cover pagination (limit/offset) or with_body behavior, leaving gaps for an agent to use correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0% (no descriptions) and the description does not explain any of the 4 parameters (limit, offset, with_body, fakeid). Only fakeid is implied. No added value for agent invocation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'List', resource 'articles already stored locally', and unique scope 'for a given fakeid, newest first'. It effectively distinguishes from siblings like list_articles_page and crawl_incremental.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance on when to use or not use this tool compared to siblings. The description only implies usage for listing stored articles by fakeid, but does not mention alternatives or context like search_account.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
quota_statusA
Report today's API call usage against the daily safety cap.
Only counts calls that hit the mp.weixin.qq.com backend (searchbiz + appmsg). Reading public article URLs does not count.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It discloses that only backend API calls count and public article reading is excluded, offering good behavioral context beyond the tool's basic purpose.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences are front-loaded with the main purpose followed by clarifying details. No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple status tool with no parameters and no output schema, the description fully explains what is tracked and the counting rules, making it complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
There are no parameters, so the baseline is 4. The description adds no parameter information because none exist.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb ('Report') and resource ('API call usage against daily safety cap'), clearly distinguishing from sibling tools like crawl_incremental or fetch_article which perform different actions.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description clarifies which calls count (searchbiz + appmsg) and that reading public articles does not count, providing clear context for when to use this tool. However, it does not explicitly state when not to use it or mention alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_accountA
Search a WeChat Official Account by name. Returns candidates with fakeid.
Use the returned fakeid as input for list_articles / crawl_incremental.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| limit | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It states that the tool searches by name and returns candidates with fakeid, but does not disclose potential behaviors such as ranking, pagination, or the possibility of multiple matches. This is minimally adequate.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description consists of two efficient sentences plus a usage hint. No extraneous information, every sentence serves a purpose (purpose and usage guidance).
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 2 parameters, no output schema, and no annotations, the description covers the essential purpose and output usage. It lacks mention of potential multiple candidates or ranking, but for a search tool, the core information is present.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has 0% description coverage, so the description must compensate. It clarifies that 'query' is the account name and implies 'limit' controls result count (default 5). However, it does not describe 'limit' explicitly or provide format details, so only partial compensation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Search', the resource 'WeChat Official Account', and the key output 'fakeid'. It distinguishes this tool from siblings that consume fakeid, like list_articles, by specifying the returned value's role.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly instructs to use the returned fakeid for list_articles and crawl_incremental, providing clear usage context. However, it does not explicitly state when to avoid this tool or mention alternatives among siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
6 tool updates
v0.1.0- First observed
crawl_incremental - First observed
fetch_article - First observed
list_articles_page - First observed
list_stored_articles - First observed
quota_status - First observed
search_account
TDQS
Each tool has a clearly distinct purpose: incremental crawling, fetching articles, paginated listing, local store querying, usage monitoring, and account search. No overlapping functionality.
Most names follow verb_noun snake_case (e.g., fetch_article, list_articles_page), but quota_status is noun_noun, a minor deviation. Overall pattern is clear.
Six tools cover the main operations for interacting with WeChat MP: account lookup, article listing, incremental crawling, content fetching, and usage monitoring. Well-scoped.
The set covers search, listing (both paginated and incremental), fetching, and caching. For a read-focused API, this is complete. No essential operations missing.
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Web search, URL content extraction to Markdown, site mapping, and recursive web crawler.
Read WeChat public account articles via MCP. 99.89% anti-scraping success, 50-87% token compression.
Turn any URL into clean Markdown and structured data. Scrape, crawl, search and extract.
WeChat Channels videos, comments, users, transcripts, and Official Account article details.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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