Content
# Weixin MCP - Weixin Article Reader
A minimalist MCP that enables large models to read Weixin public account articles.
## Core Features
- 🎭 **Browser Simulation**: Uses Playwright to fully simulate the browser environment
- 📝 **Content Extraction**: Automatically extracts title, author, publication time, and content
- ⚡ **Simple Implementation**: Minimal code implementation of core functionality
## Workflow
1. User sends URL and requirements to large model
2. Large model calls MCP tool
3. MCP retrieves article content and sends it to large model
4. Large model outputs natural language based on article content
## Technology Stack
- **Python 3.10+**
- **fastmcp** - MCP framework
- **[url-md](https://github.com/Bwkyd/url-md)** (Rust single binary) - Anti-crawling + Markdown extraction in one step
- **pyyaml** - Frontmatter parsing
> **v0.3.0 Upgrade Instructions**: The crawling layer has been simplified from `agent-browser` 4 subprocesses + BeautifulSoup parsing to a **single call to `url-md md <url>`**. url-md has handled anti-crawling / Weixin content extraction / Markdown conversion / frontmatter generation. Dependencies have been reduced, and the `content` field has been upgraded to Markdown (preserving image references / lists / title levels). MCP protocol interface remains unchanged, and existing Claude/Cursor configurations do not need to be adjusted.
>
> **v0.2.0 Upgrade Instructions**: The original Playwright solution was defeated by Weixin's enhanced anti-crawling measures ([issue #3](https://github.com/Bwkyd/wexin-read-mcp/issues/3)). The crawling layer has been changed to entrust [agent-browser](https://github.com/vercel-labs/agent-browser) (Apache-2.0 open-source Rust project). As of v0.3.0, it has been migrated to url-md.
## Quick Start
### 1. Install url-md (required from v0.3.0)
```bash
# macOS / Linux
curl -fsSL https://raw.githubusercontent.com/Bwkyd/url-md/main/install.sh | bash
# Windows (PowerShell)
irm https://raw.githubusercontent.com/Bwkyd/url-md/main/install.ps1 | iex
# Verification
url-md --version
```
> 6 seconds from zero to available. 7 MB single binary, no external dependencies like Chrome (Weixin permanent chain uses reqwest fast path).
### 2. Install Python Dependencies
```bash
pip install -r requirements.txt
```
### 3. Configuration
```json
{
"mcpServers": {
"weixin-reader": {
"command": "python",
"args": [
"C:/Users/Your Username/Desktop/wx-mcp/wx-mcp-server/src/server.py"
]
}
}
}
```
**Note**: Please replace the path with your actual project path.
## Example Usage
Directly use in Claude:
```
Please help me summarize this article: https://mp.weixin.qq.com/s/nEJhdxGea-KLZA_IGw9R5A
```
Claude will automatically call the `read_weixin_article` tool to retrieve article content and perform analysis.

## Function Description
### `read_weixin_article(url: str)`
Reads Weixin public account article content.
**Parameters**:
- `url`: Weixin article URL, format: `https://mp.weixin.qq.com/s/xxx`
**Returns**:
```json
{
"success": true,
"title": "Article Title",
"author": "Author Name",
"publish_time": "2025-11-05",
"content": "# Article Content\n\n\n\nParagraph content...",
"cover_url": "https://mmbiz.qpic.cn/.../wx_fmt=jpeg",
"error": null
}
```
> As of v0.3.0, the `content` field is in Markdown format (prior to v0.2.0, it was plain text). If downstream agents/prompt have been processing plain text, you can remove Markdown syntax before returning, or preserve Markdown for better understanding by LLM.
## Precautions
- ⚠️ Only for personal learning and research
- ⚠️ Comply with Weixin public platform service agreement
- ⚠️ Do not crawl at high frequency (recommended interval > 2 seconds)
- ⚠️ Not for commercial use
Connection Info
You Might Also Like
awesome-mcp-servers
A collection of MCP servers.
git
A Model Context Protocol server for Git automation and interaction.
cc-switch
All-in-One Assistant for Claude Code, Codex & Gemini CLI across platforms.
oh-my-opencode
Background agents · Curated agents like oracle, librarians, frontend...
TrendRadar
TrendRadar: Your hotspot assistant for real news in just 30 seconds.
Appwrite
Build like a team of hundreds