Skip to main content
Glama
BlogDistiller · 博萃 MCP Server

BlogDistiller · 博萃 MCP Server

by yibeigen

BlogDistiller · 博萃 MCP Server

让 AI 智能体帮你抓取、下载、备份、导出全网中文博文:微信公众号历史文章批量下载、知乎博主全部文章/回答导出、微博内容备份、CSDN 免登录下载、掘金文章转 PDF、简书/新浪博客/搜狐号/百家号/51CTO/博客园一键归档——穿透反爬、去噪去水印、直出 Markdown/PDF/Word/HTML/ZIP,构建 Obsidian 知识库与 RAG 语料库。

本地优先(Local-First)架构,数据与登录态全部留在你自己电脑。一次接入,即可在 WorkBuddy、Trae、Qoder、Cherry Studio、Claude、Cursor、Dify、FastGPT 等全部支持 MCP 的 AI 客户端中使用。

  • 上游核心引擎:wechat-article-exporter(BlogDistiller · 博萃)

  • 原作者 / 公众号:艺杯羹 (Yibeigen) · 微信搜索【艺杯羹】

  • 协议:CC BY-NC-SA 4.0(与上游一致,禁止商业营利用途)

  • SDK 基准:mcp>=2.3.0,<3.0.0 · Python >=3.10

  • 开发规格:见 DEVELOPMENT_SPEC.md

能做什么(典型场景)

  • 📥 批量下载公众号历史文章 / 合集全部推文,转 Markdown 或离线 PDF

  • 📚 导出知乎博主全部文章、回答、想法(含专栏分组打包)

  • 💾 微博博主内容备份(长文自动展开全文)

  • ⚡ CSDN / 51CTO / 百家号免登录抓取,自动穿透 521 加速乐 / JS 质询 / TLS 指纹拦截

  • 🗂 千篇级博主全量归档:自动分批、断点续跑、按专栏/栏目分组 ZIP

  • 🧠 RAG 语料清洗:纯文本模式(无图)、去广告引流语、本地 SQLite 语料检索

Related MCP server: zhiwei

支持平台

平台

单篇抓取

博主/合集目录

登录态

微信公众号

✅

✅(公开合集)

单篇免登录

知乎

✅(文章/回答/想法)

✅

全量目录建议 z_c0

微博

✅(单条自动补齐 mblog)

✅

全量/长文需 SUB

新浪博客

✅

✅

免登录

简书

✅

✅

免登录

搜狐号

✅(自动解密图片)

✅

免登录

百家号

✅(Playwright 兜底)

✅

免登录

CSDN

✅(穿透 521)

✅

免登录

51CTO

✅(穿透 JS 质询)

✅

免登录

掘金

✅(官方 API 优先)

✅

免登录

博客园

✅

✅

免登录

通用网页

✅(兜底解析)

—

免登录

安装

# 源码目录安装(推荐 uv)
git clone https://github.com/yibeigen/blogdistiller-mcp.git
cd blogdistiller-mcp
uv sync

# 需要知乎/百家号/51CTO/掘金的浏览器兜底时安装 Chromium
uv run playwright install chromium

上游引擎:本 MCP 通过延迟导入复用博萃源码仓库(零代码拷贝)。默认自动探测 E:\Tools\Web\下载各个平台,也可用环境变量 BLOGDISTILLER_REPO_PATH 显式指定。

配置(环境变量)

变量

默认值

说明

BLOGDISTILLER_REPO_PATH

自动探测

博萃源码仓库根目录(含 backend/app)

BLOGDISTILLER_DATA_DIR

<REPO>/data 或 ~/.blogdistiller/data

缓存库与登录态;与桌面端指向同一目录即可共享

BLOGDISTILLER_OUTPUT_DIR

~/Downloads/BlogDistiller-MCP

导出默认落盘目录

BLOGDISTILLER_ALLOWED_OUTPUT_ROOTS

输出目录 + ~/Downloads

文件写入白名单(系统路径分隔符分隔)

BLOGDISTILLER_MAX_CONCURRENCY

3(1..8)

批量抓取并发上限

BLOGDISTILLER_MAX_EXPORT_JOBS

