How opendatalab/mineru-document-explorer works
MinerU Document Explorer is an agent-oriented document knowledge engine. Users add document collections, which are indexed for cross-collection retrieval; agents can also deep-read individual documents and compile or maintain a linked wiki. CLI and MCP are separate access surfaces. The graph preserves the documented capabilities and the substantial query-expansion fine-tuning modules. Several implementation files are unsampled, so their internal links are omitted unless supported by the README or SOURCE INDEX references.
Main entry points: store.ts Document Store · wiki.ts Wiki Tools · index.ts MCP Tool Suites · train.py Model Training
Components 22
Agent Access
- CLI
src/cli/qmd.ts - MCP Server
src/mcp/server.ts - MCP Tool Suites
src/mcp/tools/index.ts - SDK
src/index.ts
Document Processing
- Collections
src/collections.ts - Indexing and Chunking
src/backends/indexing.ts - Format Backends
src/backends/registry.ts - Deep Read
src/mcp/tools/document.ts - Document Store
src/store.ts - SQLite Database
src/db.ts
Search and Retrieval
- Query Parser
src/query-parser.ts - Search
src/search.ts - Hybrid Retrieval
src/hybrid-search.ts - Local LLMs
src/llm.ts
Wiki Knowledge
- Wiki Tools
src/mcp/tools/wiki.ts - Wiki Index Generation
src/wiki/index-gen.ts - Wiki Link Analysis
src/wiki/lint.ts - Wiki Activity Log
src/wiki/log.ts
Query Fine-tuning
- Dataset Schema
finetune/dataset/schema.py - Expansion Scoring
finetune/reward.py - Model Training
finetune/train.py
Other components
- Agent / User
Connections 23
- Agent / User → CLI: uses
README.md - Agent / User → MCP Server: connects via MCP
README.md - Agent / User → SDK: uses programmatically
src/index.ts - CLI → Document Store: indexes and searches
src/cli/qmd.ts - MCP Server → MCP Tool Suites: registers tools
src/mcp/server.ts - MCP Tool Suites → Wiki Tools: includes
src/mcp/tools/index.ts - MCP Tool Suites → Deep Read: includes
src/mcp/tools/index.ts - Collections → Document Store: configures
src/collections.ts - Document Store → SQLite Database: opens and queries
src/store.ts - Document Store → Indexing and Chunking: uses
src/store.ts - Document Store → Format Backends: selects format backend
src/store.ts - Document Store → Search: uses
src/store.ts - Document Store → Hybrid Retrieval: uses
src/store.ts - Search → Local LLMs: uses
src/search.ts - Hybrid Retrieval → Local LLMs: uses
src/hybrid-search.ts - Query Parser → Document Store: produces search queries
src/query-parser.ts - Wiki Tools → Wiki Index Generation: generates index
src/mcp/tools/wiki.ts - Wiki Tools → Wiki Link Analysis: uses
src/mcp/tools/wiki.ts - Wiki Tools → Wiki Activity Log: records and reads log
src/mcp/tools/wiki.ts - Wiki Tools → Document Store: reads and writes documents
src/mcp/tools/wiki.ts - Dataset Schema → Expansion Scoring: scores formatted examples
- Model Training → Expansion Scoring: uses scoring
finetune/train.py - Model Training → Dataset Schema: uses schema