Who it is forA developer building an internal tool that needs to search and quote from a folder of PDFs.
The problemRe-parsing documents every time a script runs is slow, and raw text loses where each passage came from.
The outcomeA local document library your code can parse into once, then search and read by page or block.
What you need first
- Python 3.11 to 3.14 in a virtual environment
- Windows, Linux or macOS; CPU works, compatible GPUs are used automatically
- Model downloads for the tier you choose
- Optional: Node.js for npx to install the agent skill
Steps
- Install MinerU 4.x as in the README and start the server with
mineru server start - In Python, create a
DoclibClientand submit a file withensure_parse, passing a ParseRequest with the path and tier - Poll each parse ID until its status is done, as the README example does
- Read content by locator with
read_content, for example page 1 of the standard tier - Use
mineru findto locate documents by filename; DoclibClient also covers search, watched directories and result invalidation
Prompt for your agent
Using opendatalab/MinerU, start the server and write a Python script with DoclibClient that parses every PDF in <folder>, waits for each parse, and prints page 1 of each with its locator. Then search the library for <phrase>.
Caveat. Documents are not uploaded to the official service by default; remote parsing only happens if you configure it.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for opendatalab/MinerU and "Search inside your parsed documents from Python"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer