by tmwgsicp
一款完全开源的微信公众号文章获取、RSS 订阅 API 服务,支持整号文章一键导出 7 种格式(Markdown/HTML/Word/PDF/EPUB/Excel/JSON)、IP 代理池反风控、MCP 接入各种 AI Agent 工具。
# Add to your Claude Code skills
git clone https://github.com/tmwgsicp/wechat-download-apiGuides for using ai agents skills like wechat-download-api.
Last scanned: 7/10/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-07-10T07:34:09.864Z",
"npmAuditRan": true,
"pipAuditRan": false,
"promptInjectionRan": true
}wechat-download-api is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by tmwgsicp. 一款完全开源的微信公众号文章获取、RSS 订阅 API 服务,支持整号文章一键导出 7 种格式(Markdown/HTML/Word/PDF/EPUB/Excel/JSON)、IP 代理池反风控、MCP 接入各种 AI Agent 工具。. It has 1,034 GitHub stars.
Yes. wechat-download-api passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/tmwgsicp/wechat-download-api" and add it to your Claude Code skills directory (see the Installation section above).
wechat-download-api is primarily written in Python. It is open-source under tmwgsicp on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh wechat-download-api against similar tools.
No comments yet. Be the first to share your thoughts!
⚠️ Third-Party Software Notice
This skill is third-party open-source software developed and hosted independently on GitHub. SkillsLLM is an informational directory and does not control or maintain the underlying repository.
Any security checks, ratings, or warnings displayed by SkillsLLM are automated and limited in scope. They do not constitute a security certification or guarantee that the software is safe, error-free, or free from malicious code, vulnerabilities, compromised dependencies, or prompt-injection risks.
Review the source code, permissions, dependencies, and configuration before installing or running any third-party skill. Use is at your own risk. To the maximum extent permitted by applicable law, SkillsLLM is not liable for losses arising from third-party software.
完全开源 | 免费部署 | RSS 订阅 | 文章抓取 | 多格式导出 | 反风控
100% 开源,100% 免费。 代码完全公开,私有化部署无任何限制,不搞"开源"之名行收费之实。
订阅只是第一步。把整个公众号的存量文章一键打包成你想要的格式——喂给 AI、导入笔记、离线存档、换设备迁移,全都行。
| 格式 | 后缀 | 适合场景 | 图片 | 单次上限 |
|---|---|---|---|---|
| 📝 Markdown 合集 | .zip |
归档 / 喂 AI / 导入 Obsidian、Logseq | 引用式 | 3000 |
| 🌐 HTML 合集 | .html |
单文件、带目录、暗色适配,浏览器直接看 | 引用式 | 3000 |
| 📊 Excel | .xlsx |
文章清单表(标题 / 作者 / 时间 / 链接) | — | 3000 |
| 🔧 JSON | .json |
二次开发 / 数据分析 | — | 3000 |
| 📄 Word | .docx |
可编辑文档,图去重压缩 | 内嵌 | 500 |
.pdf |
固定排版、内置中文字体免装 | 内嵌 | 200 | |
| 📱 EPUB | .epub |
手机 / 电子书阅读器读合集 | 内嵌 | 500 |
文本/表格类(Markdown / HTML / Excel / JSON)图片引用式、秒出、零抓图带宽;离线自包含类(Word / PDF / EPUB)会把微信图现抓内嵌进文件、断网也能看图。全部只导已抓到正文的文章,支持按时间范围(全部 / 最近 N 天 / 时间窗 / 增量)筛选。
在 RSS 管理页(/rss.html)每个订阅右侧点「下载文章」即可可视化选格式与时间范围;也可直接调接口 GET /api/export/account/{fakeid}.{格式},详见下方 整号文章导出(多格式)。
最快速的部署方式,无需配置 Python 环境,一键启动:
# 方式一:使用 docker-compose(推荐)
git clone https://github.com/tmwgsicp/wechat-download-api.git
cd wechat-download-api
cp env.example .env
# 编辑 .env 设置 SITE_URL 为实际访问地址
docker-compose up -d
# 方式二:直接运行
docker run -d \
-p 5000:5000 \
-v $(pwd)/data:/app/data \
-v $(pwd)/.env:/app/.env \
--name wechat-api \
tmwgsicp/wechat-download-api:latest
服务启动后访问 http://localhost:5000/login.html 扫码登录即可使用。
支持多架构:linux/amd64 / linux/arm64(Apple Silicon、树莓派、ARM 服务器)
不想折腾部署?30 秒注册即可使用 👉 wechatrss.waytomaster.com
搜索公众号名称,拿到 RSS 链接,丢进你的阅读器——Feedly、Inoreader、NetNewsWire 全部兼容。
本工具需要通过微信公众平台后台的登录凭证来调用接口,因此使用前需要:
.env 文件,有效期约 4 天,过期后需重新扫码登录后即可通过 API 获取任意公众号的公开文章(不限于自己的公众号)。
本地电脑可以直接使用! 不需要公网服务器——在本地启动服务后通过
localhost访问即可完成扫码登录和全部功能。只有当你需要从其他设备(如手机 RSS 阅读器)远程访问时,才需要公网服务器或内网穿透。
# 1. 克隆项目
git clone https://github.com/tmwgsicp/wechat-download-api.git
cd wechat-download-api
# 2. 配置环境变量
cp env.example .env
# 编辑 .env,设置 SITE_URL 为实际访问地址(如 http://your-domain.com)
# 3. 启动服务
docker-compose up -d
# 4. 查看日志
docker-compose logs -f
第一步:克隆项目
git clone https://github.com/tmwgsicp/wechat-download-api.git
cd wechat-download-api
第二步:一键启动
bash start.sh # Linux/macOS
# 或
start.bat # Windows
脚本会自动完成环境检查、虚拟环境创建、依赖安装和服务启动。
第三步:扫码登录
访问 http://localhost:5000/login.html,用公众号管理员微信扫码登录。
| 地址 | 说明 |
|---|---|
| http://localhost:5000 | 管理面板 |
| http://localhost:5000/login.html | 扫码登录 |
| http://localhost:5000/api/docs | Swagger API 文档 |
| http://localhost:5000/api/health | 健康检查 |
start.sh 脚本在 Linux 上以 sudo 运行时,会自动注册 systemd 服务并启用开机自启:
sudo bash start.sh
之后可通过以下命令管理服务:
# 查看运行状态
bash status.sh
# 停止服务
bash stop.sh
# 手动操作
sudo systemctl restart wechat-download-api
sudo systemctl status wechat-download-api
如需通过域名或 HTTPS 访问,配置 Nginx 反向代理到 localhost:5000:
server {
listen 80;
server_name your-domain.com;
location / {
proxy_pass http://127.0.0.1:5000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
复制 env.example 为 .env 并按需修改:
cp env.example .env
主要配置项参见 env.example 中的注释说明。
内置 MCP(Model Context Protocol)服务,让 Claude、Codex、Cline、Cursor 等 AI 客户端直接搜索公众号、订阅、读文章,不用切网页、不用手动调接口——对 AI 说"帮我订阅 XX 公众号、把最新几篇总结一下"即可。
6 个工具:
| 工具 | 作用 |
|---|---|
search_accounts |
按名称搜索公众号,拿 fakeid |
subscribe_account |
订阅公众号(传 fakeid) |
unsubscribe_account |
取消订阅 |
list_subscriptions |
列出已订阅的公众号 |
get_recent_articles |
拉最新文章(支持时间游标增量、按公众号过滤) |
read_article |
读某篇文章的完整正文 |
启用(.env): 单用户自托管,鉴权走静态 Bearer Token,无需 OAuth。ENABLE_MCP 和 MCP_TOKEN 两者都要设置,缺一则 MCP 不启用。
ENABLE_MCP=1
MCP_TOKEN=设一个足够长的随机串 # 客户端凭它鉴权(必填,留空则不启用)
# MCP_RESOURCE_URL=https://你的域名/mcp # 部署到公网域名时设(DNS-rebinding 白名单)
服务挂载在 /mcp(streamable-http)。
客户端配置:
# Claude Code
claude mcp add --transport http wechatrss https://你的域名/mcp \
--header "Authorization: Bearer <MCP_TOKEN>"
// Cursor / Cline 等(JSON 配置)
{
"mcpServers": {
"wechatrss": {
"url": "https://你的域名/mcp",
"headers": { "Authorization": "Bearer <MCP_TOKEN>" }
}
}
}
本地自测:
http://localhost:5000/mcp。启用后未带正确 Token 会返回 401。
以下 HTTP 接口无需鉴权:调用方不用传任何 Token 或
Authorization头。微信登录态由服务端扫码登录后内部持有并自动使用(前提是管理页面已扫码登录)。MCP_TOKEN/Authorization: Bearer仅用于上面的 MCP 客户端接入,与这些 HTTP 接口无关。文章解析与公众号搜索/文章列表接口(
/api/article、/api/public/searchbiz、/api/public/accountinfo、/api/public/articles、/api/public/articles/search)统一返回{ "success": bool, "data": {...}, "error": null },业务数据都在data字段下;业务失败(如登录态失效)返回 HTTP 200 且success: false,请以success字段判断成败。(增量同步接口/api/feed/articles.json与/api/health直接返回数据对象、不带此包装;RSS 接口返回 XML;/api/feed/article/{id}.md返回 markdown 文本。)
POST /api/article — 解析微信公众号文章,返回标题、正文、图片等结构化数据
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
url |
string | 是 | 微信文章链接(https://mp.weixin.qq.com/s/...) |
请求示例:
curl -X POST http://localhost:5000/api/article \
-H "Content-Type: application/json" \
-d '{"url": "https://mp.weixin.qq.com/s/xxxxx"}'
返回字段(均在 data 下):title 标题、content HTML 正文、plain_content 纯文本正文、images 图片 URL 列表、author 作者、publish_time 发布时间戳(秒)、publish_time_str 可读发布时间(如 2026-02-24 09:00:00)
GET /api/public/searchbiz — 按关键词搜索微信公众号,获取 FakeID
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
query |
string | 是 | 搜索关键词(公众号名称) |
请求示例:
curl "http://localhost:5000/api/public/searchbiz?query=公众号名称"
返回示例:
{
"success": true,
"data": {
"list": [
{
"fakeid": "MzI5NjM4MjExMg==",
"nickname": "示例公众号",
"alias": "example_wx",
"round_head_img": "http://你的部署地址/api/image?url=...",
"service_type": 1
}
],
"total": 1
},
"error": null
}
返回字段(公众号列表在 data.list 下):
fakeid — 公众号唯一 ID(后续获取文章、订阅时使用)nickname — 公众号名称alias — 微信号round_head_img — 头像地址(已转为服务器图片代理链接)service_type — 类型(0=订阅号 / 1=服务号 / 2=企业号)data.total — 匹配数量(已过滤黑名单后的条数)GET /api/public/accountinfo — 获取公众号的认证主体、认证状态、原创文章数等信息
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
fakeid |
string | 是 | 公众号的 FakeID(从搜索接口获取) |
请求示例:
curl "http://localhost:5000/api/public/accountinfo?fakeid=YOUR_FAKEID"
返回示例:
{
"success": true,
"data": {
"identity_name": "腾讯科技(深圳)有限公司",
"is_verify": 2,
"original_article_count": 15234
}
}
返回字段:
identity_name — 认证主体名称(公司/机构名称)is_verify — 认证状态(0=未认证, 1=微信认证, 2=新媒体认证)original_article_count — 原创文章总数GET /api/public/articles — 获取指定公众号的文章列表,支持分页
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
fakeid |
string | 是 | 目标公众号的 FakeID(从搜索接口获取) |
begin |
int | 否 | 偏移量,默认 0 |
count |
int | 否 | 获取数量,默认 10,最大 100 |
keyword |
string | 否 | 在该公众号内搜索关键词 |
请求示例:
# 获取前 50 篇
curl "http://localhost:5000/api/public/articles?fakeid=YOUR_FAKEID&begin=0&count=50"
# 获取第 51-100 篇
curl "http://localhost:5000/api/public/articles?fakeid=YOUR_FAKEID&begin=50&count=50"
返回示例:
{
"success": true,
"data": {
"articles": [
{
"aid": "2650000000_1",
"title": "示例文章标题",
"link": "https://mp.weixin.qq.com/s/AbCdEfGhIj",
"update_time": 1700000000,
"create_time": 1699999000,
"dig