Skip to main content
Glama

pdfvault-mcp — Offline PDF Fake-Redaction Forensic Auditor, Metadata Scrubber & Clean %PDF-1.7 MCP Server + GitHub Action

z121245017-ai/pdfvault-mcp MCP server

Zero-dependency, 100% offline Model Context Protocol (MCP) Server, CLI, and GitHub Action enabling AI coding agents (Claude Desktop, Cursor, Windsurf, Antigravity) and CI pipelines to audit PDF fake black-box redactions, incremental %%EOF ghost revisions, /Info + XMP workstation path leaks, reviewer /Annots, and hidden /JavaScript payloads — and rebuild clean %PDF-1.7 documents with 0% cloud upload.

Why PdfVault Exists

  1. Fake Black-Box Redactions (0 0 0 rg ... re f): Drawing dark rectangles over text in Preview, Word, or basic PDF editors hides characters visually while the underlying BT ... Tj / TJ ... ET stream stays 100% copy-pasteable.

  2. Incremental-Save %%EOF Ghost Revisions: Saving edits incrementally appends a new xref and %%EOF while leaving deleted drafts and sensitive numbers intact before earlier %%EOF markers.

  3. Forensic Metadata & Script Leaks: /Info (UTF-16BE BOM <FEFF...> and octal \ddd strings), /Metadata XMP stRef:filePath workstation paths, /PieceInfo Illustrator blocks, unapplied /Subtype /Redact annotations, and /OpenAction /JavaScript beacons routinely leak author identities and deal terms.

Related MCP server: quillpdf-mcp

MCP Tools Exposed (stdio)

Tool

Purpose

Safety Annotations

audit_pdf_forensics

Decompresses /FlateDecode content streams locally to detect fake black-box redactions, surviving target substrings, %%EOF ghost revisions, UTF-16BE/octal /Info, XMP XML paths, /Annots, /EmbeddedFiles, and /JavaScript triggers.

readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false

scrub_pdf_metadata

Losslessly rewrites a single-revision %PDF-1.7 (1 %%EOF, fresh xref), stripping /Info, XMP /Metadata, /PieceInfo, /JavaScript, /OpenAction, /EmbeddedFiles, and optional /Annots / /AcroForm while keeping vector text crisp.

readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false

compile_clean_burned_pdf

Compiles baseline JPEG (DCTDecode) page frames with solid pixel burn-in boxes + optional watermark into a brand-new %PDF-1.7 (0 /Font objects, 0 BT...ET text streams) and issues a SHA-256 Zero-Surviving-Leak Verification Receipt.

readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false

generate_forensic_pdf_fixture

Deterministically synthesizes multi-revision Flate-compressed PDF fixtures (ma-contract, hr-compensation, vendor-proposal) for CI security regression tests.

readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false

Quick Start (MCP Client & Local CLI)

# Start MCP server over stdio (supports both NDJSON and Content-Length framing)
npx -y github:z121245017-ai/pdfvault-mcp

# List MCP tool schemas from terminal
npx -y github:z121245017-ai/pdfvault-mcp --list

# Audit a local PDF file from terminal
npx -y github:z121245017-ai/pdfvault-mcp --cli audit_pdf_forensics '{"filePath":"./contract.pdf","targetTerms":["$4,850,000"]}'

Claude Desktop / Cursor / Windsurf / Antigravity Config

{
  "mcpServers": {
    "pdfvault": {
      "command": "npx",
      "args": ["-y", "github:z121245017-ai/pdfvault-mcp"]
    }
  }
}

Docker (node:22-alpine, non-root USER node)

docker build -t pdfvault-mcp .
docker run -i --rm pdfvault-mcp

GitHub Action (z121245017-ai/pdfvault-mcp@v1)

Block pull requests that commit .pdf fixtures, docs, or legal attachments containing fake black-box redactions, surviving target secrets, incremental %%EOF ghost revisions, workstation OS paths, unapplied /Redact boxes, or hidden /JavaScript:

name: PdfVault PDF Leak & Fake-Redaction Gate

on:
  pull_request:
  push:
    branches: [main]

permissions:
  contents: read

jobs:
  pdf-forensic-gate:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Audit repository PDFs for fake redactions & metadata leaks
        uses: z121245017-ai/pdfvault-mcp@v1
        with:
          paths: '.'
          fail-on-leaks: 'true'

Action Inputs & Outputs

Name

