Playground
Inspect the final verified authorization scenarios, compare private inputs with public receipts, or generate fresh local Midnight proofs.
The playground is a developer inspection surface, not a separate product dashboard. It uses the same scenarios that validate the real MCP + Midnight gateway path.
How to read it
The surface is intentionally organized around the authorization boundary:
- Private request — the application values known to the gateway/prover.
- Relevant private constraints — only the policy rules that matter to the selected capability.
- Authorization decision — whether the circuit allowed the action before upstream execution.
- Public receipt — commitments and Midnight transaction metadata exposed after a successful authorization.
- Not exposed — values that do not appear as raw public ledger fields.
Recorded and live modes
Recorded mode works without Midnight running and uses receipts captured from the final 29 August local verification run. Live mode appears when the local demo API is available and produces a fresh authorization transaction for the selected scenario.
payments.transferLegalAgent-01£2,750client settlement accountnot requiredLegalAgent-01£5,000£4,0000x8b701e17…7e9eaa99£2,750 is below both the private approval threshold and hard maximum.
Payment executed after Midnight proved the hidden numeric rule.
0x8b701e17a4…a77e9eaa990xef1c6919b1…500e5e07d00x275b33c1ce…61097eeb9b00b4a29f8…95d05c3ddbe8f734…45793acundeployedValues not exposed on the public ledger (5)
Scenarios
The current policy surface deliberately covers three different authorization classes.
| Capability | What is being proven |
|---|---|
documents.read | requested matter/resource matches the private allowed resource |
email.send | trusted human approval has been verified by the gateway |
payments.transfer | amount stays below a private hard maximum and satisfies the private approval-threshold rule |
Each capability has both allow and deny examples. Denied requests return before the upstream tool handler is invoked.
Run live proving locally
From the repository root:
npm install
npm run demo:uiThen open:
http://localhost:4545/docs/playgroundThe command starts the local Midnight stack, deploys the authorization contract, runs the zkMCP demo API on 127.0.0.1:8787, and starts the Fumadocs site with that API configured.
Successful local authorizations currently take roughly 20–25 seconds. A private policy denial can return much sooner because the request does not complete the successful proof-backed transaction path.
What the playground does not simulate
The receipt values shown in recorded mode are not invented UI fixtures. They came from the final verified MCP + Midnight transactions documented under Verification evidence.
However, the playground's upstream tools are still demo implementations. The purpose of the surface is to inspect the authorization boundary, not to pretend that a real bank transfer or external email provider is connected.
For the exact request path, read Request lifecycle. For the fields covered by each circuit branch, read Circuit constraints.