MinerU Open MCP

io.github.opendatalab由 GitHub 帳號 opendatalab 發布v1.0.20更新於 Oct 24, 2026

Parse PDFs, images, doc, docx, ppt, pptx, xls, xlsx, html into Markdown using MinerU API.

已驗證STDIO僅桌面檔案與儲存知識與記憶

概覽

AI 產生的概覽

一個本機 MCP 伺服器,讓助理透過 MinerU 雲端解析 API 把 PDF、Office 檔案、圖片和 HTML 轉成 Markdown。

可以做什麼
把 PDF、DOCX、PPTX、XLSX、圖片和 HTML 檔案解析為 Markdown,公式轉為 LaTeX、表格轉為 HTML,使用 MinerU 雲端 API,可選免費 Flash 模式或需權杖的精確模式(更高額度、支援 JSON、DOCX、HTML、LaTeX 等額外輸出格式)。列出服務支援的 109 種 OCR 語言。把解析結果儲存到本機輸出目錄。啟用記錄時可刪除舊的伺服器日誌檔。
適用情境
適合助理需要讀取或摘要非純文字文件的場合,例如掃描版 PDF、多欄論文、簡報或試算表,也適合把解析內容送入 RAG 或知識庫流程。小檔案快速預覽用 Flash 模式即可;長文件或大檔案適合精確模式。
執行需求
以 Python 套件形式在本機執行(例如透過 uvx),需桌面用戶端。需要連線至 MinerU 雲端 API 的網路。MINERU_API_TOKEN 為選用:未設定時使用免費 Flash 模式(僅 Markdown,單檔最多 20 頁、10 MB);設定後可用更大檔案、批次處理和額外輸出格式。OUTPUT_DIR 指定結果儲存位置。
安裝前請注意
文件會上傳到 MinerU 雲端服務解析,請勿傳送機密或受監管資料。API 權杖屬於機密,透過 MINERU_API_TOKEN 傳入,避免寫入共用設定檔。伺服器會將解析檔案寫入磁碟,啟用記錄時還會刪除舊日誌檔。免費 Flash 模式依 IP 限流,並有大小和頁數上限。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 MinerU Open MCP,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

MinerU-Ecosystem

The official ecosystem toolkit for MinerU Open API

Empowering developers and AI agents with seamless document parsing capabilities — PDF · Word · PPT · Images · Web pages → Markdown / JSON · VLM+OCR dual engine · 109 languages · MCP Server · LangChain / RAGFlow / Dify / FastGPT native integration.

[License] [MinerU] [Online]

中文文档


📖 Overview

MinerU-Ecosystem provides a full suite of tools, SDKs, and integrations built on top of the MinerU Open API. Whether you're building production pipelines, integrating with LangChain for RAG, or enabling AI agents to parse documents on the fly — this repository has you covered.

MinerU is an open-source, high-accuracy document parsing engine that converts unstructured documents (PDFs, images, Office files, etc.) into machine-readable Markdown and JSON, purpose-built for LLM pre-training, RAG, and agentic workflows.

Core capabilities:

  • Formulas → LaTeX · Tables → HTML, accurate complex layout reconstruction
  • Supports scanned docs, handwriting, multi-column layouts, cross-page table merging
  • Output follows human reading order with automatic header/footer removal
  • VLM + OCR dual engine, 109-language OCR recognition

🏗️ Repository Structure

MinerU-Ecosystem/├── cli/                  # Command-line tool for document parsing├── sdk/                  # Multi-language SDKs│   ├── python/           #   Python SDK│   ├── go/               #   Go SDK│   └── typescript/       #   TypeScript SDK├── langchain_mineru/     # LangChain document loader integration├── llama-index-readers-mineru/     # LlamaIndex document reader integration├── mcp/                  # Model Context Protocol server (Python)└── skills/               # AI agent skills (Claude Code, OpenClaw, etc.)

🔑 Supported APIs

All components support both API modes:

