mineru-pdfParse PDF documents with MinerU MCP to extract text, tables, and formulas. Supports multiple backends including MLX-accelerated inference on Apple Silicon.
Install via ClawdBot CLI:
clawdbot install Etoile04/mineru-pdfParse PDF documents using MinerU MCP to extract structured content including text, tables, and formulas with MLX acceleration on Apple Silicon.
claude mcp add --transport stdio --scope user mineru -- \
uvx --from mcp-mineru python -m mcp_mineru.server
This installs and configures MinerU for all Claude projects. Models are downloaded on first use.
The skill includes a direct parsing tool that saves output to a persistent directory:
python /Users/lwj04/clawd/skills/mineru-pdf/parse.py <pdf_path> <output_dir> [options]
Advantages:
# Parse entire PDF
python /Users/lwj04/clawd/skills/mineru-pdf/parse.py \
"/path/to/document.pdf" \
"/path/to/output"
# Parse specific pages
python /Users/lwj04/clawd/skills/mineru-pdf/parse.py \
"/path/to/document.pdf" \
"/path/to/output" \
--start-page 0 --end-page 2
# Use Apple Silicon optimization
python /Users/lwj04/clawd/skills/mineru-pdf/parse.py \
"/path/to/document.pdf" \
"/path/to/output" \
--backend vlm-mlx-engine
# Text only (faster)
python /Users/lwj04/clawd/skills/mineru-pdf/parse.py \
"/path/to/document.pdf" \
"/path/to/output" \
--no-table --no-formula
uvx --from mcp-mineru python -c "
import asyncio
from mcp_mineru.server import call_tool
async def parse_pdf():
result = await call_tool(
name='parse_pdf',
arguments={
'file_path': '/path/to/document.pdf',
'backend': 'pipeline',
'formula_enable': True,
'table_enable': True,
'start_page': 0,
'end_page': -1 # -1 for all pages
}
)
if hasattr(result, 'content'):
for item in result.content:
if hasattr(item, 'text'):
print(item.text)
break
asyncio.run(parse_pdf())
"
uvx --from mcp-mineru python -c "
import asyncio
from mcp_mineru.server import call_tool
async def list_backends():
result = await call_tool(
name='list_backends',
arguments={}
)
if hasattr(result, 'content'):
for item in result.content:
if hasattr(item, 'text'):
print(item.text)
break
asyncio.run(list_backends())
"
Required:
file_path - Absolute path to the PDF fileOptional:
backend - Processing backend (default: pipeline)pipeline - Fast, general-purpose (recommended)vlm-mlx-engine - Fastest on Apple Silicon (M1/M2/M3/M4)vlm-transformers - Slowest but most accurateformula_enable - Enable formula recognition (default: true)table_enable - Enable table recognition (default: true)start_page - Starting page (0-indexed, default: 0)end_page - Ending page (default: -1 for all pages)No parameters required. Returns system information and backend recommendations.
uvx --from mcp-mineru python -c "
import asyncio
from mcp_mineru.server import call_tool
async def parse_pdf():
result = await call_tool(
name='parse_pdf',
arguments={
'file_path': '/path/to/document.pdf',
'backend': 'pipeline',
'table_enable': True,
'start_page': 5,
'end_page': 10
}
)
if hasattr(result, 'content'):
for item in result.content:
if hasattr(item, 'text'):
print(item.text)
break
asyncio.run(parse_pdf())
"
uvx --from mcp-mineru python -c "
import asyncio
from mcp_mineru.server import call_tool
async def parse_pdf():
result = await call_tool(
name='parse_pdf',
arguments={
'file_path': '/path/to/document.pdf',
'backend': 'vlm-mlx-engine',
'formula_enable': True,
'table_enable': False # Disable for speed
}
)
if hasattr(result, 'content'):
for item in result.content:
if hasattr(item, 'text'):
print(item.text)
break
asyncio.run(parse_pdf())
"
uvx --from mcp-mineru python -c "
import asyncio
from mcp_mineru.server import call_tool
async def parse_pdf():
result = await call_tool(
name='parse_pdf',
arguments={
'file_path': '/path/to/document.pdf',
'backend': 'pipeline',
'formula_enable': False,
'table_enable': False,
'start_page': 0,
'end_page': 0
}
)
if hasattr(result, 'content'):
for item in result.content:
if hasattr(item, 'text'):
print(item.text)
break
asyncio.run(parse_pdf())
"
On Apple Silicon M4 (16GB RAM):
pipeline: ~32s/page, CPU-only, good qualityvlm-mlx-engine: ~38s/page, Apple Silicon optimized, excellent qualityvlm-transformers: ~148s/page, highest quality, slowestNote: First run downloads models (can take 5-10 minutes). Models are cached in ~/.cache/uv/ for faster subsequent runs.
Returns structured Markdown with:
.pdf).jpg, .jpeg).png)If you get "No module named 'mcp_mineru'", make sure you installed it:
claude mcp add --transport stdio --scope user mineru -- \
uvx --from mcp-mineru python -m mcp_mineru.server
This is normal. MinerU downloads ML models on first use. Subsequent runs will be much faster.
Increase timeout for large documents or use smaller page ranges for testing.
The MinerU MCP server uses Python's tempfile.TemporaryDirectory(), which automatically deletes files when the context exits. This is by design to prevent temporary files from accumulating.
Method A: Use the Direct Tool (Recommended)
The skill provides parse.py which saves files to a persistent directory:
python /Users/lwj04/clawd/skills/mineru-pdf/parse.py \
/path/to/input.pdf \
/path/to/output_dir
Advantages:
Generated Structure:
/path/to/output_dir/
โโโ input.pdf_name/
โ โโโ auto/ # or vlm/ depending on backend
โ โโโ input.pdf_name.md
โ โโโ images/
โ โโโ *.jpg
โโโ input.pdf_name_parsed.md # Copy at root for easy access
Method B: Redirect MCP Output
If using the MCP method, capture the output and save it:
# Capture to file
claude -p "Parse this PDF: /path/to/file.pdf" > /tmp/output.md
# Or use within a script that saves the result
| Feature | Direct Tool | MCP Method |
|----------|-------------|-------------|
| Files persisted | โ Yes | โ No (auto-deleted) |
| Custom output dir | โ Yes | โ No (temp only) |
| Claude Code integration | โ ๏ธ Manual | โ Native |
| Speed | โ Fast | โ ๏ธ MCP overhead |
| Offline use | โ Yes | โ ๏ธ Needs Claude Code |
Generated Mar 1, 2026
Researchers can extract text, tables, and formulas from academic PDFs to quickly gather data for literature reviews or meta-analyses. This accelerates data collection from sources like scientific journals and conference proceedings, enabling faster synthesis of findings.
Finance teams can parse quarterly reports, balance sheets, and regulatory filings to extract tabular data and textual insights for analysis. This automates data entry from PDF documents, reducing manual errors and saving time in financial modeling.
Law firms can use the skill to extract text and structured content from contracts, case files, and legal briefs for faster review and indexing. It helps in identifying key clauses, terms, and data points across large document sets.
Healthcare providers can parse patient records, lab reports, and medical forms stored as PDFs to extract text and tabular data for electronic health record systems. This supports data migration and improves accessibility of patient information.
Engineers and technicians can extract formulas, tables, and text from technical manuals, datasheets, and schematics for reference or integration into design software. This aids in product development and maintenance processes.
Offer a cloud-based PDF parsing service with tiered pricing based on usage volume, such as pages processed per month. This model targets businesses needing regular document processing, with features like API access and priority support.
Sell on-premise or custom licenses to large organizations for integration into their internal workflows, with options for Apple Silicon optimization. This includes dedicated support, training, and customization for specific use cases like legal or finance.
Provide a free tier for basic PDF text extraction with limited pages, while charging for advanced features like table/formula recognition, batch processing, and faster MLX acceleration. This attracts individual users and upsells to teams.
๐ฌ Integration Tip
Use the direct tool for persistent file output in production workflows, and leverage the MLX backend on Apple Silicon for optimal performance with complex documents.
Edit PDFs with natural-language instructions using the nano-pdf CLI.
Comprehensive PDF manipulation toolkit for extracting text and tables, creating new PDFs, merging/splitting documents, and handling forms. When Claude needs to fill in a PDF form or programmatically process, generate, or analyze PDF documents at scale.
Convert documents and files to Markdown using markitdown. Use when converting PDF, Word (.docx), PowerPoint (.pptx), Excel (.xlsx, .xls), HTML, CSV, JSON, XML, images (with EXIF/OCR), audio (with transcription), ZIP archives, YouTube URLs, or EPubs to Markdown format for LLM processing or text analysis.
็จ MinerU API ่งฃๆ PDF/Word/PPT/ๅพ็ไธบ Markdown๏ผๆฏๆๅ ฌๅผใ่กจๆ ผใOCRใ้็จไบ่ฎบๆ่งฃๆใๆๆกฃๆๅใ
Generate hand-drawn style diagrams, flowcharts, and architecture diagrams as PNG images from Excalidraw JSON
The awesome PPT format generation tool provided by baidu.