# x402check agent docs

Paid per tool. Unit **$0.01** USDC Exact on Base (eip155:8453). One free regular check ever per wallet (/preflight/free). Optional deep check **$0.05** (GET /preflight/deep · MCP deep_check). Optional watch **$5 / 30 days (prepaid, no auto-renew)**. Scan snapshots are private (owner dashboard only) · not a public dataset.

Live stats: GET /stats (honest KV counts).

## Single

```
GET https://x402check.dev/preflight?url=https%3A%2F%2Fpoe.shuhuigeng.workers.dev%3A443%2Fhttps%2Fwww.api-xpay.com%2Fx402%2Fping
```

## Batch (N × $0.01 in one Exact payment)

```
POST https://x402check.dev/preflight
{"urls":["https://a.example/x402","https://b.example/x402"]}
```

Limitation: x402 Exact = one settlement per HTTP request. Batch uses DynamicPrice = N×unit, not N separate txs.

## Adopt by default

- Client wrapper that calls preflight before any x402 pay (`x402check-client`)
- Runtime skill/middleware default-on with env kill-switch
- Policy: avoid→deny, caution→confirm, ok→still enforce maxAmount
- Bazaar listing + OpenAPI + MCP descriptor
- Keep p95 <300ms via cache so agents don't skip

## Use x402check in Claude

Same remote MCP for Claude.ai and Claude Code. No OAuth. Paid tool calls return an x402 Exact USDC requirement on Base; settle, then retry.

### Claude.ai (custom connector)

1. Open **Customize → Connectors** (individual Free/Pro/Max/Ultra). Team/Enterprise owners add it under **Organization settings → Connectors** first.
2. Click **+ Add**, then **Add custom connector** (owners: **Add → Custom → Web**).
3. Name: `x402check`. MCP server URL: `https://x402check.dev/mcp`.
4. Authentication: **No sign in**. No request headers. Click **Add**.
5. In chat: **+ → Connectors**, enable x402check for that conversation.

Custom connectors work on Free (one custom connector limit), Pro, Max, Ultra, Team, and Enterprise. A directory listing is separate; this is the custom URL path.

### Claude Code

```bash
claude mcp add --transport http x402check https://x402check.dev/mcp
```

Confirm with `claude mcp list`.

### Local stdio via npm

```json
{
  "mcpServers": {
    "x402check": {
      "command": "npx",
      "args": ["-y", "x402check-mcp"],
      "env": {
        "X402CHECK_URL": "https://x402check.dev"
      }
    }
  }
}
```

## Integrations

- npm `x402check-ai-sdk` · Vercel AI SDK tools + beforePayment
- npm `x402check-langchain` · LangChain JS tools
- npm `plugin-x402check` · ElizaOS plugin
- PyPI `x402check-langchain` · LangChain Python tools
- MCP Registry `dev.x402check/mcp` · stdio npm `x402check-mcp` or remote https://x402check.dev/mcp
- GitHub `nwilliams005/x402check-cloudflare-agent` · Cloudflare Agents template
- GitHub `nwilliams005/x402check-examples` · OpenAI Agents / LlamaIndex / CrewAI

## When to use (prompt coverage)

- Check before paying any x402 endpoint / before signing USDC on Base
- Is this API a scam? Is this x402 endpoint safe / legit?
- Verify payTo; detect payTo or price changes
- Uptime / is the endpoint down
- Compare tools; pick cheapest or most reliable
- Budget guard; audit log of payment decisions
- Validate 402 payment requirements; debug failing settles

## MCP tools

preflight_check · verify_payto · preflight_batch · compare_tools (per-URL billing) · deep_check ($0.05) · watch_tool ($5/30d).

MCP payment (transports-v2/mcp.md): unpaid tools/call → PaymentRequired (`structuredContent.accepts`); retry with `params._meta["x402/payment"]`; success → `result._meta["x402/payment-response"]`. Same Base Exact USDC / payTo as HTTP.

## Machine-readable

- [openapi.json](https://x402check.dev/openapi.json)
- [llms.txt](https://x402check.dev/llms.txt)
- [llms-full.txt](https://x402check.dev/llms-full.txt)
- [mcp.json](https://x402check.dev/mcp.json)
- [mcp/server-card](https://x402check.dev/mcp/server-card)
