Skip to main content

dsh-plugin-mineru

38Stars2Forks4Issues0Watchers

Package MinerU document parsing service as a DSH model tool, enabling AI to directly read PDF, images, Word, PPT, Excel content and convert to Markdown.

Evidence4/5methodologySourceInstallMaintenanceDSH versionSecurity scan
Machine-auditedInstall commandRepo verifieddsh-plugin topicLicenseREADMEAI wiki
Language
TypeScript
License
NOASSERTION
Branch
master
dsh-plugin

Install

cmdweb profile
$ dsh plugin --profile web add @huanlin/dsh-plugin-mineru

Run the command above in your terminal to install this plugin via the dsh CLI. You can switch Profile in the top-right corner. New to dsh? Read the beginner tutorial

Install via your agent

Install the DeepSeek Harness plugin HuanLinOTO/dsh-plugin-mineru for me: review the repository at https://github.com/HuanLinOTO/dsh-plugin-mineru first, then run the install command and verify the plugin loads successfully.

Paste this instruction to the DSH Web GUI assistant — it will install and verify for you.

One-Line Positioning

Package the MinerU document parsing service as a DSH model tool, enabling AI to directly read PDFs, images, Word, PPT, Excel files and convert their content into usable Markdown.

Core Capabilities

  • One-click local document parsing: Pass in PDF / image / DOCX / PPTX / XLSX paths, get structured Markdown content from the model
  • Async step-by-step interface: For large documents, you can just submit the task and get a task_id, let the model work on other things, then poll for results
  • Server health and capacity probe: Returns MinerU version, queue depth, and concurrent limit, convenient for judging server load before batch tasks
  • Large output auto-save to disk: When Markdown exceeds the character limit, it's automatically written to the system temp directory; complete structured results (including images, table JSON) are always saved to disk
  • Web-side visual configuration: DSH settings page lets you directly edit server address, default backend, polling and timeout parameters, save for hot-reload

Technical Implementation

  • Language: TypeScript (NodeNext, ESM-only, relative imports with .js suffix)
  • Key Dependencies: cordis (^4.0.0-rc.7, host-injected plugin runtime), @deepseek-ai/dsh-tools (^0.0.1-rc.1, defineTool / ContentBlock types), schemastery (^3.18.0, Config Schema validation), @deepseek-ai/dsh-host-apiproxy (^0.0.1-rc.1, private RPC channel /mineru-api)
  • Architecture Pattern: Standard DSH bundle dual-sided plugin — host process (src/index.ts) injects a dsh-mineru line via cordis.patch.yml, injects tools + connection services; registers 5 model tools via ctx.tools.register(defineTool(...)), exposes config read/write + health probing to browser side via ctx.connection.rpc.handle('/mineru-api', ...); client (src/client/index.ts) registers settings.section slot as Cordis client, provides Chinese/English bilingual settings page
  • Entry Files: host entry src/index.ts (exports name, inject, Config, apply), browser entry src/client/index.ts (exports apply to register React settings page), build outputs lib/index.js + lib/client.js

Use Cases

Users who want the model to read and understand non-plain-text资料: Convert scanned PDFs, contract photos, Excel reports into Markdown before putting them into the conversation for the model to digest directly; or use mineru_health to check if the MinerU queue can still handle it before batch tasks, then decide whether to wait. Ordinary users can solve 90% of scenarios with just the mineru_parse_document tool; users needing batch or long-running tasks will use the three-step async flow.

Prerequisites & Compatibility

DependencyMin VersionDescription
DeepSeek Harness0.0.1-rc.1+ (derived from peerDeps)Requires host to provide tools and connection services; private RPC channel via @deepseek-ai/dsh-host-apiproxy (package.json:53-63)
Node.js>=18.0.0package.json engines field declared; source uses node:fs/promises, node:os, node:path and other built-in modules (package.json:83-85)
MinerU Serverv3.4.4, protocol v2Plugin is just protocol wrapper, must deploy your own MinerU FastAPI instance and fill in baseURL (src/client.ts:3-9 / README.md:93)
PlatformCross-platformpackage.json declares no os/cpu restrictions; pure TypeScript + built-in Node API
Native ModulesNoneZero native dependencies; no sqlite / pty / canvas or other packages requiring compilation

Installation

dsh plugin --profile web add github:HuanLinOTO/dsh-plugin-mineru

Configuration Options

