Skip to content

Commit b954229

Browse files
committed
Add x402 monetization (/.well-known/x402.json + middleware)
1 parent e6b7a09 commit b954229

2 files changed

Lines changed: 28 additions & 0 deletions

File tree

.well-known/x402.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"name": "ChromeDevTools/chrome-devtools-mcp",
3+
"description": "MCP server for Chrome DevTools",
4+
"accepts": [
5+
{
6+
"network": "eip155:8453",
7+
"asset": "USDC",
8+
"address": "YOUR_WALLET_ADDRESS"
9+
}
10+
],
11+
"resources": []
12+
}

x402-middleware-example.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// x402 payment check - framework-agnostic
2+
// Before responding to API requests, check for the x-payment header.
3+
// If missing, return HTTP 402 with your payment requirements:
4+
//
5+
// HTTP/1.1 402 Payment Required
6+
// Content-Type: application/json
7+
//
8+
// {
9+
// "accepts": [{ "network": "eip155:8453", "asset": "USDC", "address": "YOUR_WALLET" }],
10+
// "price": "0.01"
11+
// }
12+
//
13+
// If present, verify the payment signature with the facilitator:
14+
// POST https://facilitator.402.bot/verify
15+
//
16+
// Full guide: https://api.402.bot/mcp/setup

0 commit comments

Comments
 (0)