Get the full MPCP artifact chain running locally in under 5 minutes.
- Node.js 18+
- npm
git clone https://github.com/mpcp-protocol/mpcp-reference.git
cd mpcp-reference
npm installnpm run buildRun the parking session example. This creates ephemeral keys, generates the full MPCP chain, writes artifacts to disk, and runs verification.
npm run example:parkingYou should see verification pass (exit 0). The script writes artifacts to examples/parking/.
The example generates the MPCP authorization chain:
| File | Artifact | Description |
|---|---|---|
| policy-grant.json | PolicyGrant | Permission envelope (allowedRails, allowedPurposes, policyHash, expiresAt, budgetMinor) |
| budget-auth.json | BudgetAuthorization | Unsigned spending envelope |
| signed-budget-auth.json | SignedBudgetAuthorization (SBA) | Signed budget for this payment (maxAmountMinor) |
| settlement.json | Settlement | Executed settlement record (via Trust Gateway → XRPL) |
| settlement-bundle.json | Bundle | All artifacts combined for verification |
Chain flow: PolicyGrant → SBA → Trust Gateway → XRPL Settlement → Verification
Verify the settlement bundle with the CLI:
npx mpcp verify examples/parking/settlement-bundle.json --explainThe --explain flag shows step-by-step diagnostics. The bundle is self-contained (includes public keys), so verification works without env vars.
View fleet policy constraints:
npx mpcp policy-summary examples/machine-commerce/fleet-policy.jsonOr validate against a reference profile:
npx mpcp policy-summary examples/machine-commerce/fleet-policy.json --profile parking- What is MPCP? — Understand the protocol
- Build a Machine Wallet — Integrate into your app
- Parking Example — Deep dive on the example flow