ConfigTypeDescriptionDefault
API AddressstringMinerU service address, e.g. http://your-host:18000. Required, otherwise plugin fails to start (src/index.ts:57-59)(first start seeded to http://localhost:18000, see cordis.patch.yml:6-10)
API Key Env Variable NamestringAuth environment variable name; plugin reads this at runtime (also tries host credentials service). Open source MinerU has no auth, keep defaultMINERU_API_KEY
Default Parse Backendoptionpipeline (no VLM, multilingual, CPU available) / vlm-engine (VLM only) / hybrid-engine (VLM+pipeline, requires VLM model) / vlm-http-client / hybrid-http-clientpipeline
Default Parse Methodoptionauto (auto-detect) / txt (plain text, no OCR, fast) / ocr (force OCR)auto
Default LanguagestringOnly applies to pipeline backend; common values ch (Chinese/English/Japanese), ench
Polling Interval (ms)numberInterval between each status query for async tasks2000
Polling Timeout (ms)numberMax wait time for mineru_parse_document to complete parsing600000 (10 minutes)
Request Timeout (ms)numberSingle HTTP request timeout60000
Markdown Output Char LimitnumberToo-long markdown will be truncated and written to system temp dir200000

FAQ

Q: Can it parse documents right after installation?

A: No. The plugin only forwards requests to your own MinerU service. You need to deploy a MinerU FastAPI instance first (open source version available from MinerU GitHub repo), then change baseURL to your service address in DSH GUI's MinerU settings page, save and it's effective (README.md:93).

Q: Do I need an API Key?

A: Open source MinerU service has no built-in auth, leave empty to make requests; if you deployed a commercial version with auth, fill in apiKeyEnv in settings page (default reads MINERU_API_KEY env variable), plugin will send it as Bearer token.

Q: What if parsing results get truncated?

A: Markdown over 200000 characters gets truncated and you get prompted that full content was written to mineru-<task_id>.md in system temp; complete structured results (including middle_json, content_list, images, etc.) are always written to mineru-result-<task_id>.json, model can use file read tools to access them.

Q: How to choose parsing backend?

A: Default pipeline, no VLM model needed, runs on CPU, sufficient for most scenarios; to use MinerU's recommended engine you need VLM model installed on server first then switch to hybrid-engine; vlm-* series splits VLM to remote HTTP service, more flexible deployment.

Q: Can I parse multiple documents simultaneously?

A: Yes, but use the async three-step flow: mineru_submit_parse_job gets multiple task_ids at once, poll separately and get results separately, let model work on other things; before batch, use mineru_health to check max_concurrent_requests to see if server can handle it.

Q: Do I need to restart after changing settings?

A: No. After saving in settings page, plugin recreates MinerU client instance, 5 tools read latest config via getter, next call uses new value, process is transparent to model.

Q: How to uninstall?

A: dsh plugin --profile web rm dsh-mineru, then clean up the - insert block this plugin added in ~/.dsh/cordis.patch.yml, temp files won't be actively deleted by plugin.

Getting Started Difficulty

Beginner — After installation, just fill in one MinerU service address in GUI settings page, model can call mineru_parse_document directly; if running local CPU-only MinerU, no API Key needed either.

Known Issues & Limitations

  • end_page_id defaults to 99999, not "to PDF end"; MinerU will ignore if exceeding actual page count, but if you need precise slicing pass specific integer (src/tools.ts:79 / AGENTS.md:47)
  • lang_list only works with pipeline backend, VLM/hybrid backends silently ignore this parameter (AGENTS.md:44)
  • return_images=true makes base64 images in response very large, recommend using response_format_zip=true for image-intensive documents (AGENTS.md:45)
  • MinerU server only retains tasks for 24 hours, caching task_id in long sessions may get already-cleaned responses, recommend using and discarding (AGENTS.md:46)
  • hybrid-engine / vlm-engine backend requires VLM model loaded on server, will error directly if VLM not loaded (AGENTS.md:43 / README.md:9)
  • When apiKeyResolver gets a key, HTTP client sets redirect: 'error', auth requests don't follow 3xx redirects, preventing token leakage to unexpected domains (src/client.ts:233)
  • Config file must be saved after modification for hot-reload to take effect, editing without clicking save button won't take effect (src/client/SettingsPage.tsx:116)

Read the usage guide →

Install steps, key points, FAQ and compatibility for this plugin — auto-derived from indexed fields.

Listing badge

Listed on deepseek-plugin.org
[![Listed on deepseek-plugin.org](https://img.shields.io/badge/listed_on-deepseek--plugin.org-007EC6)](https://deepseek-plugin.org/plugins/HuanLinOTO/dsh-plugin-mineru)

Paste this markdown into your GitHub README to link back to this listing. The badge only states the listing — not a security endorsement.

← Back to plugin directory