2(1..4)

同时运行的导出任务上限

BLOGDISTILLER_DEFAULT_MAX_CHARS

30000

单篇默认返回字符数

BLOGDISTILLER_BATCH_TOTAL_CHAR_BUDGET

60000

批量响应总字符预算

BLOGDISTILLER_CATALOG_TTL_SECONDS

1800

目录缓存 TTL(30 分钟)

BLOGDISTILLER_ALLOW_PRIVATE_NETWORK

false

仅本地测试时显式开启私网抓取

BLOGDISTILLER_LOG_LEVEL

INFO

stderr 日志级别

启动

# 1. 默认 stdio(供 WorkBuddy / Trae / Qoder / Cherry Studio / Claude / Cursor 等拉起)
blogdistiller-mcp

# 2. 指定上游仓库与共享数据目录
blogdistiller-mcp --repo-path "E:\Tools\Web\下载各个平台" --data-dir "E:\Tools\Web\下载各个平台\data"

# 3. Streamable HTTP(供 Dify / FastGPT 接入;默认仅绑定 127.0.0.1:8765)
blogdistiller-mcp --transport streamable-http --host 127.0.0.1 --port 8765

⚠️ 安全警示:--host 0.0.0.0 会把本地缓存与文件写入能力暴露到网络,CLI 会输出警告;默认严禁监听公网地址。

国内 AI 客户端接入(WorkBuddy / Trae / Qoder 等)

所有客户端的 MCP 配置都是同一段 mcpServers JSON,只是入口不同:

通用配置(复制这段)

{
  "mcpServers": {
    "blogdistiller": {
      "command": "uv",
      "args": [
        "--directory",
        "E:\\Tools\\MCP\\博萃MCP",
        "run",
        "blogdistiller-mcp"
      ],
      "env": {
        "BLOGDISTILLER_REPO_PATH": "E:\\Tools\\Web\\下载各个平台",
        "BLOGDISTILLER_DATA_DIR": "E:\\Tools\\Web\\下载各个平台\\data"
      }
    }
  }
}

路径按你的实际安装位置修改。也可把 command 直接指向 .venv\Scripts\blogdistiller-mcp.exe(无需 uv)。

各客户端配置入口

客户端

入口

说明

WorkBuddy(腾讯)

设置 → MCP / 技能管理

支持 MCP + Skills;本仓库 skills/blogdistiller/SKILL.md 可直接导入为技能(兼容 OpenClaw Skill 生态),MCP + Skill 组合调用成功率更高

Trae(字节)

头像 → 设置 → MCP → 手动添加

粘贴上面 JSON;项目级配置放 .trae/mcp.json,需在设置中启用项目级 MCP

Qoder(阿里)

设置 → MCP 面板 → 添加服务器

粘贴 JSON;CLI 用户:qoder mcp add blogdistiller -- uv --directory "E:\Tools\MCP\博萃MCP" run blogdistiller-mcp

Cherry Studio

设置 → MCP 服务器 → 添加

粘贴 JSON,类型选 stdio

Claude Desktop / Cursor / Windsurf / Cline

各自 mcp.json / MCP 设置

同一段 JSON 通用

Claude Code

命令行一键注册

claude mcp add blogdistiller -- uv --directory "E:\Tools\MCP\博萃MCP" run blogdistiller-mcp

提示:MCP 工具调用需处于智能体 / Agent 模式(纯问答模式不会调用工具)。

Streamable HTTP 客户端(Dify / FastGPT / 自定义 Client)

  • Endpoint:http://127.0.0.1:8765/mcp

11 个核心工具

工具

用途

list_platforms

平台能力矩阵与本机环境状态

fetch_article

单篇正文直取(去噪 Markdown + 元数据;分片续读 / 完整落盘)

fetch_articles_batch

1~20 篇批量精读(字符预算防上下文爆炸)

list_author_articles

博主/合集目录检索(服务端分页缓存 catalog_id)

start_export_task

异步批量导出 MD/PDF/Word/HTML/TXT + ZIP

get_export_task

查询进度与产物本地真实路径(支持短等待)

control_export_task

暂停/恢复/取消/截断导出/中断续跑管理

