doc-distillation-mcp
Recognizes Bilibili URLs as a source and provides guidance to use a video transcript MCP for extracting content before distillation.
Generates Obsidian notes with frontmatter, callouts, and structured content in the configured Obsidian vault, enabling distilled documents to be stored and linked within a knowledge base.
Recognizes Xiaohongshu URLs as a source and provides guidance for handling content via a mini-program approach before distillation.
Recognizes YouTube URLs as a source and provides guidance to use a video transcript MCP for extracting content before distillation.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@doc-distillation-mcp Distill this article into an Obsidian note: https://example.com/article"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Doc Distillation MCP Server
A Model Context Protocol server for document distillation with multi-source support, producing dual output: HTML distillation articles and Obsidian notes.
Features
Multi-source support: Feishu documents, webpages, PDFs, video/podcast transcripts, and local files
Dual output format: HTML distillation articles + Obsidian notes with frontmatter
Five-stage workflow: Source extraction → Integrity safeguard → Image filtering → HTML generation → Obsidian generation
Three-layer image filtering: Automatic rule filtering → Context prediction → Safety net
Key element detection: Formulas, data, templates, checklists, frameworks, tables, warnings, quotes
Structure skeleton: Heading-based document outline for integrity verification
Sync & Async modes: Direct results for small documents, task polling for large ones
Structured output: Pydantic-validated results with segments, images, and metadata
Related MCP server: Better Fetch
Quick Start
Install
pip install doc-distillation-mcp
# With dev tools (MCP Inspector, testing, linting)
pip install 'doc-distillation-mcp[dev]'Run
# Direct run
doc-distillation-mcp
# Or with uvx (no install needed)
uvx doc-distillation-mcp
# Debug with MCP Inspector
mcp dev doc_distillation_mcp.server:mcpPrerequisites (optional)
For PDF text extraction:
pip install pdfplumberMCP Client Configuration
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"doc-distillation": {
"command": "uvx",
"args": ["doc-distillation-mcp"]
}
}
}Cursor
Add to .cursor/mcp.json:
{
"mcpServers": {
"doc-distillation": {
"command": "uvx",
"args": ["doc-distillation-mcp"]
}
}
}Trae
Add to Trae MCP settings:
{
"mcpServers": {
"doc-distillation": {
"command": "python3",
"args": ["-m", "doc_distillation_mcp.server"]
}
}
}Claude Code
claude mcp add doc-distillation -- uvx doc-distillation-mcpTools
distill_url
Distill content from a URL into an HTML article + Obsidian note.
# Webpage (sync mode - direct result)
distill_url(url="https://example.com/article")
# With Obsidian subdirectory
distill_url(
url="https://example.com/deep-dive",
obsidian_subdir="飞书蒸馏"
)
# Large document (async mode - returns task_id)
distill_url(
url="https://example.com/long-report.pdf",
async_mode=True
)
# Then poll:
get_distill_status(task_id="abc12345")Parameters:
Parameter | Type | Default | Description |
| str | required | Document URL (Feishu, webpage, PDF, video) |
| str? | null | Subdirectory under Obsidian vault |
| bool | false | Return task_id for polling |
distill_file
Distill content from a local file.
# Text file (sync mode)
distill_file(file_path="/path/to/notes.txt")
# PDF file with Obsidian subdirectory
distill_file(
file_path="/path/to/report.pdf",
obsidian_subdir="PDF蒸馏"
)
# Large file (async mode)
distill_file(
file_path="/path/to/large.pdf",
async_mode=True
)Parameters:
Parameter | Type | Default | Description |
| str | required | Path to local file |
| str? | null | Subdirectory under Obsidian vault |
| bool | false | Return task_id for polling |
get_distill_status
Poll the status of an async distillation task.
get_distill_status(task_id="abc12345")
# Returns: {status: "completed", progress: 1.0, result: {...}}list_distillations
List all completed distillations.
list_distillations()
# Returns: [{task_id, title, source_type, method, segment_count, ...}]Five-Stage Workflow
URL / File Input
│
├─ Stage 1: Source Detection & Content Extraction
│ ├─ Feishu: Returns guidance (use lark-doc skill)
│ ├─ Webpage: HTML parsing (text, headings, images)
│ ├─ PDF: pdfplumber text extraction
│ ├─ Video/Podcast: Returns guidance (use video-transcript-mcp)
│ └─ Local file: Type-based extraction
│
├─ Stage 2: Integrity Safeguard
│ ├─ Structure skeleton (heading hierarchy)
│ └─ Key element detection (8 categories)
│
├─ Stage 2.5: Image Filtering (three-layer)
│ ├─ Layer 1: Automatic rules (size, URL keywords, duplicates, alt keywords)
│ ├─ Layer 2: Context prediction (nearby text indicates value)
│ └─ Layer 3: Safety net (near key elements)
│
├─ Stage 3: HTML Distillation Article Generation
│ └─ Styled HTML with header, content sections, footer
│
└─ Stage 4: Obsidian Note Generation
├─ Frontmatter (title, source, author, date, tags)
├─ Summary callout
├─ Content sections
├─ Image distillation callouts
└─ Key element statistics tableKey Element Detection
The distiller detects and counts 8 types of key elements to ensure content completeness:
Element | Description | Example Patterns |
| Calculation formulas |
|
| Numeric data | Percentages, amounts, multiples |
| Templates & scripts | Title formulas, word lists |
| Actionable lists | Numbered items, checkboxes |
| Mental models | Matrices, quadrants, methodologies |
| Tabular data | Markdown tables, comparison |
| Cautions & pitfalls | "Don't", "Avoid", "Pitfall" |
| Notable quotes | Long quoted text, key phrases |
Environment Variables
Variable | Default | Description |
|
| HTML output directory |
|
| Obsidian vault directory |
Supported Sources
Source | URL | Local File | Notes |
Webpage | ✅ | ✅ | HTML parsing with image extraction |
✅ | ✅ | Requires | |
Feishu | ✅ | N/A | Returns guidance (use lark-doc skill) |
YouTube | ✅ | N/A | Returns guidance (use video-transcript-mcp) |
Bilibili | ✅ | N/A | Returns guidance (use video-transcript-mcp) |
Douyin | ✅ | N/A | Returns guidance (use video-transcript-mcp) |
Xiaohongshu | ✅ | N/A | Returns guidance (mini-program) |
Text/Markdown | N/A | ✅ | Direct text extraction |
Audio/Video | N/A | ✅ | Returns guidance (use video-transcript-mcp) |
Community
Join our AI Tool Monetization Circle (AI 工具变现实战圈) on Knowledge Planet (知识星球):
Weekly MCP tutorials and real-world case studies
Deep-dive source code analysis of this project
AI tool monetization strategies and playbooks
1-on-1 technical Q&A
Scan the QR code below or search "AI 工具变现实战圈" on Knowledge Planet to join.

