wechat-article-downloader
它能做什么
这项技能通过 MCP 工具服务下载微信公众号的文章。适合希望保存、归档或分析微信公众号文章的人。
适用场景
- ✓当你想把一篇微信文章保存为 PDF、Word 文件或 Markdown 时。
- ✓当你想下载某个公众号的完整合集时。
- ✓当你想把文章标题、链接和其他元数据导出为 CSV 文件时。
技能链接
https://github.com/qiye45/wechatDownload/blob/main/skills/wechat-article-downloader/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请把这篇微信文章下载为 Markdown 文件,并把它的标题和链接保存到 CSV 里。”
每周 5 个新技能,1 分钟读完。
工作原理
技能会先检查本地 MCP 服务器,某些工具可以回退到远程服务器。它会调用你需要的下载或导出工具,并按你选择的格式保存结果。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
WeChat Article Downloader
This skill helps you download articles from WeChat official accounts using an MCP server that interfaces with a WeChat article download tool.
Prerequisites
The skill uses local MCP endpoint http://127.0.0.1:4545/mcp for full functionality.
If local MCP is unavailable, you may fallback to https://changfengbox.top/api/mcp for remote-supported tools.
Local MCP tools:
single_article_download- Download a single articleget_public_account_id- Get public account credentialsbatch_download_articles- Batch download all articles from an accountexport_article_data- Export article metadata to CSV
Remote fallback MCP (https://changfengbox.top/api/mcp) currently supports:
- Methods:
initialize,tools/list,tools/call - Tools in
tools/callname:wechat- Download a single articlewechat_collection- Download a public account collection (appmsgalbum)
Important: remote fallback does not expose local tool names like single_article_download, batch_download_articles, get_public_account_id, or export_article_data.
Workflow
1. Check Local MCP Server Status
Before using most functionality, verify local MCP is running:
import requests
LOCAL_MCP_ENDPOINT = "http://127.0.0.1:4545/mcp"
def check_local_mcp():
response = requests.post(
LOCAL_MCP_ENDPOINT,
json={"jsonrpc": "2.0", "method": "initialize", "id": 1},
headers={"Content-Type": "application/json"},
timeout=3,
)
if response.status_code != 200:
raise RuntimeError("Local MCP is not available")
return LOCAL_MCP_ENDPOINT
local_mcp_endpoint = check_local_mcp()
If local MCP is inaccessible, inform the user they need to:
- Open the WeChat article download tool
- Check the "启动MCP" checkbox to start the MCP service
- Wait for the confirmation message showing the service is running on port 4545
2. Single Article Download
Use local tool first. If local MCP fails, fallback to remote wechat tool.
import requests
LOCAL_MCP_ENDPOINT = "http://127.0.0.1:4545/mcp"
FALLBACK_DOWNLOAD_MCP_ENDPOINT = "https://changfengbox.top/api/mcp"
def call_tool(endpoint, tool_name, arguments, req_id=2):
payload = {
"jsonrpc": "2.0",
"method": "tools/call",
"id": req_id,
"params": {
"name": tool_name,
"arguments": arguments,
}
}
response = requests.post(
endpoint,
json=payload,
headers={"Content-Type": "application/json"},
timeout=10,
)
response.raise_for_status()
return response.json()
def download_single_article(url):
try:
return call_tool(
LOCAL_MCP_ENDPOINT,
"single_article_download",
{"url": url},
req_id=2,
)
except Exception:
remote_config = {
"保存离线网页": True,
"HTML": True,
"MD": True,
"PDF": False,
"WORD": False,
"TXT": False,
"MHTML": False,
"文件开头添加日期": True,
}
return call_tool(
FALLBACK_DOWNLOAD_MCP_ENDPOINT,
"wechat",
{"url": url, "config": remote_config},
req_id=3,
)
# Example usage
article_url = "https://mp.weixin.qq.com/s/xxxxx"
result = download_single_article(article_url)
print(result)
The article will be downloaded to the tool's default download directory in the formats configured in the tool (HTML, PDF, Word, Markdown, MHTML, etc.).
Remote wechat config can use these keys:
保存离线网页HTMLMDPDFWORDTXTMHTML文件开头添加日期
If local 127.0.0.1:4545 is unavailable, this step should transparently use https://changfengbox.top/api/mcp with tool name wechat.
3. Download Collection (appmsgalbum)
For collection URLs, call remote wechat_collection via tools/call:
def download_collection(collection_url):
payload = {
"jsonrpc": "2.0",
"method": "tools/call",
"id": 4,
"params": {
"name": "wechat_collection",
"arguments": {
"url": collection_url,
},
},
}
response = requests.post(
"https://changfengbox.top/api/mcp",
json=payload,
headers={"Content-Type": "application/json"},
timeout=20,
)
response.raise_for_status()
return response.json()
常见问题
可以保存哪些格式?
技能列出了 HTML、PDF、Word、Markdown、TXT 和 MHTML。
如果本地服务器没有运行怎么办?
技能说明它可以回退到远程端点,但远程端点只支持部分工具。
它能导出文章数据吗?
可以。技能包含一个导出工具,可把文章元数据写入 CSV。
详情
作者的原始描述
Download WeChat official account articles in multiple formats (HTML, PDF, Word, Markdown, TXT, MHTML), including single article download, collection (appmsgalbum) download, local bulk workflows, and metadata export. Use this skill when users ask to download WeChat articles, download public account collections, batch pull account content, or export article data.
repo: qiye45/wechatDownload
热度
- GitHub 星标
- 10.0k
- 排名
- #12034
- 许可证
- —
- 更新时间
- 2026/11/1
评论
- …