Comparison🎯 Precision Extract API⚡ Quick Parse API (Agent-Oriented)
Auth✅ Token required❌ Not required (IP rate-limited)
Model Versionspipeline (default) / vlm (recommended) / MinerU-HTMLFixed lightweight pipeline model
File Size Limit≤ 200 MB≤ 10 MB
Page Limit≤ 200 pages≤ 20 pages
Batch Support✅ Supported (≤ 200 files)❌ Single file only
Output FormatsMarkdown, JSON, Zip; optional export to DOCX / HTML / LaTeXMarkdown only

🧭 Choose Your Integration Path

Not sure where to start? Pick the path that matches your use case:

text
I want to...│├── 🌐 Try it instantly, with no install and no code│   └── Web App → https://mineru.net/OpenSourceTools/Extractor│├── 💻 Parse documents from the terminal│   └── CLI → cli/│       flash-extract: no token, best for quick previews│       extract: full features, better for production workflows│├── 🐍 Integrate it into my Python / Go / TypeScript project│   └── SDK → sdk/python/ | sdk/go/ | sdk/typescript/│├── 🤖 Enable my AI agent to parse documents│   ├── Call the CLI directly → cli/│   ├── Use natural-language skills (OpenClaw, ZeroClaw, etc.) → skills/│   └── Use MCP protocol (Cursor, Claude Desktop, Windsurf, etc.) → mcp/│├── 📚 Build a RAG pipeline / knowledge base│   ├── LangChain Loader → langchain_mineru/│   └── LlamaIndex Reader → llama-index-readers-mineru/│       flash mode: zero-token quick start│       precision mode: OCR, tables, formulas, and higher fidelity

🚀 Quick Start

💻 CLI (cli/)

A fast command-line tool for parsing documents directly from your terminal.

Installation
bash
# Linux / macOScurl -fsSL https://cdn-mineru.openxlab.org.cn/open-api-cli/install.sh | sh
powershell
# Windows (PowerShell)irm https://cdn-mineru.openxlab.org.cn/open-api-cli/install.ps1 | iex

Flash Extract (no login)

bash
mineru-open-api flash-extract report.pdf

Precision Extract (login required)

bash
# First-time setupmineru-open-api auth
# Extract to stdoutmineru-open-api extract paper.pdf
# Save all resources (images/tables) to directorymineru-open-api extract report.pdf -o ./output/
# Export to multiple formatsmineru-open-api extract report.pdf -f docx,latex,html -o ./results/

Web Crawl

bash
mineru-open-api crawl https://www.example.com

Batch Processing

bash
# All PDFs in current directorymineru-open-api extract *.pdf -o ./results/
# From a file listmineru-open-api extract --list filelist.txt -o ./results/

🐍 Python SDK

Installation
bash
pip install mineru-open-sdk

Flash Extract (no token)

python
from mineru import MinerU
client = MinerU()result = client.flash_extract("https://cdn-mineru.openxlab.org.cn/demo/example.pdf")print(result.markdown)

Precision Extract (token required)

python
from mineru import MinerU
client = MinerU("your-api-token")result = client.extract("https://cdn-mineru.openxlab.org.cn/demo/example.pdf")print(result.markdown)print(result.images)  # extracted image list

🐹 Go SDK

Installation
bash
go get github.com/opendatalab/MinerU-Ecosystem/sdk/go@latest

Flash Extract

go
package main
import (    "context"    "fmt"    mineru "github.com/opendatalab/MinerU-Ecosystem/sdk/go")
func main() {    client := mineru.NewFlash()    result, err := client.FlashExtract(        context.Background(),        "https://cdn-mineru.openxlab.org.cn/demo/example.pdf",    )    if err != nil {        panic(err)    }    fmt.Println(result.Markdown)}

Precision Extract

go
client, err := mineru.New("your-api-token")if err != nil {    panic(err)}result, err := client.Extract(    context.Background(),    "https://cdn-mineru.openxlab.org.cn/demo/example.pdf",)if err != nil {    panic(err)}fmt.Println(result.Markdown)

Precision Extract with options

go
result, err := client.Extract(ctx, "./paper.pdf",    mineru.WithModel("vlm"),    mineru.WithLanguage("en"),    mineru.WithPages("1-20"),    mineru.WithExtraFormats("docx"),    mineru.WithPollTimeout(10*time.Minute),)if err != nil {    panic(err)}if err := result.SaveAll("./output"); err != nil {    panic(err)}

