MCP PDF Server
📄 MCP PDF 服务器
基于FastMCP的PDF文件阅读服务器。
支持通过MCP协议进行PDF文本提取、OCR识别、图像提取,内置Web调试器,方便测试。
🚀 功能
读取 PDF 文本
从 PDF 中提取普通文本(逐页)。通过 OCR 读取
使用 OCR 识别扫描或基于图像的 PDF 中的文本。读取 PDF 图像
从指定的 PDF 页面中提取所有图像(Base64 编码输出)。
Related MCP server: PDF Reader MCP Server
📂 项目结构
mcp-pdf-server/
├── pdf_resources/ # Directory for uploaded and processed PDF files
├── txt_server.py # Main server entry point
└── README.md # Project documentation⚙️ 安装
推荐 Python 版本:3.9+
pip install pymupdf mcp注意:要使用 OCR 功能,您可能需要构建具有 OCR 支持或外部 OCR 库的 MuPDF。
🔦启动服务器
运行以下命令:
python txt_server.py您应该会看到如下日志:
Serving on http://127.0.0.1:6231🌐 Web 调试接口
打开浏览器并访问:
http://127.0.0.1:6231从左侧面板选择一个工具
在右侧面板填写参数
单击“运行”以测试该工具
无需编码——通过 Web UI 轻松调试和测试。
🛠️ API 工具列表
工具 | 描述 | 输入参数 | 返回 |
| 从 PDF 页面中提取普通文本 |
| 页面文本列表 |
| 通过 OCR 识别文本 |
| OCR提取的文本 |
| 从 PDF 页面中提取图像 |
| 图片列表(Base64编码) |
📝 使用示例
从第 1 至第 5 页提取文本:
mcp run read_pdf_text --args '{"file_path": "pdf_resources/example.pdf", "start_page": 1, "end_page": 5}'对第1页进行OCR识别:
mcp run read_by_ocr --args '{"file_path": "pdf_resources/example.pdf", "start_page": 1, "end_page": 1, "language": "eng"}'提取第 3 页的所有图像:
mcp run read_pdf_images --args '{"file_path": "pdf_resources/example.pdf", "page_number": 3}'📢 注释
文件必须放在
pdf_resources/目录中,或者必须提供绝对路径。OCR 功能需要环境中适当的 OCR 支持。
处理大文件时,根据需要调整内存和超时设置。
📜 许可证
该项目已获得 MIT 许可。
如需商业使用,请注明原始出处。
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
- FlicenseNot gradedqualityDmaintenanceAn MCP server that provides comprehensive PDF processing capabilities including text extraction, image extraction, table detection, annotation extraction, metadata retrieval, page rendering, and document structure analysis.
- FlicenseAqualityNot gradedmaintenanceA Model Context Protocol server that extracts and processes content from PDF documents, providing text extraction, metadata retrieval, page-level processing, and PDF validation capabilities.41
- FlicenseNot gradedqualityDmaintenanceMCP server for extracting text from PDF files, supporting local files and URLs.
- AlicenseNot gradedqualityDmaintenanceMCP server to read protected (or unprotected) PDF files, extracting text to a temp file, and handling large PDFs.11MIT
Related MCP Connectors
MCP server for the PDFGate API. Generate PDFs, manage documents and handle e-signatures.
Turn any PDF into structured JSON via AI + OCR: invoices, bank statements, contracts.
PDF accessibility checks (veraPDF PDF/UA-1), auto-fix and Markdown conversion. EU-hosted.
Appeared in Searches
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/DeepSeekMine/mcp-pdf-reader'
If you have feedback or need assistance with the MCP directory API, please join our Discord server