mcpField
S
scrape402

scrape402

Remote
github.com/scrape402Developer Tools0Updated 12w ago
Repository

About scrape402

scrape402 provides examples for agents that call x402-gated APIs and pay per successful request in USDC on Base. The examples cover chat, embeddings, web search, and prepaid metered loops without account signup or API keys.

Key features

  1. 01USDC payment per API call
  2. 02OpenAI-compatible chat examples
  3. 03Web search example
  4. 04Python embeddings example
  5. 05Prepaid high-frequency metering

Use cases

  1. 01Run paid LLM chat requests
  2. 02Search the web without a search account
  3. 03Create embeddings for RAG loops
  4. 04Make frequent calls using prepaid metering

MCP support

The README links to an MCP tools catalog at the x402 service endpoint, but does not describe an MCP server implementation.

Configuration

Remote servers need no local install. Pick your client, then copy the config or install in one click.

Endpointhttps://x402.shizu.me/mcp/rpc
Copy install command
Claude CodeTerminal
Cursor.cursor/mcp.json
VS Code.vscode/mcp.json
Claude Desktopclaude_desktop_config.json
Windsurf~/.codeium/windsurf/mcp_config.json

Run commands in a terminal; paste JSON into the client’s MCP config and restart. Servers that need sign-in will prompt on first connect.

Tools

5
ParameterTypeRequiredDescription
maxintegerNo
minintegerNo
bytesintegerNo1-256, default 16

Details

From the project README

x402 examples — pay-per-call APIs for AI agents

Working examples for calling x402-gated HTTP APIs: your agent pays USDC per request on Base — no signup, no API keys, no subscription.

All examples run against x402.shizu.me (77 live endpoints, prices from $0.001/call): an OpenAI-compatible LLM gateway (/v1/chat/completions, /v1/embeddings, /v1/models), web search, a code sandbox, web scraping, live crypto/market data, verifiable randomness, and a prepaid off-chain metering rail for high-frequency loops (100+ calls/min, no per-call gas).

How x402 works

  1. Call any endpoint → the HTTP 402 response carries signed USDC payment requirements (price, asset, recipient).
  2. Pay — your x402 client signs the payment locally and retries automatically.
  3. Served — settlement is on-chain; you are only charged when the call succeeds. Errors and 4xx never settle.

Fund a wallet with a few dollars of USDC on Base, export its private key, and every example here just works.

JavaScript

npm install x402-fetch viem
export X402_PRIVATE_KEY=0x...   # wallet holding USDC on Base
node js/chat.mjs

Python

pip install x402 eth-account httpx
export X402_PRIVATE_KEY=0x...
python python/chat.py

Examples

FileWhat it shows
js/chat.mjsOpenAI-compatible chat completion, paid per call
js/search.mjsLive web search without a search-API account
python/chat.pyChat completion via the Python x402 client
python/embeddings.pyOpenAI-shape embeddings for RAG loops
python/metered_loop.pyPrepay once, then 100+ calls/min off-chain

Just looking?

Every route quotes its price on a free unpaid request:

curl -i https://x402.shizu.me/crypto        # → 402 + payment requirements
curl https://x402.shizu.me/llms.txt          # full catalog, agent-readable

Links

Live service: https://x402.shizu.me · OpenAPI: https://x402.shizu.me/openapi.json · MCP tools: https://x402.shizu.me/.well-known/mcp-tools · Contact: [email protected]

MIT licensed.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.