Batch Processing

go
ch, err := client.ExtractBatch(ctx, []string{"a.pdf", "b.pdf"})if err != nil {    panic(err)}for result := range ch {    fmt.Printf("%s: %s\n", result.Filename, result.State)}

Web Crawling

go
result, err := client.Crawl(ctx, "https://www.example.com")if err != nil {    panic(err)}fmt.Println(result.Markdown)

🟦 TypeScript / JavaScript SDK

Installation
bash
npm install mineru-open-sdk

Flash Extract

typescript
import { MinerU } from "mineru-open-sdk";
const client = new MinerU();const result = await client.flashExtract(  "https://cdn-mineru.openxlab.org.cn/demo/example.pdf");console.log(result.markdown);

Precision Extract

typescript
import { MinerU } from "mineru-open-sdk";
const client = new MinerU("your-api-token");const result = await client.extract(  "https://cdn-mineru.openxlab.org.cn/demo/example.pdf");console.log(result.markdown);console.log(result.images);

Precision Extract with options

typescript
import { MinerU, saveAll } from "mineru-open-sdk";
const client = new MinerU("your-api-token");const result = await client.extract("./paper.pdf", {  model: "vlm",       // "vlm" | "pipeline" | "html"  language: "en",  pages: "1-20",  extraFormats: ["docx"],  timeout: 600,});await saveAll(result, "./output");

Batch Processing

typescript
for await (const result of client.extractBatch(["a.pdf", "b.pdf"])) {  console.log(`${result.filename}: ${result.state}`);}

Web Crawling

typescript
const result = await client.crawl("https://www.example.com");console.log(result.markdown);

🤖 Use with Claude / Cursor (MCP Server)

MinerU provides an official MCP Server allowing Claude Desktop, Cursor, Windsurf, and any MCP-compatible AI client to parse documents as a native tool.

No API key needed — Flash mode works out of the box, free, up to 20 pages / 10 MB per file.

Configure: claude_desktop_config.json / .cursor/mcp.json

json
{  "mcpServers": {    "mineru": {      "command": "uvx",      "args": ["mineru-open-mcp"],      "env": {        "MINERU_API_TOKEN": "your_key_here"      }    }  }}

Streamable HTTP mode (web-based MCP clients)

bash
MINERU_API_TOKEN=your_key mineru-open-mcp --transport streamable-http --port 8001
json
{  "mcpServers": {    "mineru": {      "type": "streamableHttp",      "url": "http://127.0.0.1:8001/mcp"    }  }}

Tools exposed via MCP:

ToolDescription
parse_documentsConvert PDF, DOCX, PPTX, images, HTML to Markdown
get_ocr_languagesList all 109 supported OCR languages
clean_logsDelete old server log files (when ENABLE_LOG=true)

Environment Variables:

VariableDescriptionDefault
MINERU_API_TOKENMinerU cloud API token—
OUTPUT_DIRDirectory for saved output~/mineru-downloads
ENABLE_LOGSet true to write log filesdisabled
MINERU_LOG_DIROverride log file directory~/.mineru-open-mcp/logs/

🦜 Use in RAG with LangChain

langchain-mineru is an official LangChain Document Loader — parse any document into LangChain Document objects with one line of code.

Installation
bash
pip install langchain-mineru

Minimal example (no token)

1. Basic usage (flash mode by default, no token required)

python
from langchain_mineru import MinerULoader
loader = MinerULoader(source="demo.pdf")   # flash mode, no token neededdocs = loader.load()print(docs[0].page_content[:500])print(docs[0].metadata)

Default is mode="flash", which is ideal for quick previews and lightweight integrations.

2. Precision mode (token required)

Best for long documents, larger files, and workflows that need higher-fidelity extraction or standard API outputs. Flash mode also supports OCR, table, and formula switches within flash API limits.

python
from langchain_mineru import MinerULoader
loader = MinerULoader(    source="/path/to/manual.pdf",    mode="precision",    token="your-api-token",  # or set MINERU_TOKEN    split_pages=True,    pages="1-5",)
docs = loader.load()for doc in docs:    print(doc.metadata.get("page"), doc.page_content[:200])

3. Use it in a LangChain RAG pipeline

python
from langchain_mineru import MinerULoaderfrom langchain_text_splitters import RecursiveCharacterTextSplitterfrom langchain_openai import OpenAIEmbeddingsfrom langchain_community.vectorstores import FAISS
loader = MinerULoader(source="demo.pdf", split_pages=True)docs = loader.load()
splitter = RecursiveCharacterTextSplitter(chunk_size=1200, chunk_overlap=200)chunks = splitter.split_documents(docs)
vs = FAISS.from_documents(chunks, OpenAIEmbeddings())results = vs.similarity_search("What are the key conclusions in this document?", k=3)
for r in results:    print(r.page_content[:200])

Default is mode="flash" (no API token required). Switch to mode="precision" for higher fidelity with token auth. For RAG use cases, split_pages=True is usually a better default for PDFs because it gives you page-level Document granularity.

## Use in RAG with LlamaIndex

A document reader for LlamaIndex that parses PDFs, Word files, PPTs, images, and Excel files through MinerU and returns LlamaIndex-compatible Document objects for indexing and retrieval.

Installation
bash
pip install llama-index-readers-mineru
Usage

1. Flash mode (default, no token required)

Good for quick setup and lightweight parsing. Output is returned as Markdown.

python
from llama_index.readers.mineru import MinerUReader
reader = MinerUReader()documents = reader.load_data("https://cdn-mineru.openxlab.org.cn/demo/example.pdf")
print(documents[0].text[:500])print(documents[0].metadata)

2. Precision mode (token required)

Best for longer documents, larger files, and use cases that need higher-fidelity extraction or standard API outputs. Flash mode also supports OCR, formula, and table switches within flash API limits.

python
from llama_index.readers.mineru import MinerUReader
reader = MinerUReader(    mode="precision",    token="your-api-token",  # or set MINERU_TOKEN    pages="1-20",)documents = reader.load_data("/path/to/paper.pdf")

3. Use it in a LlamaIndex pipeline

python
from llama_index.core import VectorStoreIndexfrom llama_index.readers.mineru import MinerUReader
reader = MinerUReader(split_pages=True)documents = reader.load_data("/path/to/paper.pdf")
index = VectorStoreIndex.from_documents(documents)query_engine = index.as_query_engine()response = query_engine.query("Summarize the main findings of this document")print(response)

Default is mode="flash" with no token required. Switch to mode="precision" when you need higher parsing fidelity. For PDF-based RAG pipelines, split_pages=True is recommended so each page becomes a separate Document.


🤖 AI Agent Skills (skills/)

Pre-built skills for AI coding agents, wrapping the mineru-open-api CLI for use in agent workflows.


🔗 All Integrations

Framework / ToolStatusNotes
LangChain✅ Officialpip install langchain-mineru
LlamaIndex✅ CommunitySee MinerU-Ecosystem
RAGFlow✅ SupportedDocument loader integration
RAG-Anything✅ SupportedMulti-modal RAG pipeline
Flowise✅ SupportedNode-based RAG builder
Dify✅ Native PluginBuilt-in document loader
FastGPT✅ Native PluginIntegration guide
Claude Desktop✅ MCPuvx mineru-open-mcp
Cursor✅ MCP.cursor/mcp.json config
Windsurf✅ MCPstdio / streamable-http
OpenClaw / ZeroClaw✅ Agent SkillClawHub
Go SDK✅ Officialgo get .../sdk/go@latest
TypeScript SDK✅ Officialnpm install mineru-open-sdk
Python SDK✅ Officialpip install mineru-open-sdk

📚 Documentation

ResourceLink
MinerU Open API Docsmineru.net/apiManage/docs
MinerU Online Demomineru.net/OpenSourceTools/Extractor
MinerU Open Sourcegithub.com/opendatalab/MinerU

📄 License

This project is licensed under the Apache License 2.0.

來源:README.md,提交 95357b5

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.0.20最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分