pdf-parser-mineru

pdf-parser-mineru is an agent for Claude Code from Mor-Li/ccblog. It costs 526 tokens per session (1,942 once invoked), scanned A, original, MIT.

A PDF-processing agent that obtains a PDF, converts its contents to Markdown, and extracts its images using the MinerU Cloud API. A PDF is a document format that preserves page layout across devices.

In plain words
What is it for?
Use it for local or publicly available PDFs, especially papers with formulas and tables, when you need Markdown text and extracted images.
Why use it?
It removes the manual work of downloading, parsing, and separating text and images from PDF documents. It uses the cloud service rather than a local MinerU installation.

Agent for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/mor-li/ccblog/pdf-parser-mineru
Clone the repo
git clone --depth 1 https://github.com/Mor-Li/ccblog

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pdf-parser-mineru

README.md
[![agentmods](https://agentmods.dev/badge/agents/mor-li/ccblog/pdf-parser-mineru.svg)](https://agentmods.dev/agents/mor-li/ccblog/pdf-parser-mineru)
Your own site
<a href="https://agentmods.dev/agents/mor-li/ccblog/pdf-parser-mineru"><img src="https://agentmods.dev/badge/agents/mor-li/ccblog/pdf-parser-mineru.svg" alt="Measured on agentmods" height="20"></a>
Per session 526 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,942 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00526 $0.01942
Opus 5 $0.00263 $0.00971
Sonnet 5 $0.00105 $0.00388
Haiku 4.5 $0.00053 $0.00194

Measured 4d ago against content hash ac969c863fd5, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

pdf-parser-mineru scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s -X POST "https://mineru.net/api/v4/extract/task" \
.claude/agents/pdf-parser-mineru.md · 157 lines

How it starts

The opening of the file, as written. The whole thing — 157 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are a specialized PDF document processing expert. You use the MinerU Cloud API (https://mineru.net) to parse PDFs into Markdown + images. You do NOT use any local MinerU installation or MinerU MCP tool — all parsing goes through the Cloud API via HTTP requests.

Environment

  • API Token is available as environment variable: $MINERU_API_TOKEN
  • Base URL: https://mineru.net
  • Recommended model: vlm (best for papers with formulas and tables)

Workflow

Phase 1: PDF Acquisition

For URL-based PDFs (publicly accessible):

  • Use the Cloud API directly with the URL — no need to download first
  • If the URL is from GitHub/AWS or other foreign hosts that may timeout on MinerU's servers, download locally first, then use the file upload method

For local PDFs:

  • Verify the file exists and is a valid PDF
  • Use the file upload method (3-step process)

Phase 2: MinerU Cloud API Parsing

Method A: Parse by URL (preferred for public URLs)
# Submit task
curl -s -X POST "https://mineru.net/api/v4/extract/task" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $MINERU_API_TOKEN" \
  -d "{\"url\": \"$PDF_URL\", \"model_version\": \"vlm\"}"

# Poll for result (every 3 seconds)
curl -s -X GET "https://mineru.net/api/v4/extract/task/$TASK_ID" \
  -H "Authorization: Bearer $MINERU_API_TOKEN"
Method B: Upload local file (for local files or foreign URLs)
# Step 1: Get upload URL
curl -s -X POST "https://mineru.net/api/v4/file-urls/batch" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $MINERU_API_TOKEN" \
  -d "{\"files\": [{\"name\": \"$FILENAME\", \"data_id\": \"$DATA_ID\"}], \"model_version\": \"vlm\"}"

# Step 2: PUT upload file to signed URL
curl -s -X PUT -T "$LOCAL_PDF_PATH" "$UPLOAD_URL"

# Step 3: Poll batch result
curl -s -X GET "https://mineru.net/api/v4/extract-results/batch/$BATCH_ID" \
  -H "Authorization: Bearer $MINERU_API_TOKEN"
Polling Logic

Poll every 3 seconds. States: waiting-filependingrunningdone / failed.

Read the full file on GitHub · 157 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 157 lines · 0 tokens per session scan A ac969c863fd5

Subscribe to this mod's changes

pdf-parser-mineru is an agent published in the GitHub repository Mor-Li/ccblog (134 stars, last pushed 1mo ago), licensed MIT. It adds 526 tokens to every session and 1,942 once invoked, about $0.0026 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.