check_auth_status

检查知乎/微博/微信登录态(严格脱敏)

sync_platform_auth

本机浏览器 Cookie 同步 / 扫码登录 / 注销

search_cached_articles

本地历史文章零网络检索

activate_software

一次性激活批量检索/导出(口令与桌面客户端互通,永久有效)

激活说明:批量检索与导出需一次性激活(防滥用门槛,与桌面客户端同款口令)。 免费获取:微信公众号【艺杯羹】发送「文章」领 4 位口令。桌面客户端激活过的用户 MCP 自动共享激活状态,零重复验证; 单篇抓取、批量阅读、缓存检索无需激活。作者/CI 可设 BLOGDISTILLER_DISABLE_ACTIVATION=1 关闭门槛。

Resources:blogdistiller://platforms、blogdistiller://cache/stats、blogdistiller://activation/qrcode(公众号二维码,激活引导用) Prompts:research_blogger(研究博主)、archive_to_knowledge_base(归档知识库)

配套最佳实践工作流见 skills/blogdistiller/SKILL.md。

安全设计

  • SSRF 防护:仅 http/https;拒绝内网/回环/链路本地/云元数据地址(含 DNS 解析校验与超时保护)

  • 路径白名单:所有落盘路径必须在 BLOGDISTILLER_ALLOWED_OUTPUT_ROOTS 内,防路径穿越

  • 凭据脱敏:Cookie / z_c0 / SUB / pass_ticket 等绝不写入日志或工具返回值

  • stdout 零污染:stdio 模式下 stdout 仅承载 JSON-RPC;上游 120+ 处 print() 全部重定向 stderr

  • 死锁化解:批量导出遇部分失败自动按策略决策,绝不无限等待人工确认

测试

uv run pytest                     # 全量离线测试(151 项)
uv run pytest -m live             # 真实联网冒烟(CSDN/掘金/博客园,需上游引擎)

许可与署名

本项目遵循 CC BY-NC-SA 4.0。上游引擎版权归 艺杯羹 (Yibeigen) 所有, 原仓库 https://github.com/yibeigen/wechat-article-exporter。 抓取内容知识产权归原作者及原发布平台所有,仅供个人离线学习与学术交流,严禁商业用途。

Available Tools

11 tools
activate_softwareA
Idempotent

一次性激活博萃批量检索与导出功能(永久有效,与桌面客户端共享激活状态)。口令免费获取:微信公众号【艺杯羹】后台发送「文章」。已在桌面客户端激活过的用户无需调用本工具。单篇抓取/批量阅读/缓存检索不需要激活。

Inputs: code (required). Returns: 安全约束:绝不回显口令本体。

check_auth_statusA
Read-onlyIdempotent

检查知乎/微博/微信的本地登录态是否有效(只返回脱敏状态,绝不回显 Cookie/Token)。知乎全量主页、微博长文与深翻页需要登录态。

Inputs: platform. Returns: statuses

control_export_taskB

控制导出任务:pause/resume/cancel/stop_and_export(截断并立即导出已抓部分),以及 list_active/list_incomplete/resume_incomplete/discard_incomplete 管理中断续跑。

Inputs: action (required), task_id. Returns: ok, tasks, action, message, +1 more

fetch_articleA
Idempotent

抓取单篇文章的去噪正文(Markdown)与结构化元数据。支持微信公众号/知乎/微博/简书/新浪博客/搜狐号/百家号/CSDN/51CTO/掘金/博客园与通用网页。长文自动分片(truncated + next_offset 续读),可选 save_to_path 完整落盘。单篇绝不触发博主全量溯源。

Inputs: url (required), offset, platform, max_chars, +6 more. Returns: url, tags, title, author, +14 more

fetch_articles_batchA
Idempotent

批量抓取 1~20 篇文章正文(支持跨平台混合)。单篇限长 + 总字符预算双重防上下文爆炸;超预算篇目仅返回元数据并提示用 fetch_article 单篇续读。超过 20 篇请改用 start_export_task。

Inputs: urls (required), use_cache, include_images, total_char_budget, +2 more. Returns: items, total, failed, succeeded, +1 more

