Metadata-Version: 2.4
Name: pramiti-mcp-verify
Version: 0.1.0
Summary: Standalone offline verifier for SEP-2828 signed execution records (MCP decision/outcome pairs)
License: MIT
Project-URL: Homepage, https://getpramiti.com
Project-URL: Repository, https://github.com/pramiti-labs/epistom
Keywords: mcp,sep-2828,attestation,audit,verifier,pramiti
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Security
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: cryptography>=42.0
Requires-Dist: rfc8785>=0.1.4
Dynamic: license-file

# pramiti-mcp-verify

Standalone, offline verifier for **SEP-2828 signed execution records** — the
paired decision/outcome records a governing MCP server or proxy emits for
every tool call ([modelcontextprotocol#2828](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2828)).

Verifies, with no vendor dependency (`rfc8785` + `cryptography` only):

1. **Signatures** — detached ES256/HS256 over the JCS-canonical record body
   excluding `signature` (ES256 as raw `r||s` in 128 lowercase hex chars).
2. **Instance binding** — `backLink.attestationDigest` recomputation against
   the SEP-2787 attestation, or against a named, versioned fallback
   projection (`tools_call_params_plus_meta_authorization_binding_v1`,
   `praxom_payload_hash_binding_v1`).
3. **Pairing** — Check A (shared `backLink`) + Check B (the outcome's
   `decisionDigest` over the FULL signed decision record).
4. **Consistency** — enum validity; a `block` decision paired with an
   `executed` outcome is rejected as a contradiction.
5. **Result commitments** — `ArgsProjection` self-consistency
   (`projectionDigest` over the projection bytes).

## Usage

```bash
# Verify a Praxom export bundle (POST /attestations/export, format=sep2828)
pramiti-mcp-verify bundle.json --pubkey es256_public.pem

# Run a record_conformance_v0-layout vector suite against this implementation
pramiti-mcp-verify --vectors tests/vectors/sep2828/record_conformance_v0
```

Exit code `0` when every record verifies, `1` otherwise; a JSON summary is
printed to stdout either way.

Accepted bundle shapes: the Praxom export bundle
(`{"spec": "SEP-2828", "records": [...]}`), a bare
`{"decision": ..., "outcome": ...}` pair, or a list of pairs.

## Not the flight-recorder verifier

`pramiti-fr verify` checks the vendor-embedded **flight-recorder** store.
`pramiti-mcp-verify` (this tool) checks **SEP-2828 wire records** from an
enterprise proxy. Different stores, different audiences, deliberately
separate CLIs.
