微信公众号文章转 Markdown 工具 | AI Agent 可直接调用的 MCP Server + Skill | Camoufox 反检测、自动重试、批量处理、图片本地化
Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"wechat-to-md": {
"cwd": "/path/to/wechat-article-for-ai",
"args": [
"mcp_server.py"
],
"command": "python"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
A modular Python tool that converts WeChat Official Account (微信公众号) articles into clean Markdown files with locally downloaded images. Designed for both human use (CLI) and AI agent integration (MCP server + SKILL.md).
No automated test available for this server. Check the GitHub README for setup instructions.
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
No package registry to scan.
Click any tool to inspect its schema.
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in writing
A markdown editor — and the bridge to your LLM. Local-first, MIT, ~15 MB. Bundled MCP server lets Claude Code / Codex / Cursor drive your vault directly. 14 AI providers BYOK.
f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open source — self-host for your organization with complete privacy.
Define task-specific AI sub-agents in Markdown for any MCP-compatible tool.
一键同步文章到多个内容平台,支持今日头条、WordPress、知乎、简书、掘金、CSDN、typecho各大平台,一次发布,多平台同步发布。解放个人生产力
MCP Security Weekly
Get CVE alerts and security updates for Wechat Article For Ai and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
A modular Python tool that converts WeChat Official Account (微信公众号) articles into clean Markdown files with locally downloaded images. Designed for both human use (CLI) and AI agent integration (MCP server + SKILL.md).
networkidle wait instead of hardcoded sleep<mpvoice> audio and <mpvideo> video elementsgit clone https://github.com/bzd6661/wechat-article-for-ai.git
cd wechat-article-for-ai
pip install -r requirements.txt
Camoufox browser will be auto-downloaded on first run.
python main.py "https://mp.weixin.qq.com/s/ARTICLE_ID"
python main.py -f urls.txt -o ./output -v
| Flag | Description |
|---|---|
urls | One or more WeChat article URLs |
-f, --file FILE | Text file with URLs (one per line, # for comments) |
-o, --output DIR | Output directory (default: ./output) |
-c, --concurrency N | Max concurrent image downloads (default: 5) |
--no-images | Skip image download, keep remote URLs |
--no-headless | Show browser window (for solving CAPTCHAs) |
--force | Overwrite existing output |
--no-frontmatter | Use blockquote metadata instead of YAML frontmatter |
-v, --verbose | Enable debug logging |
Run as an MCP server for AI tool integration:
python mcp_server.py
Tools exposed:
convert_article — Convert a single WeChat article to Markdownbatch_convert — Convert multiple articles in one callMCP client configuration (e.g. claude_desktop_config.json):
{
"mcpServers": {
"wechat-to-md": {
"command": "python",
"args": ["mcp_server.py"],
"cwd": "/path/to/wechat-article-for-ai"
}
}
}
output/
<article-title>/
<article-title>.md
images/
img_001.png
img_002.jpg
...
wechat_to_md/
__init__.py # Package init, public API
errors.py # CaptchaError, NetworkError, ParseError
utils.py # Logging, filename sanitizer, timestamp, image ext inference
scraper.py # Camoufox + networkidle + retry with exponential backoff
parser.py # BeautifulSoup: metadata, code blocks, media, noise removal
converter.py # markdownify + YAML frontmatter + image URL replacement
downloader.py # httpx async + retry per image + Content-Type inference
cli.py # argparse CLI with batch support
mcp_server.py # FastMCP server with convert_article / batch_convert
main.py # CLI entry point
mcp_server.py # MCP server entry point
SKILL.md # AI skill definition
| Problem | Solution |
|---|---|
| CAPTCHA / verification page | Run with --no-headless to solve manually |
| Empty content | WeChat may be rate-limiting; wait and retry |
| Image download failures | Failed images keep remote URLs; re-run with --force |
MIT
一个模块化的