Weixin ReaderSAFE
能够让大模型阅读微信公众号文章,使用浏览器模拟绕过反爬虫。
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
一个极简的MCP,让大模型能够阅读微信公众号文章。
核心功能
- 🎭 浏览器模拟:使用 Playwright 完整模拟浏览器环境
- 📝 内容提取:自动提取标题、作者、发布时间、正文内容
- ⚡ 简洁实现:最少的代码实现核心功能
工作流程
- 用户发送URL和需求给大模型
- 大模型调用MCP工具
- MCP获取文章内容发送给大模型
- 大模型根据文章内容输出自然语言
技术栈
- Python 3.10+
- fastmcp - MCP框架
- [url-md](https://github.com/Bwkyd/url-md) (Rust 单二进制) - 反爬 + Markdown 抽取一步到位
- pyyaml - frontmatter 解析
v0.3.0 升级说明:抓取层从agent-browser4 次子进程 + BeautifulSoup 解析,简化为 单次调用 `url-md md `。url-md 内部已处理反爬 / 微信正文抽取 / Markdown 转换 / frontmatter 生成。依赖减少,content字段升级为 Markdown(保留图片引用 / 列表 / 标题层级)。MCP 协议接口零变化,现有 Claude/Cursor 配置无需调整。 v0.2.0 升级说明: 原 Playwright 方案被微信加强反爬打穿 (issue #3)。抓取层改为委托给 agent-browser(Apache-2.0 开源 Rust 项目)。v0.3.0 起已迁移到 url-md。
快速开始
1. 安装 url-md (v0.3.0 起必需)
# 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 # 验证 url-md --version
6 秒从零到可用。7 MB 单二进制,无需 Chrome 等外部依赖(微信永久链走 reqwest 快路)。
2. 安装 Python 依赖
pip install -r requirements.txt
3. 配置
{
"mcpServers": {
"weixin-reader": {
"command": "python",
"args": [
"C:/Users/你的用户名/Desktop/wx-mcp/wx-mcp-server/src/server.py"
]
}
}
}注意: 请将路径替换为你的实际项目路径。
使用示例
在Claude中直接使用:
请帮我总结这篇文章:https://mp.weixin.qq.com/s/nEJhdxGea-KLZA_IGw9R5A
Claude会自动调用read_weixin_article工具获取文章内容并进行分析。
功能说明
read_weixin_article(url: str)
读取微信公众号文章内容。
参数:
url: 微信文章URL,格式:https://mp.weixin.qq.com/s/xxx
返回:
{
"success": true,
"title": "文章标题",
"author": "作者名",
"publish_time": "2025-11-05",
"content": "# 文章正文\n\n\n\n段落内容...",
"cover_url": "https://mmbiz.qpic.c0c2e69c23ad1OBSERVED · 2026-09-30Exposed tools (1)
1 read · 0 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
read_weixin_article | read |
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- declared (1 observation(s))
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (2)
fastmcp, pyyaml
curl -fsSL https://raw.githubusercontent.com/Bwkyd/url-md/main/install.sh | bash
Gates applied: no_behavioural_pass.
0c2e69c23ad1full audit observations/trust-audit/mcp-server/bwkyd__weixin-reader.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-09-30 | 0c2e69c23ad1 | SAFE | B | 89 | first audit |
Questions
What is the Weixin Reader MCP server?
能够让大模型阅读微信公众号文章,使用浏览器模拟绕过反爬虫。
What tools does Weixin Reader expose?
1 in total: 1 read-only, 0 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is Weixin Reader safe to connect to an agent?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B.
What credentials does Weixin Reader need?
No credential environment variables were found in its source, so it appears to need none.
How current is this page?
The grade is for one exact copy of the source (0c2e69c23ad1), read on 2026-09-30. The repository is watched and re-audited when it changes.