🦀 ClawHub
Wechat Article For Ai
by @soar999
Convert WeChat Official Account (微信公众号) articles to clean Markdown files with locally downloaded images.
💡 Examples
CLI (single article)
python main.py "https://mp.weixin.qq.com/s/ARTICLE_ID"
CLI (batch from file)
python main.py -f urls.txt -o ./output -v
CLI Options
| Flag | Description |
|------|-------------|
| -f FILE | Text file with URLs (one per line) |
| -o DIR | Output directory (default: ./output) |
| -c N | Image download concurrency (default: 5) |
| --no-images | Skip image download, keep remote URLs |
| --no-headless | Show browser (for solving CAPTCHAs) |
| --force | Overwrite existing output |
| --no-frontmatter | Use blockquote metadata instead of YAML |
| -v | Verbose/debug logging |
MCP Server
Run as an MCP server for AI tool integration:
python mcp_server.py
Exposes two tools:
convert_article(url, output_dir, download_images, concurrency, use_frontmatter) — Convert a single articlebatch_convert(urls, output_dir, download_images, concurrency) — Convert multiple articlesMCP Configuration (for claude_desktop_config.json or similar)
{
"mcpServers": {
"wechat-to-md": {
"command": "python",
"args": ["mcp_server.py"],
"cwd": ""
}
}
}
⚙️ Configuration
pip install -r requirements.txtTERMINAL
clawhub install wechat-article-for-ai