Pdf ReaderSAFE
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
A PDF file reading server based on FastMCP.
Supports PDF text extraction, OCR recognition, and image extraction via the MCP protocol, with a built-in web debugger for easy testing.
🚀 Features
- read_pdf_text
Extracts normal text from a PDF (page by page).
- read_by_ocr
Uses OCR to recognize text from scanned or image-based PDFs.
- read_pdf_images
Extracts all images from a specified PDF page (Base64 encoded output).
📂 Project Structure
mcp-pdf-server/ ├── pdf_resources/ # Directory for uploaded and processed PDF files ├── txt_server.py # Main server entry point └── README.md # Project documentation
⚙️ Installation
Recommended Python version: 3.9+
pip install pymupdf mcp
Note: To use OCR features, you may need a MuPDF build with OCR support or external OCR libraries.
🔦 Start the Server
Run the following command:
python txt_server.py
You should see logs like:
Serving on http://127.0.0.1:6231
🌐 Web Debugging Interface
Open your browser and visit:
http://127.0.0.1:6231
- Select a tool from the left panel
- Fill in parameters on the right panel
- Click "Run" to test the tool
No coding required — easily debug and test via the web UI.
🛠️ API Tool List
📝 Example Usage
Extract text from pages 1 to 5:
mcp run read_pdf_text --args '{"file_path": "pdf_resources/example.pdf",c7fd813aebd2OBSERVED · 2026-10-08Exposed tools (3)
3 read · 0 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
read_by_ocr | read | |
read_pdf_images | read | |
read_pdf_text | read |
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- none-observed
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (4)
Serving on http://127.0.0.1:6231
http://127.0.0.1:6231
fitz, mcp
Gates applied: no_behavioural_pass, no_license.
c7fd813aebd2full audit observations/trust-audit/mcp-server/deepseekmine__pdf-reader-2.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-08 | c7fd813aebd2 | SAFE | B | 89 | first audit |
Questions
What tools does Pdf Reader expose?
3 in total: 3 read-only, 0 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is Pdf Reader safe to connect to an agent?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B.
What credentials does Pdf Reader need?
No credential environment variables were found in its source, so it appears to need none.
How current is this page?
The grade is for one exact copy of the source (c7fd813aebd2), read on 2026-10-08. The repository is watched and re-audited when it changes.