Monarch
DiscoveryRaw agent sources are listed in /docs/manifest.json

AI Agent Payment Preflight

Use this page when searching for:

Run First


npx @monarch-shield/x402 doctor --ci --strict

npx x402-doctor

If code can move money, Doctor must pass before go-live. That includes agent

code that creates payment intents, sends wallet transactions, pays MCP tools,

handles 402 Payment Required, retries with X-PAYMENT, or pays another

agent.

What Doctor Checks

Doctor scans for detectable payment paths and fails when payment execution is

not protected by checkBeforePayment or a guarded callback. The goal is simple:

an agent should not be able to ship payment code where the guard is imported but

unused, placed after payment execution, hidden in a dead helper, or only present

in an unrelated wrapper.

What Still Belongs At Runtime

Use runtime controls for live money movement:

Monarch Doctor is the local/CI launch gate before that runtime stack ships.

CI Gate

Add this before merging agent-controlled payment code:


- name: Monarch Doctor

  run: npx @monarch-shield/x402 doctor --ci --strict

For the full GitHub Action path, see github-action.md.