pypi numproofstreamable-httpMITupdated 2mo ago
The deterministic numeric truth layer for AI agents and spreadsheets.
What can you do with NumProof?
NumProof
The deterministic numeric truth layer for AI agents and spreadsheets.
Your agent writes "gross margin improved from 42.1% to 44.8%" or "the workbook is internally consistent" โ NumProof tells you, deterministically, whether that number is VERIFY, REFUTE, or ABSTAIN, with a counterexample, cell/formula provenance, and a signed, machine-checkable audit bundle. It's exact arithmetic and symbolic math โ not an LLM judging another LLM.
- โ Verify a single math/finance claim, or batch thousands in CI
- โ
Audit
xlsx/csvrows: footing, cross-footing, balance-sheet ties, margins, formula cells โ with provenance - โ Diff two report versions; evaluate covenant rule packs (DSCR, Debt/EBITDA, current ratio, โฆ)
- โ Signed evidence bundle (JSON + HTML/PDF/ZIP) anyone can re-verify offline
- โ API ยท CLI ยท MCP server ยท optional x402 pay-per-call
This repo is the open-source client (SDK + MCP). The verification engine runs as a hosted service โ
pip install numproof, point it at the API, done. (Same shape asstripe-python: the SDK is open, the engine is the service.)
Live demo (no key): https://numproof.com ยท Docs: https://numproof.com/docs
30-second start
pip install numproof
from numproof import NumProof
np = NumProof.from_env() # NUMPROOF_API_KEY (get a free key: see below)
print(np.verify("120 + 90 + 340 + 15 == 565"))
# {'verdict': 'VERIFY', 'certificate': 'EXACT_ARITHMETIC', ...}
print(np.verify("a 50% loss needs a 100% gain to break even")) # VERIFY: (1-0.5)*(1+1.0)==1
print(np.verify("two 10% raises equal a 21% total increase")) # VERIFY
print(np.verify("operating margin is 18% when EBIT is 180 and revenue is 1000")) # VERIFY
No install? It's just HTTP:
curl -s https://numproof.com/demo -H 'Content-Type: application/json' \
-d '{"claim":"gross margin is 60% when gross profit is 600 and revenue is 1000"}'
Free API key:
curl -s https://numproof.com/signup -X POST -H 'Content-Type: application/json' -d '{}'
Audit a spreadsheet (with provenance)
rows = [["Revenue", 1000], ["COGS", 400], ["Gross Profit", 600], ["Gross Margin", "60%"]]
print(np.audit_rows(rows)["verdict"]) # PASS (600/1000 == 60%, footing, ties, ...)
# covenant rule packs: DSCR, Debt/EBITDA, current ratio, custom thresholds
print(np.covenant_rows(
[["EBITDA", 500], ["Debt Service", 300], ["Debt", 1200]],
rule_pack="credit_covenants_basic",
)["verdict"])
Every audit/diff/covenant result can be returned as a signed bundle + human-readable HTML/PDF
report (format="zip"). Recipients verify it without trusting you or NumProof:
curl -s https://numproof.com/audit/verify -H 'Content-Type: application/json' -d @bundle.json
# {"valid": true, "verdict": "PASS", "signer": "0x...", ...}
Use it from an AI agent (MCP)
NumProof ships an MCP server so Claude / OpenAI-style agents can call it as a tool โ gate every numeric claim before it reaches a user, report, or auditor.
python -m numproof.mcp
{ "mcpServers": { "numproof": { "command": "python", "args": ["-m", "numproof.mcp"] } } }
Or point any MCP client at the hosted descriptor: https://numproof.com/mcp.json.
See examples/ for runnable scripts (verify, audit, covenants, agent-gate, MCP).
Drop-in guardrails for agent frameworks
Verify the numbers your agent emits before it acts, in the framework you already use
(numproof/integrations/ โ each lazily imports its framework, so the numproof client stays stdlib-only):
# OpenAI Agents SDK โ output guardrail that trips on REFUTE
from agents import Agent
from numproof.integrations.openai_agents import numproof_output_guardrail
agent = Agent(name="...", instructions="...", output_guardrails=[numproof_output_guardrail()])
- OpenAI Agents SDK โ
numproof.integrations.openai_agents(output guardrail / tripwire) - Pydantic AI โ
numproof.integrations.pydantic_ai(output validator; raisesModelRetrywith the counterexample so the model self-corrects) - LangChain โ
numproof.integrations.langchain(a NumProofTool+ an output checker) - DeepEval (Confident AI) โ
numproof.integrations.deepeval(a deterministicNumProofMetric: VERIFY โ score 1.0, REFUTE โ score 0.0 with the counterexample on.reason) - Guardrails AI โ
numproof.integrations.guardrails(a HubValidator: REFUTE โFailResultwith the counterexample, so youron_failaction โ reask/fix/exception โ fires)
VERIFY โ pass ยท REFUTE โ block/retry with the counterexample ยท ABSTAIN โ pass-through (configurable). Runnable examples in examples/; install only the framework you use.
Independently re-checkable receipts (the part you can't fake)
Any verdict can be returned as a signed Verification Receipt โ and you re-check it offline, trusting neither the transport nor NumProof:
pip install "numproof[verify]"
numproof-verify receipt.json --signer 0x<published-NumProof-signer>
# OK independently re-derived + signature valid
It recovers the EIP-191 signer (tamper-evident) and, for value/agg/identity/sequence
claims, independently re-derives the verdict with stdlib Fraction + sympy. A tampered
field, a wrong signer, or a verdict that doesn't actually hold all fail loudly โ even a receipt
NumProof itself mis-signed is caught by the re-derivation. An agent can recompute a number for
itself; it cannot issue an independent, signed attestation a second party will accept. That
independence โ not the arithmetic โ is the product. Format + spec: RECEIPT_FORMAT.md.
Why deterministic (and why it matters)
Generic "AI guardrails" use a model to grade a model โ probabilistic, and itself can hallucinate.
NumProof recomputes the math exactly (rational arithmetic + symbolic identity checking) and
returns a reproducible verdict with a trace. When it can't prove something it says ABSTAIN
rather than guess. For finance, regulated, and agent workflows, "the number is provably right"
beats "another model thinks it looks right." Full table: comparison.md.
Pricing
| Plan | Price | For |
|---|---|---|
| Sandbox | $0 | web demo + free credits |
| x402 PAYG | $0.005 / call | agent-to-tool, no subscription |
| Builder | $29/mo | API + MCP + CLI, 2k credits |
| Pro | $99/mo | batch, webhooks, CI, signed exports, 10k credits |
| Finance Team | $299/mo | 5 seats, version diff, covenant packs, branded exports |
What's in this repo
The numproof Python SDK (NumProof client), the MCP server, and runnable examples โ all thin
HTTP clients to the hosted API. MIT licensed. The verification engine, finance audit logic,
formal (Lean) proof tier, and signing are the hosted service and are not in this repo.
Found a wrong verdict? Open an issue with the exact claim โ correctness is the whole product.
Install
Add NumProof to your client. Pick the one you use.
{
"servers": {
"numproof": {
"type": "http",
"url": "https://numproof.com/mcp"
}
}
}Add to `.vscode/mcp.json` in your workspace.
claude mcp add numproof -- uvx numproofcodex mcp add numproof -- uvx numproofamp mcp add numproof -- uvx numproof{
"mcpServers": {
"numproof": {
"command": "uvx",
"args": [
"numproof"
]
}
}
}Add to `claude_desktop_config.json`, then restart Claude Desktop.
{
"mcpServers": {
"numproof": {
"command": "uvx",
"args": [
"numproof"
]
}
}
}Add to `~/.cursor/mcp.json`, or `.cursor/mcp.json` for a single project.
{
"mcpServers": {
"numproof": {
"command": "uvx",
"args": [
"numproof"
]
}
}
}Add to `~/.codeium/windsurf/mcp_config.json`.
{
"mcpServers": {
"numproof": {
"command": "uvx",
"args": [
"numproof"
]
}
}
}Add to `cline_mcp_settings.json` via the MCP Servers panel.
{
"mcpServers": {
"numproof": {
"command": "uvx",
"args": [
"numproof"
]
}
}
}Add to `~/.gemini/settings.json`.
{
"mcpServers": {
"numproof": {
"type": "local",
"command": "uvx",
"args": [
"numproof"
],
"tools": [
"*"
]
}
}
}Add to `~/.copilot/mcp-config.json`, or run `/mcp add` inside the CLI.
{
"context_servers": {
"numproof": {
"command": {
"path": "uvx",
"args": [
"numproof"
]
}
}
}
}Add to your Zed `settings.json`.
uvx numproofRun `goose configure`, choose **Add Extension โ Command-line Extension**, and paste this command.
Score
39 / 100
Incomplete
- Documentation25/25
- Maintenance16/25
- Trust13/20
- Capability0/15
- Install experience15/15
- Documents what it does and how to connect
- Has a resolvable package or endpoint
- Exposes at least one tool, prompt or resource
- README has substantive content
- Includes a code example
- Documents its configuration
- Mentions credentials or security posture
- Last commit 66 days ago
- Has a release history
- Repository is not archived
- Licensed MIT
- Namespace verified in the official MCP registry
- Claimed by its owner
- Published under an organisation
- 0 tool(s) documented
- Provides prompt templates
- Provides resources
- 18 documented install method(s)
- Published to a package registry
- Offers a hosted endpoint โ no local install
Version history
| Versions | Published |
|---|---|
| 0.1.1Latest | Jun 26, 2026 |
| 0.1.0 | Jun 24, 2026 |