License
MIT
Available Tools
4 toolsdistill_fileA
Distill content from a local file into HTML article + Obsidian note.
Supports:
PDF files (.pdf)
HTML files (.html, .htm)
Text/Markdown files (.txt, .md)
Audio/Video files (.mp3, .m4a, .wav, .mp4 - returns guidance)
Output:
HTML distillation article saved to ~/Documents/蒸馏文稿/
Obsidian note saved to ~/Documents/obsidian/{subdir}/
Inputs: file_path (required), async_mode, obsidian_subdir.
distill_urlA
Distill content from a URL into HTML article + Obsidian note.
Supports:
Feishu documents (feishu.cn, larkoffice.com)
Webpages (any HTTP/HTTPS URL)
PDF files (.pdf URLs)
Video/podcast URLs (YouTube, Bilibili, etc. - returns guidance)
Output:
HTML distillation article saved to ~/Documents/蒸馏文稿/
Obsidian note saved to ~/Documents/obsidian/{subdir}/
For large documents, set async_mode=true and poll with get_distill_status.
Inputs: url (required), async_mode, obsidian_subdir.
get_distill_statusA
Check the status of an async distillation task.
Returns the task status, progress, and result (if completed). Poll this periodically until status is 'completed' or 'failed'.
Inputs: task_id (required).
list_distillationsA
List all completed distillations.
Returns a list of completed distillation tasks with metadata. Use get_distill_status with a task_id to get full content.
Inputs: no named parameters. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool has a clearly distinct purpose: distill_url and distill_file differ by input source (remote vs local), while get_distill_status and list_distillations handle task monitoring and history respectively. No overlapping responsibilities.
All tools follow a consistent verb_noun snake_case pattern: distill_url, distill_file, get_distill_status, list_distillations. The verbs appropriately reflect the action, and naming is uniform.
4 tools is a well-scoped set for a distillation service. It covers initiation (URL/file), status checking, and listing results without excess or deficiency.
Core distillation workflow is covered: create via URL/file, check async status, and list completed tasks. Minor gaps like lack of delete/cancel or retrieval of a specific completed task's content via a dedicated getter, but agents can work around using get_distill_status.
Maintenance
Related MCP Connectors
Document-to-Markdown MCP server — convert PDF, Office and HTML into LLM-ready Markdown.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Hosted MCP server: convert PDFs to clean, LLM-ready Markdown with tables, formulas and OCR.
Managed cloud RSS, Atom & JSON feed reader with a remote Model Context Protocol (MCP) endpoint. Zero server setup required — enables AI agents like Claude to instantly subscribe to feeds, search full-text articles, extract readable content, and access curated AI editions ("Your Newspaper") over secure streamable HTTP.
Related MCP Servers
- FlicenseBqualityDmaintenanceA Model Context Protocol server that enables LLMs to extract and use content from unstructured documents across a wide variety of file formats.111-
- AlicenseBqualityDmaintenanceA Model Context Protocol server that intelligently fetches and processes web content, transforming websites and documentation into clean, structured markdown with nested URL crawling capabilities.29 npm9MIT
- AlicenseBqualityDmaintenanceA Model Context Protocol server that enables AI assistants to securely fetch and extract readable text content from web pages through a standardized interface.1MIT
- AlicenseAqualityDmaintenanceA Model Context Protocol server that converts diverse file types, including PDFs, images, audio, and Office documents, into Markdown format. It also transforms web content like YouTube transcripts and Bing search results into readable text for model consumption.13MIT