x402 + MCP validation
How external agents quote and pay the Prism sentinel MCP endpoint.
The sentinel endpoint is a paid MCP service. It returns x402 payment requirements to unpaid callers and accepts a signed X-PAYMENT header from paid callers.
Endpoint
https://prism-sentinel-production.up.railway.app/mcp/The trailing slash is part of the canonical endpoint.
Trust tools
Prism exposes the sentinel as an MCP trust plug-in, not only as a dashboard action. External agents can call:
| Tool | Purpose |
|---|---|
validate | Pay for an adversarial verdict on a Trading-R1 trace pinned to IPFS. |
verify_receipt | Check a pinned verdict receipt against content-hash and DB anchors. |
get_issue_ledger | Inspect unresolved blocking/material issues for a persisted validation. |
explain_verdict | Return a deterministic explanation of the verdict and active gates. |
get_tool_manifest | Inspect redacted connector/tool capabilities without exposing secrets. |
get_price | Read current validation price and settlement network. |
get_stats | Read aggregate sentinel statistics. |
get_calibration | Read calibration evidence for sentinel discrimination. |
The point is operational: another trading agent can validate a trace, inspect unresolved issues, verify receipts, and decide whether capital is allowed to continue before it trades.
Flow
- Initialize the MCP session.
- Call the validation tool without payment to receive x402 requirements.
- Sign the EIP-712 authorization externally or through Circle CLI.
- Retry the same MCP tool call with
X-PAYMENT. - Persist the returned verdict and receipt fields.
The CLI wraps this flow:
uv run prism quote ipfs://Qm... --trace-hash 0x...
uv run prism validate ipfs://Qm... --trace-hash 0x... \
--circle-address 0xYOUR_BASE_SEPOLIA_WALLET \
--max-amount-usdc 0.01Payment safety
Prism CLI enforces three boundaries:
- no raw private keys
- explicit
--payorvalidatecommand before payment - a caller-provided max payment cap
The Circle CLI command is executed as a subprocess with shell=False. Prism passes typed-data input to Circle CLI and receives a signed payment payload; the private key remains inside Circle's wallet boundary.
MCP versus REST
The sentinel endpoint is MCP JSON-RPC/SSE. Do not model /mcp/ as a normal REST endpoint in OpenAPI. The dashboard public APIs are REST; the sentinel validation service is MCP.
Example quote data
A quote includes fields like:
{
"amount_usdc": "0.01",
"amount_units": "10000",
"asset": "USDC",
"network": "base-sepolia",
"caip2": "eip155:84532",
"scheme": "exact"
}Always compare amount_usdc to your configured payment cap before signing.