{
  "markdown": "# x402-extract-mcp\n\nA paid MCP server that gives AI agents structured product data from any URL.\n\nEach `extract_product` tool call:\n1. Renders the URL through a headless browser\n2. Extracts a `schema.org/Product` JSON blob (name, price, currency, availability, variants, …)\n3. Costs **$0.01 USDC** per call, paid automatically from the configured wallet via [x402](https://x402.org)\n\nNo API keys. No subscription. The agent pays the toll, gets the data.\n\n## Install in Claude Desktop / Cursor / Windsurf\n\nAdd this to your MCP config (`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):\n\n```json\n{\n  \"mcpServers\": {\n    \"x402-extract\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"x402-extract-mcp\"],\n      \"env\": {\n        \"BUYER_PRIVATE_KEY\": \"0xYOUR_PRIVATE_KEY\"\n      }\n    }\n  }\n}\n```\n\nRestart your MCP client. You'll see an `extract_product` tool available.\n\n## What you need\n\nA wallet on **Base Sepolia** (testnet) funded with:\n\n- A small amount of ETH for gas (free from <https://www.coinbase.com/faucets/base-ethereum-sepolia-faucet>)\n- USDC for payments (free from <https://faucet.circle.com>, select Base Sepolia)\n\nGenerate a throwaway key:\n\n```bash\nnode -e \"const {generatePrivateKey,privateKeyToAccount}=require('viem/accounts');const k=generatePrivateKey();console.log('PRIVATE_KEY=',k);console.log('ADDRESS=',privateKeyToAccount(k).address)\"\n```\n\nUse the printed address to claim from faucets, then put the printed key into your MCP config.\n\n## Try it\n\nIn Claude Desktop, paste a product URL and ask:\n\n> Extract this product page using extract_product: https://stormkeep-odl.bandcamp.com/album/the-nocturnes-of-iswylm-2\n\nYou'll get back structured JSON with the product name, price, formats, availability, etc. The on-chain transfer is visible at <https://sepolia.basescan.org>.\n\n## What the response looks like\n\n```json\n{\n  \"product\": {\n    \"name\": \"The Nocturnes Of Iswylm\",\n    \"description\": \"...\",\n    \"brand\": \"Stormkeep\",\n    \"price\": 10,\n    \"currency\": \"USD\",\n    \"availability\": \"preorder\",\n    \"variants\": [\n      { \"name\": \"Format\", \"values\": [\"Digital Album\", \"12\\\" Vinyl (black)\", ...] },\n      { \"name\": \"Vinyl Color\", \"values\": [\"Black\", \"Violet\", ...] }\n    ],\n    \"images\": [],\n    \"url\": \"https://...\"\n  },\n  \"page\": { \"title\": \"...\", \"status\": 200, \"render_ms\": 2879 },\n  \"extraction\": { \"model\": \"claude-haiku-4-5\", \"input_tokens\": 4479, \"output_tokens\": 405 }\n}\n```\n\n## Configuration\n\n| Env var             | Required | Default                                                   |\n| ------------------- | -------- | --------------------------------------------------------- |\n| `BUYER_PRIVATE_KEY` | yes      | —                                                         |\n| `EXTRACT_URL`       | no       | `https://x402-extract-production.up.railway.app/extract`  |\n\nTo point the MCP server at your own seller deployment, override `EXTRACT_URL`.\n\n## How it works\n\n```\nClaude Desktop ──tool call──> MCP server (this package, on your machine)\n                              │\n                              │ x402 payment + URL\n                              ▼\n                              Public seller (Hono + Playwright + Claude on Railway)\n                              │\n                              │ structured JSON\n                              ▼\n                              MCP server ──tool result──> Claude Desktop\n```\n\nThe MCP server doesn't render pages itself. It signs an x402 payment with the buyer's wallet, sends the payment + URL to a public seller endpoint, and returns the seller's response. The seller does the actual headless rendering and Claude-driven schema extraction.\n\n## What works, what doesn't\n\n**Works well:**\n- Bandcamp release pages\n- Most small/medium Shopify stores\n- Tesla Shop product pages\n- Any site that doesn't have aggressive anti-bot\n\n**Will return a fetch error** (page status 403/429/no-content):\n- Amazon, Walmart, Target, Best Buy\n- Most luxury brand sites on Cloudflare\n- LinkedIn, Twitter/X (auth wall)\n\nA future version will add residential-proxy support to handle these.\n\n## License\n\nMIT\n",
  "bytes": 4102,
  "sha": "2edfc744711f4f572c009d506452e0d9d7bd6876bd95d7a14c90cd57e1805c41",
  "repo_slug": "ultrastarz/x402-extract-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_ultrastarz_x402_extract_61b65be9/readme"
}