# X402 Config Generator — REST API endpoint `x402-config-generator`

Return ready-to-paste x402 payment integration code plus the install command: a paywalled SERVER (Express, Hono, Next.js, Fastify, Gin, FastAPI, Flask) with priced routes, or a paying CLIENT (fetch, axios, Go, Python httpx/requests) for the chosen networks.

- Category: generators
- MCP server: https://mcp.findutils.com/ (Streamable HTTP, no API keys, 120 req/min per IP)
- REST endpoint: POST https://api.findutils.com/api/tools/x402-config-generator/execute (no API keys, 60 req/min per IP)
- Reference page: https://findutils.com/api/x402-config-generator/
- Same tool on the other surface: https://findutils.com/mcp/x402-config-generator/

## Call the endpoint (verified example)

```bash
curl -X POST https://api.findutils.com/api/tools/x402-config-generator/execute \
  -H "Content-Type: application/json" \
  -d '{
    "role": "server",
    "framework": "express"
  }'

# Parameter schema
curl https://api.findutils.com/api/tools/x402-config-generator
```

## Input schema

| Argument | Type | Required | Description |
|---|---|---|---|
| `role` | string (server \| client) | no | Generate code for the seller (server) or the buyer (client). Default: `"server"`. |
| `framework` | string (express \| hono \| nextjs \| fastify \| gin \| fastapi \| flask) | no | Server framework (role=server). Default: `"express"`. |
| `facilitator_url` | string | no | x402 facilitator URL (role=server). Default: `"https://x402.org/facilitator"`. |
| `routes` | array | no | Paid routes (role=server): objects with path, method, price (e.g. "$0.001"), scheme (exact\|upto), network (CAIP-2 id such as "eip155:8453"), pay_to (wallet address), description, mime_type. |
| `enable_bazaar` | boolean | no | Advertise routes in the x402 Bazaar discovery list (role=server). Default: `false`. |
| `enable_payment_id` | boolean | no | Attach a payment id to each settlement (role=server). Default: `false`. |
| `client_type` | string (fetch \| axios \| go \| python-httpx \| python-requests) | no | Client library (role=client). Default: `"fetch"`. |
| `networks` | array | no | Networks the client can pay on (role=client). |
| `base_url` | string | no | Base URL of the paid API (role=client). Default: `"https://api.example.com"`. |

Example arguments (verified):

```json
{
  "role": "server",
  "framework": "express"
}
```

OpenAPI 3.1 spec: https://findutils.com/api/openapi.json · Interactive docs: https://findutils.com/api/docs/

## Also an MCP tool

```bash
claude mcp add findutils --transport http https://mcp.findutils.com/
```

Then ask the client to call `findutils:x402_config_generator`. Full MCP reference: https://findutils.com/mcp/x402-config-generator/

---
Full catalog: GET https://api.findutils.com/api/tools · https://findutils.com/api/ · https://findutils.com/llms.txt