get_export_taskA
Read-onlyIdempotent

查询导出任务进度与产物本地真实绝对路径。wait_seconds 可短等待(最多 25 秒),任务完成立即返回。completed 后 files 内含各格式文件路径与字节大小。

Inputs: task_id (required), wait_seconds. Returns: files, status, message, task_id, +13 more

list_author_articlesA
Read-onlyIdempotent

检索博主主页或微信公众号合集的文章目录(服务端分页缓存)。首次传 target 全量检索并返回 catalog_id;后续翻页/关键词筛选/排序只传 catalog_id,毫秒级零重复请求。大博主绝不整表灌入上下文,先看目录再按需精读或导出。

Inputs: page, target, date_to, keyword, +7 more. Returns: page, items, author, has_more, +10 more

list_platformsB
Read-onlyIdempotent

列出博萃支持的 11+1 平台能力矩阵与本机环境状态(引擎加载、Playwright、缓存统计)

Inputs: no named parameters. Returns: platforms, environment

search_cached_articlesA
Read-onlyIdempotent

检索本地已缓存的历史文章(零网络)。按标题/作者/正文模糊搜索,支持平台与作者过滤。看全文时把结果里的 url 传给 fetch_article(use_cache=True) 即可毫秒级获取。

Inputs: limit, query, author, offset, +1 more. Returns: items, by_platform, total_cached, total_matched

start_export_taskA

启动异步批量导出任务(Markdown/PDF/Word/HTML/TXT + 双模态 ZIP 归档)。长耗时任务立即返回 task_id,用 get_export_task 轮询。支持博主主页、微信合集、catalog_id 精选或显式 URL 列表。部分抓取失败按 on_partial_failure 自动决策,绝不挂起等待人工确认。

Inputs: target, date_to, platform, date_from, +16 more. Returns: status, message, task_id, platform, +1 more

sync_platform_authA

同步或重置平台本地登录态。sync_browser 从本机 Edge/Chrome 解密同步(推荐零摩擦,仅 Windows);qr_login 弹本机浏览器窗口扫码(需图形界面,最多等 120 秒);logout 清除本地凭证。所有返回均脱敏。调用前请征得用户同意。

Inputs: method (required), platform (required). Returns: 安全约束:严禁包含 cookie/token/z_c0/SUB 等任何凭据明文!

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 11 tools

    Disambiguation4/5

    Tools are mostly distinct: single vs batch fetch, cached search vs author catalog listing, and the export lifecycle (start/get/control) are clearly separated. The slight overlap between fetch_article(use_cache=True) and search_cached_articles is explicitly explained in descriptions, but the relationship still requires careful reading.

    Naming Consistency5/5

    Consistent snake_case verb_noun pattern throughout (list_platforms, fetch_article, check_auth_status, start_export_task, etc.). The export trio (start/get/control_export_task) follows a predictable lifecycle naming scheme.

    Tool Count5/5

    11 tools is well within the ideal 3-15 range and each maps to a distinct capability (platform listing, fetching, caching, auth, export lifecycle, activation). No obvious redundancy or padding.

    Completeness4/5

    Covers the full workflow: discovery, single/batch fetch, local cache search, author catalog, auth check/sync, export lifecycle, and activation. Minor gaps like cache management/cleanup or catalog refresh exist, but core read/export/auth lifecycles are well covered.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Provides AI agents with a read-only, local-first depth layer into Chinese web platforms—Zhihu, Weibo, and WeChat Official Accounts—offering hot lists, Q&A, posts, clean article markdown, plus opinion aggregation and TextRank summaries.
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables AI Agents to retrieve WeChat public-account article content from HTTPS links, returning the title, account name, and full plain text while saving HTML and TXT archives locally. It is subject to WeChat verification, login, and paywall limits.
      1
      1
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to turn a single Markdown document into platform-ready output — WeChat Official Account inline-styled rich text, Zhihu HTML, Xiaohongshu 1080×1440 card sets with covers, split X/Threads/Bluesky/LinkedIn threads, long images, and rendered covers. Also supports AI-assisted captions and creating WeChat draft posts via the official API, plus listing available themes and styles.
      12
      MIT