zero-trust-mcp-pdf
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
zero-trust-mcp-pdf
A security-first, strictly read-only Model Context Protocol (MCP) server for querying local PDF corpora with Claude Desktop and Claude Code — without exposing raw filesystem access, network egress, or raw untrusted text to the model.
Security Model & Guarantees
Most local-file MCP servers grant broad filesystem access or inject raw extracted text directly into the LLM context. zero-trust-mcp-pdf enforces a fail-closed boundary:
Strict Read-Only & Stdio-Only: Runs exclusively over
stdiowith zero network access, no shell execution, and no write operations.Minimal Tool Surface: Exposes only two bounded tools:
search_corpus— full-text search over the pre-indexed SQLite FTS5 corpus.get_passage— bounded excerpt retrieval by document/page reference.
Hardcoded Root Whitelist: Prevents path traversal and arbitrary file reads outside the configured corpus directory.
Verifiable Provenance: Deterministic multi-pass ingestion (PyMuPDF + Tesseract OCR), streaming SHA-256 integrity checks, and HMAC-signed search/pagination receipts (
corpus-these-search-receipt/1.0).Prompt Injection Defense: Every returned passage is wrapped in
<untrusted_context>tags to isolate document content from system instructions.
Related MCP server: pdfluent-mcp
Installation
Requires Python 3.12+.
git clone https://github.com/FrederikOuvrard/zero-trust-mcp-pdf.git
cd zero-trust-mcp-pdf
python -m venv .venv
source .venv/bin/activate # Windows: .\.venv\Scripts\Activate.ps1
pip install -e ".[dev]"Configuration
Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"zero-trust-pdf": {
"command": "python",
"args": ["-m", "corpus_these.server"],
"env": {
"MCP_CORPUS_ROOT": "/path/to/your/indexed/corpus"
}
}
}
}(Adjust -m corpus_these.server and MCP_CORPUS_ROOT if your entrypoint or environment variable name differs.)
Development & Testing
ruff check .
pytestLicense
MIT License — see LICENSE.
Roadmap
Configurable storage roots: Remove the hardcoded
D:\volume constraint via explicit configuration.Cross-platform support: Extend fail-closed file-handle locking and path validation to Linux and macOS.
Hybrid retrieval: Add optional local vector search alongside SQLite FTS5 while preserving deterministic citation receipts.
Security hardening: Publish formal threat-model tests and automated fuzzing for malformed PDFs and FTS5 queries.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Parse, extract, split, and ask over digital PDFs (text layer, no OCR) from Cursor and Claude.
Deterministic prompt-injection detector; signed, offline-verifiable verdicts. Not an LLM.
Let ChatGPT and Claude read and edit files, search and run commands on your own computer.
Safe folder access for ChatGPT and Claude: read, write and search files, risky tools opt-in.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables clients to inspect local PDFs by searching text, rendering pages, and cropping selected regions at high resolution directly from the source document. It runs locally over stdio without requiring models, embeddings, GPUs, or API keys, and does not modify source PDFs or send network requests.6MIT

pdfluent-mcpofficial
AlicenseAqualityBmaintenanceEnables MCP clients to read local PDFs as markdown, plain text, tables, or positioned blocks; inspect metadata; search documents; list and fill form fields into new files; and identify pages needing vision, while keeping documents on-machine and limiting access to allowed directories.951 PyPIMIT- AlicenseNot gradedqualityCmaintenanceEnables MCP clients such as Claude Code and Cursor to search a documentation corpus, read specific pages, and locally ask grounded questions with verified citations over stdio or Streamable HTTP.MIT
- AlicenseNot gradedqualityBmaintenanceEnables Claude Code to build a local semantic index over document folders and answer questions with checked citations to file, page, and passage, including cross-references and multi-document tables. Indexing and search run on the user's computer without an extra model or API key.MIT