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 是一个零依赖的本地网页服务,
在浏览器里把 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:8765作为 MCP 服务器
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: false作为 DSH 原生插件(带 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
English
Features
Tool | Description |
| Page count / scanned detection / size |
| Extract text from selected pages ( |
| Chinese OCR for scanned PDFs (RapidOCR, fully local) |
| Render pages to PNG (for formula/diagram pages) |
| 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.txtUsage
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
This server cannot be installed
Maintenance
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
- 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.4341MIT
- 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
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.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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