zkzkMCP
Security

Logging and errors

Privacy-safe local observability and the typed zkMCP error model.

The repository uses evlog locally only. No Axiom, Sentry, or remote drain is configured.

Allowed authorization event fields

A successful event can include:

policyCommitment
executionCommitment
nullifier
proofDurationMs
contractAddress
network
transactionId
blockHeight
result
stage

Private paths such as prompts, tool arguments, amounts, thresholds, nonces, seeds, mnemonics, private keys, and policy secrets are excluded/redacted.

Typed errors

The error catalogs are grouped by stage:

CodeStatusRetryableMeaning
policy.AUTHORIZATION_DENIED403noone or more private policy constraints failed
replay.NULLIFIER_ALREADY_USED409noauthorization was already consumed
proof.SERVER_UNAVAILABLE503yeslocal/remote prover cannot be reached
proof.GENERATION_FAILED500yesprover could not construct the proof
midnight.CONTRACT_UNAVAILABLE503yesconfigured deployment cannot be reached
midnight.INDEXER_UNAVAILABLE503yespublic contract state cannot be queried
midnight.TX_SUBMISSION_FAILED502yestransaction could not be submitted/finalized
gateway.INVALID_MCP_REQUEST400norequest cannot be normalized safely
gateway.UPSTREAM_TOOL_FAILED502yesauthorization succeeded but the upstream handler failed

Internal catalogs contain more precise policy errors, but privacy-safe metadata deliberately collapses 403 policy failures before they cross the observability or MCP boundary.

On this page