diff --git a/.well-known/x402.json b/.well-known/x402.json new file mode 100644 index 0000000..66405bf --- /dev/null +++ b/.well-known/x402.json @@ -0,0 +1,12 @@ +{ + "name": "elliotllliu/agent-shield", + "description": "🛡️ Security scanner for AI agents, MCP servers & plugins — 30 rules, AST taint tracking, cross-file analysis, kill chain detection. Free & open source alternative to Snyk Agent Scan.", + "accepts": [ + { + "network": "eip155:8453", + "asset": "USDC", + "address": "YOUR_WALLET_ADDRESS" + } + ], + "resources": [] +} diff --git a/x402-middleware-example.ts b/x402-middleware-example.ts new file mode 100644 index 0000000..3945eef --- /dev/null +++ b/x402-middleware-example.ts @@ -0,0 +1,16 @@ +// x402 payment check — framework-agnostic +// Before responding to API requests, check for the x-payment header. +// If missing, return HTTP 402 with your payment requirements: +// +// HTTP/1.1 402 Payment Required +// Content-Type: application/json +// +// { +// "accepts": [{ "network": "eip155:8453", "asset": "USDC", "address": "YOUR_WALLET" }], +// "price": "0.01" +// } +// +// If present, verify the payment signature with the facilitator: +// POST https://facilitator.402.bot/verify +// +// Full guide: https://api.402.bot/mcp/setup