Skip to main content
Glama

dsh-read-pdf — MCP-Server + Kommandozeilenwerkzeug, mit denen DSH PDFs lesen kann

Ein PDF-Leseserver auf Basis des Model Context Protocol: Textextraktion, chinesische OCR (Scanversionen), Seiten-Rendering, Dateisuche, Drag-and-Drop-Posteingang, sofort einsatzbereit. Kompatibel mit jedem MCP-Client: DSH, Claude Desktop, Codex, Cursor oder eine eigene Anwendung. Repository: https://github.com/xiaoxuPekingUniversity/dsh-read-pdf

English · Deutsch


Deutsch

Funktionen

Tool

Beschreibung

pdf_info

Seitenzahl / Scan-Erkennung / Dateigröße

pdf_text

Text aus angegebenen Seiten extrahieren (pages wie 1-3,5)

pdf_ocr

Chinesische OCR für Scanversionen (RapidOCR, lokal, ohne Internetverbindung)

pdf_render

Seiten als PNG rendern (zur manuellen Ansicht von Formel-/Grafikseiten)

pdf_find

PDFs in einem Verzeichnis per Schlüsselwort finden (nach Änderungszeit absteigend)

Die Kommandozeilenversion pdf_tools.py bietet dieselben Funktionen und benötigt keinen MCP-Client.

PDF-Drop-Posteingang (Drag-and-Drop-Upload): pdf_drop_server.py ist ein lokaler Webdienst ohne Abhängigkeiten. Zieht man im Browser ein PDF in die Ablagezone, wird es im lokalen Ordner gespeichert – ideal, um der KI Material zuzufüttern, ohne dass der Host das Hochladen von Anhängen unterstützen muss.

Installation

pip install -r requirements.txt

Verwendung

Kommandozeile (CLI)

python pdf_tools.py info    exam.pdf
python pdf_tools.py text    exam.pdf --pages 1-3
python pdf_tools.py ocr     scanned.pdf            # 扫描版中文识别
python pdf_tools.py render  exam.pdf --pages 1-3
python pdf_tools.py find --dir ~/Downloads "期末"

PDF-Drop-Posteingang (Drag-and-Drop-Upload)

python pdf_drop_server.py --port 8765   # 浏览器打开 http://127.0.0.1:8765

Als MCP-Server

DSH (in profiles/web/cordis.patch.yml ergänzen):

- insert:
    - id: mcp-pdf
      name: '@deepseek-ai/dsh-mcp-client'
      config:
        transport: stdio
        serverName: pdf
        command: python
        args:
          - /绝对路径/mcp_pdf_server.py
        failOnStartupError: false

Als natives DSH-Plugin (mit Schalter auf der Web-Einstellungsseite, empfohlen)

ds-plugin/ bietet ein Host-Plugin ohne Build-Schritt. Auf der Einstellungsseite gibt es einen Schalter „PDF lesen“ (startet/stoppt das Tool zur Laufzeit), siehe ds-plugin/README.md.

Claude Desktop (claude_desktop_config.json): siehe examples/claude_desktop_config.json.

Typische Anwendungsfälle

  • Eingescannte Prüfungsbögen in einen MCP-fähigen KI-Client werfen → automatisch als Text erkannt → Lösungen/Handouts generieren;

  • In Kombination mit lokalen KI-Workbenches: Die KI ruft direkt pdf_text/pdf_ocr auf, um die PDFs im Materialordner zu lesen.

Entwicklungsplan

  • Weitere Dateitypen unterstützen (docx / xlsx)

  • Drag-and-Drop-Upload (PDF direkt in das Chatfeld ziehen) – erfordert, dass der Host-Client Nicht-Bild-Anhänge unterstützt; Beiträge zu diesem Repository sind willkommen

  • Stapelverarbeitung: PDFs zusammenführen / aufteilen / in Bilder konvertieren

Related MCP server: MCP Server Knowledge Engine

English

Features

Tool

Description

pdf_info

Page count / scanned detection / size

pdf_text

Extract text from selected pages (pages like 1-3,5)

pdf_ocr

Chinese OCR for scanned PDFs (RapidOCR, fully local)

pdf_render

Render pages to PNG (for formula/diagram pages)

pdf_find

Find PDFs in a directory by keyword (newest first)

A CLI (pdf_tools.py) provides the same capabilities without any MCP client. pdf_drop_server.py adds a zero-dependency local drag-and-drop inbox web page for feeding PDFs into an AI workspace (no host-side attachment support needed).

Install

pip install -r requirements.txt

Usage

CLI

python pdf_tools.py info    exam.pdf
python pdf_tools.py text    exam.pdf --pages 1-3
python pdf_tools.py ocr     scanned.pdf
python pdf_tools.py render  exam.pdf --pages 1-3
python pdf_tools.py find --dir ~/Downloads "final"

As an MCP server — register with any MCP-capable client (DSH, Claude Desktop, Codex…). See examples/ for config snippets.

Roadmap

  • Support more file types (docx / xlsx)

  • Drag-and-drop upload into chat UIs (requires host-side non-image attachment support — contributions welcome)

  • PDF merge / split / batch conversion

License

MIT

A
license - permissive license
Not graded
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • MCP server for the PDFGate API. Generate PDFs, manage documents and handle e-signatures.

  • OCR, transcription, file extraction, and image generation for AI agents via MCP.

  • 2,000+ MCP servers read at source level. Know what one does before you connect. Free, no key.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/xiaoxuPekingUniversity/dsh-read-pdf'

If you have feedback or need assistance with the MCP directory API, please join our Discord server