proofmill
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@proofmill Compare revenue with and without excluding void invoices"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ProofMill turns CSV/JSONL transformations into reproducible, row-traceable experiments. An agent proposes a bounded recipe. DuckDB executes it. A four-way comparison separates the data effect, recipe effect and their interaction, with source hashes and business-key-level evidence.
See the proof
Requires Python 3.11+ and uv.
git clone https://github.com/heavnzor/heavnz0r-proofmill.git
cd heavnz0r-proofmill
uv sync
uv run proofmill demoOpen .proofmill-demo/report.html. The synthetic invoice demo produces:
Old recipe | New recipe: exclude void invoices | |
Old data | 525 | 450 |
New data | 745 | 600 |
Baseline 525
Data effect +220
Recipe effect -75
Interaction -70
─────────────────────
Current 600 Net change: +75The interaction matters: some new or changed invoices are precisely the ones removed by the new recipe. Counting data and recipe effects alone would overstate the result.
Trace a specific invoice:
uv run proofmill explain .proofmill-demo/comparison.json --key CEach source reference includes the input SHA-256, one-based data record, inclusion/filter/quarantine status and numeric contribution. A repeated demo requires a fresh --out directory.
Related MCP server: mcp-validation-server
Four runs, one explanation
OLD RECIPE NEW RECIPE
┌────────────┐ ┌────────────┐
OLD DATA │ baseline │────────→│ recipe only│
└─────┬──────┘ └──────┬─────┘
│ │
┌─────▼──────┐ ┌──────▼─────┐
NEW DATA │ data only │────────→│ current │
└────────────┘ └────────────┘For the same declared metric and unit:
data = F(new data, old recipe) − baselinerecipe = F(old data, new recipe) − baselineinteraction = current − data-only − recipe-only + baselinedata + recipe + interaction = current − baseline
The same conservation identity is checked across row-level contributions. This is an execution decomposition, not proof of real-world business causality.
If one combination cannot execute, the report says not comparable and preserves the failure. It does not invent an attribution.
AI proposes. The engine verifies.
The recipe is a small typed language: rename, cast, filter, then grouped sum. Unknown operations and arbitrary SQL are rejected.
{
"schema": "proofmill.recipe/v1",
"name": "Paid revenue by region",
"key": "invoice_id",
"steps": [
{ "op": "cast", "column": "amount", "to": "decimal" },
{ "op": "filter", "column": "status", "operator": "eq", "value": "paid" }
],
"metric": {
"id": "invoice-total", "column": "amount",
"group_by": ["region"], "unit": "EUR"
}
}An OpenCode/Claude Code agent can inspect the source schema, obtain the recipe JSON Schema, propose and validate a recipe, present its assumptions, then run the accepted comparison. Its model and authentication stay in the client.
Example MCP configuration for OpenCode:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"proofmill": {
"type": "local",
"command": [
"uv", "run", "--project", "/path/to/heavnz0r-proofmill",
"proofmill", "mcp", "--root", "/path/to/data-workspace"
]
}
}
}Merge and restart OpenCode. Claude Code can register the same stdio command. All tool paths must resolve inside --root. The profiling tool returns column names and counts, not raw row samples; an explicit explanation can return a selected record's provenance. The workflow skill describes the full loop.
Use your own snapshots
uv run proofmill profile exports/old.csv
uv run proofmill schema
uv run proofmill validate recipes/new.json
uv run proofmill compare \
--old-data exports/old.csv --new-data exports/new.csv \
--old-recipe recipes/old.json --new-recipe recipes/new.json \
--out comparisonFor a single transformation:
uv run proofmill run --input exports/new.csv --recipe recipes/new.json --out cleanedEach successful cell exports:
data.parquet transformed records + source record/hash columns
metrics.parquet grouped totals + contributing record numbers
quarantine.json rejected values and reasons
receipt.json recipe, hashes, counts, groups and row provenanceA comparison adds comparison.json and a self-contained HTML report. Output directories must be new, so a previous result is not silently overwritten.
Contracts that matter
A unique, nonempty source business key aligns records across snapshots. Duplicate identities block the run.
Metric identity, unit, grouping columns and source key must agree between recipes.
Decimal casts use DECIMAL(38,6). Values that would round, overflow, or become non-finite are quarantined; integer casts reject fractional input.
A source record is a logical CSV/JSONL record, not necessarily a physical file line. Hashes identify the exact input bytes.
Filtering uses SQL null semantics. Invalid cast rows are quarantined; filtered rows remain traceable with a reason.
Grouped sums are the v0.1 metric. Flat UTF-8 CSV/JSONL inputs are bounded to 25 MiB and 100,000 records. No joins, OCR, arbitrary SQL, or warehouse connector is implied.
Receipts and quarantine outputs contain local data. Inspect them before sharing. The demo uses synthetic invoices.
See the method for comparison semantics and precision boundaries.
Development
uv sync
uv run ruff check .
uv run pytestTests exercise the known decomposition, conservation, missing schema, duplicate identities, decimal precision, quarantine, SQL-parameter escaping, Parquet provenance, and MCP transport.
Inspired by the reproducibility and lineage concerns explored by Hamilton and OpenLineage. ProofMill's focus is the small, inspectable data × recipe experiment.
Available Tools
5 toolsproofmill_compareB
Run an accepted four-way comparison and write receipts/Parquet to a new local folder.
Inputs: output (required), new_data (required), old_data (required), new_recipe (required), +1 more.
proofmill_explainA
Trace one business key across the four executions in a saved comparison receipt.
Inputs: key (required), receipt (required).
proofmill_profileB
Inspect column names, null counts and cardinality without sending raw row samples.
Inputs: path (required).
proofmill_recipe_schemaA
Return the bounded recipe schema for rename, cast, filter and grouped sum operations.
Inputs: no named parameters.
proofmill_validateA
Validate an AI-proposed recipe before execution; no data is read or written.
Inputs: recipe (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool targets a distinct stage in the proofmill workflow: profiling, recipe schema creation, validation, comparison execution, and receipt explanation. There is no meaningful overlap between their responsibilities.
All tools share the proofmill_ prefix and use lowercase snake_case, which is predictable. Four names are verb-led, while recipe_schema is noun-led, a minor deviation from the otherwise consistent pattern.
Five tools is well-scoped for a focused data profiling and comparison pipeline. Each tool earns its place and corresponds to a clear phase in the workflow.
The core lifecycle is covered: profile, schema, validate, execute, and explain. A minor gap is the lack of a tool for listing saved receipts or inspecting broader comparison outputs beyond tracing a single business key.
Maintenance
Related MCP Connectors
Paid deterministic data-quality and execution-verification tools for AI agents.
Provenance-first database for teams and agents: every value carries sources, rules and coverage.
Five deterministic micro-tools for AI-agent data pipelines: clean, dedupe, normalize, score, detect.
AI agents run business processes on your business data. Every change is attributed and reversible.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables autonomous data quality inspection and repair workflows. It scans DuckDB warehouses for anomalies, generates and verifies fixes in a dry-run copy, then applies them after validation, with full audit logging.MIT
- AlicenseAqualityCmaintenanceEnables a language model to run four deterministic data checks it cannot argue with — column-contract validation with an explicit quarantine list, arithmetic reconciliation of opening/movements/closing, distinct entity counting against row counts, and duplicate detection returned for human review — each answering with structured findings and row/column locators. Failures come back as results with reasons, so the model reports exactly which rows and columns are broken rather than asserting the data is clean.4MIT
- AlicenseAqualityBmaintenanceEnables AI agents to compare two tables across the same or different databases and report what changed, which columns changed, and where changes concentrate, plus source/table discovery and schema description. Runs four read-only tools that take source names rather than connection strings, returning a stable JSON contract with a risk verdict.1152 npmMIT
- AlicenseAqualityBmaintenanceEnables AI agents to inspect tables, estimate bytes/cost, rehearse SQL on 1%→3%→10% samples, predict full-scale results, and only run a query inside a budget across DuckDB, BigQuery, Snowflake and Postgres. Also supports impact/lineage analysis, schema drift detection, key-based data diffs, SQL translation, incremental-model advice and cheap data-quality checks.1651 PyPI2MIT