Kind

Default

Description

paths

Input

.

Newline-, comma-, or space-separated PDF files or directories to scan.

target-terms

Input

''

Optional comma-separated confidential terms that must not survive inside any .pdf.

fail-on-leaks

Input

true

Exit 1 when CRITICAL or HIGH PDF leaks are found.

ignore

Input

node_modules,.git,dist,build,coverage,vendor

Comma-separated directory names skipped during recursive workspace scan.

scanned-pdfs

Output

—

Total number of .pdf files inspected.

leaks-found

Output

—

Total count of CRITICAL/HIGH PDF leak findings.

report-json

Output

—

Structured JSON summary of findings.

Verification

npm test

License

MIT License — 0 external npm dependencies, 0 network calls, 100% local execution.

Available Tools

4 tools
audit_pdf_forensicsA
Read-onlyIdempotent

Audit a local PDF file path or Base64-encoded PDF binary to detect fake black-box redactions (dark 0 0 0 rg ... re f rectangles over copyable BT...Tj/TJ text streams), incremental %%EOF ghost revisions, UTF-16BE/octal /Info fields, XMP workstation paths, unapplied /Subtype /Redact boxes, reviewer /Annots, /JavaScript triggers, and surviving target secrets.

Inputs: filePath, pdfBase64, targetTerms.

compile_clean_burned_pdfB
Idempotent

Compile a brand-new zero-text-stream %PDF-1.7 binary from Base64 JPEG (DCTDecode) page frames or rendered page specs with solid pixel burn-in redaction boxes and optional watermark, then re-scan the output bytes to issue a cryptographic SHA-256 Zero-Surviving-Leak Receipt.

Inputs: burnBoxes, outputPath, targetTerms, returnBase64, +3 more.

generate_forensic_pdf_fixtureA
Idempotent

Deterministically generate a synthetic multi-revision Flate-compressed PDF fixture containing fake black-box redactions, 2 %%EOF ghost revisions, UTF-16BE /Info, XMP workstation paths, /Annots, and /JavaScript for security regression testing.

Inputs: preset, outputPath, returnBase64.

scrub_pdf_metadataA
Idempotent

Losslessly rewrite a clean single-revision %PDF-1.7 file (collapsing multiple %%EOF saves into 1 %%EOF with a fresh xref table), stripping /Info, XMP /Metadata, /PieceInfo, /JavaScript, /OpenAction, /EmbeddedFiles, and optional /Annots or /AcroForm while preserving active vector page content.

Inputs: filePath, pdfBase64, outputPath, stripAnnots, +2 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 4 tools

    Disambiguation5/5

    Each tool has a clearly distinct role in a PDF forensics pipeline: audit, scrub, compile clean output, and generate test fixtures. The only possible overlap is that compile and generate both produce PDFs, but their descriptions clearly separate clean production output from synthetic malicious fixtures.

    Naming Consistency5/5

    All tools use snake_case with verb-first names, following a predictable action-oriented convention. Longer names like compile_clean_burned_pdf and generate_forensic_pdf_fixture remain readable and consistent with the set.

    Tool Count5/5

    Four tools is a tight, well-scoped surface for a specialized PDF security server. Each tool covers a distinct stage of detection, sanitization, clean generation, and regression testing.

    Completeness4/5

    The surface covers the core lifecycle: audit for leaks, scrub existing PDFs, compile a clean replacement with a receipt, and generate forensic fixtures. Minor gaps exist, such as no explicit standalone verification tool for scrubbed output or batch-processing operation, but the main workflows are covered.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      A local-first PDF tool for merging, splitting, rotating, watermarking, Bates-numbering, cleaning metadata, and counting pages — all operations happen on your machine with no network transmission.
      15
      13 npm
      1
      MIT
    • F
      license
      A
      quality
      B
      maintenance
      MCP server for local, verifiable PDF redaction. Enables AI agents to find sensitive regions, locate text, redact PDFs on-device, verify redaction and tamper-evidence seals, and generate PDFs—without uploading confidential documents.
      8
      788 npm
      -
    • F
      license
      B
      quality
      B
      maintenance
      Enables local, offline document extraction and manipulation—PDF first but also HTML, DOCX, XLSX, PPTX, EML, EPUB, Markdown, and plain text—through tools for probing, locating, extracting, converting, assembling, OCR, protecting, and redacting documents, with nothing leaving the machine.
      7
      -