x402-farm

x402-farm

MCP server providing 10 pay-per-call APIs for web scraping, DNS, email validation, and French business data, with autonomous micropayments via the x402 protocol (USDC on Base).

Category
Visit Server

README

x402-farm

10 pay-per-call APIs that AI agents pay for autonomously — via the x402 protocol (USDC on Base). No account, no API key, no subscription: the agent gets an HTTP 402, signs a micro-payment, retries. Live at https://x402-farm.vercel.app.

Also ships an MCP server so Claude / Cursor / any MCP client can use these as paid tools.

The 10 APIs

Route Price What it does
POST /v1/extract $0.005 URL → main content as clean markdown (JS-rendered, real browser)
POST /v1/render $0.005 URL → full HTML after JavaScript execution
POST /v1/screenshot $0.01 URL → PNG (optional fullPage)
POST /v1/pdf $0.01 URL → A4 PDF
POST /v1/links $0.005 URL → deduplicated links, internal/external + anchor text
POST /v1/meta $0.005 URL → SEO meta, OpenGraph, canonical, JSON-LD
GET /v1/fr/entreprise?q= $0.02 French company lookup by name or SIREN/SIRET: officers, NAF, HQ, status
GET /v1/fr/geocode?q= $0.005 Geocode any French address incl. overseas territories
GET /v1/dns?domain= $0.005 Full DNS records: A, AAAA, MX, TXT, NS, SPF
GET /v1/email/validate?email= $0.005 Email validation: syntax + MX (no email sent)

Free (no payment): GET / (JSON catalog) · /llms.txt · /openapi.json · POST /free/extract · GET /free/entreprise (truncated previews).

Pay from an agent

import { wrapFetchWithPaymentFromConfig } from "@x402/fetch";
import { ExactEvmScheme } from "@x402/evm";
import { privateKeyToAccount } from "viem/accounts";

const pay = wrapFetchWithPaymentFromConfig(fetch, {
  schemes: [{ network: "eip155:8453", client: new ExactEvmScheme(privateKeyToAccount(PK)) }],
});
const r = await pay("https://x402-farm.vercel.app/v1/dns?domain=example.com");
console.log(await r.json()); // paid $0.005 in USDC, got the data

Use as an MCP server (Claude / Cursor)

{
  "mcpServers": {
    "x402-farm": {
      "command": "npx",
      "args": ["-y", "github:Ghost11777/x402-farm"],
      "env": {
        "X402_PRIVATE_KEY": "0x…",
        "X402_FARM_URL": "https://x402-farm.vercel.app"
      }
    }
  }
}

Without X402_PRIVATE_KEY, only the free preview tool works. With a funded Base USDC wallet, every tool pays per call from that wallet.

Run it yourself

npm install && npx playwright install chromium
cp .env.example .env      # set PAY_TO to your USDC address; leave empty for free dev mode
npm start

Deploy: vercel deploy --prod (serverless Chromium via @sparticuz/chromium) or docker build -t x402-farm . && docker run -p 3402:3402 --env-file .env x402-farm.

Notes

  • NETWORK=eip155:8453 (Base mainnet) uses the Coinbase CDP facilitator; eip155:84532 (Base Sepolia) uses the public x402.org facilitator for testing.
  • Anti-SSRF guard blocks private/link-local addresses. In-memory TTL cache. Browser concurrency semaphore.
  • Listed on x402scan.

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured