dsh-read-pdf
dsh-read-pdf — DSH に PDF を読ませる MCP サーバー + コマンドラインツール
Model Context Protocol ベースの PDF 読み取りサーバー: テキスト抽出、中国語 OCR(スキャン版)、ページレンダリング、ファイル検索、ドラッグ&ドロップ受信箱を、すぐに使えます。 あらゆる MCP クライアントに対応:DSH、Claude Desktop、Codex、Cursor、または自作アプリ。 リポジトリ:https://github.com/xiaoxuPekingUniversity/dsh-read-pdf
日本語
機能
ツール | 説明 |
| ページ数 / スキャン版かどうか / ファイルサイズ |
| 指定ページのテキストを抽出( |
| スキャン版の中国語 OCR(RapidOCR、ローカル実行、ネット接続不要) |
| ページを PNG にレンダリング(数式・図のページを目視確認するため) |
| ディレクトリ内の PDF をキーワードで検索(更新日時の新しい順) |
コマンドライン版 pdf_tools.py は、MCP クライアントに依存せず同様の機能を提供します。
PDF Drop 受信箱(ドラッグ&ドロップアップロード):pdf_drop_server.py は依存関係ゼロのローカル Web サービスです。ブラウザで PDF をドロップゾーンにドラッグ&ドロップするとローカルフォルダに保存されます。「AI に資料を読ませる」用途に適しており、ホストの添付アップロード対応は不要です。
インストール
pip install -r requirements.txt使い方
コマンドライン(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 受信箱(ドラッグ&ドロップアップロード)
python pdf_drop_server.py --port 8765 # 浏览器打开 http://127.0.0.1:8765MCP サーバーとして
DSH(profiles/web/cordis.patch.yml に追記):
- insert:
- id: mcp-pdf
name: '@deepseek-ai/dsh-mcp-client'
config:
transport: stdio
serverName: pdf
command: python
args:
- /绝对路径/mcp_pdf_server.py
failOnStartupError: falseDSH ネイティブプラグインとして(Web 設定ページのスイッチ付き、推奨)
ds-plugin/ はビルド不要のホストプラグインを提供し、設定ページに「PDF 読み取り」スイッチ(実行時にツールを開始/停止)を表示します。ds-plugin/README.md を参照してください。
Claude Desktop(claude_desktop_config.json):examples/claude_desktop_config.json を参照してください。
典型的な使用例
スキャン版の試験問題を MCP 対応の AI クライアントにドロップ → 自動でテキスト化 → 解析/プリントを生成;
ローカル AI ワークベンチと連携:AI が
pdf_text/pdf_ocrを直接呼び出して、資料フォルダ内の PDF を読み取ります。
開発計画
より多くのファイルタイプに対応(docx / xlsx)
ドラッグ&ドロップアップロード(PDF をチャット欄に直接ドロップ)— ホストクライアントが画像以外の添付ファイルに対応している必要があります。このリポジトリへの協力を歓迎します
PDF 結合 / 分割 / 画像変換の一括処理
Related MCP server: MCP Server Knowledge Engine
英語
機能
ツール | 説明 |
| ページ数 / スキャン版の検出 / サイズ |
| 選択したページのテキストを抽出( |
| スキャン版 PDF の中国語 OCR(RapidOCR、完全ローカル) |
| ページを PNG にレンダリング(数式・図のページ用) |
| ディレクトリ内の PDF をキーワードで検索(新しい順) |
CLI(pdf_tools.py)は、MCP クライアントなしで同じ機能を提供します。
pdf_drop_server.py は、依存関係ゼロのローカル ドラッグ&ドロップ受信箱 Web ページを追加します。AI ワークスペースに PDF を取り込むためのもので、ホスト側の添付サポートは不要です。
インストール
pip install -r requirements.txt使い方
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"MCP サーバーとして — MCP 対応クライアント(DSH、Claude Desktop、Codex…)に登録できます。設定例は examples/ を参照してください。
ロードマップ
より多くのファイルタイプに対応(docx / xlsx)
チャット UI へのドラッグ&ドロップアップロード(ホスト側で画像以外の添付サポートが必要 — コントリビューション歓迎)
PDF 結合 / 分割 / 一括変換
ライセンス
This server cannot be deployed
Maintenance
Related MCP Connectors
- docs2mcpOAuthcom.docs2mcp
Query your own PDFs and documents from any MCP client. Every answer cites the page it came from.
MCP server for detecting and redacting PII (Personally Identifiable Information) in PDF documents.
MCP server for the PDFGate API. Generate PDFs, manage documents and handle e-signatures.
PDF tools + QR over MCP: merge, split, rotate, text, metadata, malicious-content scan.
Related MCP Servers
- FlicenseCqualityDmaintenanceAn MCP server that provides a tool to extract text content from local PDF files, supporting both standard PDF reading and OCR capabilities with optional page selection.133-
- FlicenseNot gradedqualityDmaintenanceTransforms PDF collections into a searchable knowledge base using TF-IDF indexing and proximity matching. It enables users to search documents, retrieve specific page content, and manage document libraries through natural language via MCP clients.5-
- AlicenseAqualityDmaintenanceAn MCP server that enables AI assistants to read, search, and analyze PDF files from local paths or URLs. It provides tools for extracting specific page ranges, searching for terms, and retrieving document metadata.422 npm1MIT
- AlicenseAqualityNot gradedmaintenanceAn MCP server that enables users to read, search, and analyze PDF documents. It provides tools for extracting text, viewing metadata, searching content with context, and generating word statistics.5-