Skip to main content

pdfproof-mcp

pdfproof-mcp is a framework-agnostic MCP server and Python engine for validating structured JSON, Excel, or CSV test data against PDF documents. It resolves records through an ordered, configurable hierarchy and returns deterministic evidence, structured results, and an HTML report.

The published distribution is named pdfproof-mcp; its Python import package is pdfproof.

The project is intentionally not a general PDF-to-Excel converter, browser automation tool, or LLM-based validation system.

Current status

The deterministic core and MCP integration are implemented. The approved architecture and implementation sequence are in PLAN.md.

Core guarantee

Each locator narrows only the candidates left by the preceding locator. The engine never searches an expected field across the entire document after a record has been resolved, and never silently selects among ambiguous candidates.

Test-data formats

JSON, multi-sheet Excel, and simple tabular CSV inputs normalize into the same test suite. Each user-defined record_id links its locators and validations, but is never an implicit PDF search key. See the test-data schema for the JSON example, Excel sheet design, CSV guidance, and the locator-versus-validation distinction. Canonical fields use stable machine keys with optional report labels; financial values use Decimal precision.

Usage modes

For batch testing, pass test_data_path pointing to JSON, Excel, or CSV. For interactive use, an AI host/client can convert a user request into direct structured test_data for the same validate_document tool. Both paths use one canonical model and one deterministic validation engine; the server does not parse natural language. See MCP usage.

MCP server

Start the stdio server from C:\pdfproof-mcp:

.venv\Scripts\python.exe -m pdfproof.server

The primary validate_document tool accepts exactly one of test_data_path (JSON, Excel, or CSV) and direct structured test_data (a TestSuite or TestRecord). Both use the same canonical input, PDF extraction, hierarchical resolution, validation, and HTML reporting path. See MCP documentation for the contract, examples, resources, and error handling.

Example file-driven call:

{"pdf_path": "sample_statement.pdf", "test_data_path": "sample_test_data.json"}

The server exposes pdf-validation://schema/json, pdf-validation://schema/excel, pdf-validation://schema/csv, pdf-validation://schema/tool-input, pdf-validation://examples, and pdf-validation://matching-rules as documentation resources.

The supplied sample_statement.pdf and sample_test_data.json are synthetic fixtures. Do not add real customer documents or identifiers to this repository.

Development

Requires Python 3.11 or newer. Once dependencies are installed, run:

pytest

Installation

Install the published distribution when available:

python -m pip install pdfproof-mcp

The distribution contains the complete PDFProof engine, CLI, and MCP server. Run CLI validation with:

pdfproof validate document.pdf test_data.json

Start the MCP server from an installed environment with:

python -m pdfproof.server

The package supports JSON, Excel, CSV, and direct structured MCP test data. The project has not been published to PyPI yet; the command above applies after a release is published.

License

MIT. See LICENSE.

Metadata

Release files for pdfproof-mcp 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for pdfproof-mcp 0.2.0
File Interpreter ABI Platform
pdfproof_mcp-0.2.0-py3-none-any.whl Python 3 none any Details

Release files / pdfproof_mcp-0.2.0-py3-none-any.whl

Download URL pdfproof_mcp-0.2.0-py3-none-any.whl
Size 48.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a13ae2f921b446a4eac1e3f0b58f5007e325c92658fc70726c846b7c3416ef50
BLAKE2b-256 checksum
How to use checksums
45b305c9e659e87d72e0d1f40cbf535484045bf59aa74c9b9027569aede670b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.0

Release history Release notifications | RSS feed

This release

0.2.0 This release

1 release file

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page