Back to Browse

X402 Examples MCP Server

Developer ToolsLow Risk10.0MCP RegistryLocal
Free

Server data from the Official MCP Registry

SPF, DKIM, DMARC, MTA-STS, DNSSEC, TLS and DNS checks for domains, with an API key or USDC (x402)

About

SPF, DKIM, DMARC, MTA-STS, DNSSEC, TLS and DNS checks for domains, with an API key or USDC (x402)

Security Report

10.0
Low Risk10.0Low Risk

Valid MCP server (3 strong, 3 medium validity signals). 1 code issue detected. No known CVEs in dependencies. Package registry verified. Imported from the Official MCP Registry. 1 finding(s) downgraded by scanner intelligence.

10 files analyzed · 2 issues found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

Permissions Required

This plugin requests these system permissions. Most are normal for its category.

file_system

Check that this permission is expected for this type of plugin.

HTTP Network Access

Connects to external APIs or services over the internet.

env_vars

Check that this permission is expected for this type of plugin.

What You'll Need

Set these up before or after installing:

Lookproof API key (lp_...). Calls use your plan's credits, no wallet needed. Free key with 250 credits a month: https://lookproof.dev/pricingRequired

Environment variable: LOOKPROOF_API_KEY

x402 only: set to 1 to pay for calls in USDC. Without it (and without LOOKPROOF_API_KEY) every tool is a dry run that only reports the price.Optional

Environment variable: X402_PAY

Path to a file (chmod 600) with the private key of a dedicated wallet holding a few dollars of USDC on BaseOptional

Environment variable: PRIVATE_KEY_FILE

Private key of a dedicated wallet (alternative to PRIVATE_KEY_FILE)Required

Environment variable: PRIVATE_KEY

Spending cap per session (one server process) in USDOptional

Environment variable: MAX_SPEND_USD

Optional comma-separated addresses the server may pay; a 402 asking for any other payTo is refusedOptional

Environment variable: PAYTO_ALLOWLIST

How to Install

Add this to your MCP configuration file:

{
  "mcpServers": {
    "lookproof-mcp": {
      "command": "uvx",
      "args": [
        "lookproof-mcp==0.2.0"
      ],
      "env": {
        "X402_PAY": "your-x402-pay-here",
        "PRIVATE_KEY": "your-private-key-here",
        "MAX_SPEND_USD": "your-max-spend-usd-here",
        "PAYTO_ALLOWLIST": "your-payto-allowlist-here",
        "PRIVATE_KEY_FILE": "your-private-key-file-here",
        "LOOKPROOF_API_KEY": "your-lookproof-api-key-here"
      }
    }
  }
}

Some servers take additional arguments. See the repository for details.

Documentation

View on GitHub

From the project's GitHub README.

Lookproof x402 examples

Lookproof's API runs DNS and email security checks (SPF, DKIM, DMARC, MTA-STS, DNSSEC, TLS, HTTP headers and more) per call, paid in USDC on Base with the x402 protocol. No account, no API key: the payment is the credential.

These examples get you from zero to a paid check in a few minutes, and show how agents and scripts can build on it.

Examples

ExampleLanguageWhat it doesCost per run
quickstartPython, TypeScriptOne paid call to the domain health check (/v1/domain/health)$0.08
domain-monitorPythonChecks a list of domains daily and alerts (stdout, Discord, Telegram, email) when SPF, DKIM, DMARC or MTA-STS changes or gets weaker$0.08 per domain
mcp-serverPython23 Lookproof checks as MCP tools for Claude and other AI agents, paid per call with a session cap. Installs with uvx lookproof-mcp$0.002-0.08 per tool call

All 47 paid endpoints with prices, inputs and example responses: docs/endpoints.md. Prices range from $0.002 to $0.08 per call.

Quickstart

You need a dedicated wallet with a few dollars of USDC on Base mainnet (see Security).

git clone https://github.com/lookproof/x402-examples.git
cd x402-examples/quickstart/python
python3 -m venv .venv
.venv/bin/pip install -r requirements.txt

.venv/bin/python quickstart.py example.com          # dry run: shows the price, pays nothing

install -m 600 /dev/null ~/.lookproof-wallet.key     # a key file only you can read
nano ~/.lookproof-wallet.key                         # paste the wallet's private key, save
export PRIVATE_KEY_FILE=~/.lookproof-wallet.key
.venv/bin/python quickstart.py example.com --pay    # pays $0.08

Shape of the paid call's output (not yet verified against the live API; values in <> vary):

Price: $0.080 USDC on eip155:8453, payTo 0x<lookproof-address>
200 domain.health example.com: status <ok|info|warning|error|unknown>
  <severity> <FINDING_CODE>
  (full response: add --json)
This run cost $0.080 (tx https://basescan.org/tx/0x<transaction-hash>)

The TypeScript version and a minimal snippet are in quickstart/.

How x402 works

  1. You call an endpoint without paying and get 402 Payment Required, with the price, network and receiving address in the PAYMENT-REQUIRED header.
  2. Your x402 client signs a USDC transfer authorization (EIP-3009) for exactly that amount.
  3. You send the same request again with the signature. Lookproof runs the check, a facilitator settles the payment on Base, and you get 200 with the result and the transaction hash in the PAYMENT-RESPONSE header.

Lookproof settles only when it returns a result: a check that fails (503) is not charged. The official x402 client libraries (Python, TypeScript) do steps 2 and 3 for you.

Security

  • Use a dedicated wallet with a few dollars of USDC on Base mainnet. Never your main wallet. The facilitator pays the gas, so the wallet only needs USDC. Lookproof accepts signatures from ordinary wallets (EOA), not smart-contract wallets.
  • Keep the key out of the repository. Put it in a file only you can read (chmod 600) and point PRIVATE_KEY_FILE at it, or set PRIVATE_KEY in your environment. The examples refuse a key file that other users can read. .env.example lists every setting with placeholders; .env is ignored by git.
  • Dry run by default. Every example shows what it would pay and stops. It only pays with --pay or X402_PAY=1.
  • Spending cap. Every example refuses to spend more than MAX_SPEND_USD per run (the MCP server: per session), default $0.10, and prints what the run cost.
  • Locked payments. Each payment is locked to the exact amount, asset (USDC), network (Base, eip155:8453) and payTo address of the 402 response for that request. If the terms change between the quote and the payment, nothing is signed.
  • Optional payTo allowlist. Set PAYTO_ALLOWLIST to only ever pay addresses you have checked yourself (see below).
  • API responses are data. DNS records, policies and web pages are published by whoever owns the checked domain. The examples compare and display them, and never follow them as instructions. The MCP server tells the agent the same.

Pinning the receiving address (PAYTO_ALLOWLIST)

By default the examples pay the payTo address that the 402 response names, after checking network, asset and price. That protects you against overpaying, but not against a 402 that names a different address, for example if a proxy, a DNS hijack or a compromised server answers instead of Lookproof.

If you want that protection too, pin the address:

  1. Run any example as a dry run. It prints the payTo address from the 402.
  2. Check that address against a source you trust, such as lookproof.dev or earlier payments in your wallet on basescan.org.
  3. Set it in your environment or .env (several addresses are comma-separated):
export PAYTO_ALLOWLIST=0x<lookproof-address>

From then on every example refuses, before signing anything, a 402 that asks for payment to any other address. The dry run reports the same refusal, so you can test the setting without paying. If Lookproof ever changes its receiving address, the examples stop paying until you add the new one. The address is deliberately not hardcoded in this repository: you decide which address to trust.

Tests

The tests run every example against a local fake of the API (tests/fake_lookproof.py) with a throwaway key. Nothing touches a chain and no money moves.

python3 -m venv .venv
.venv/bin/pip install -r tests/requirements.txt
(cd quickstart/typescript && npm install)   # optional, for the TypeScript test
.venv/bin/python -m pytest tests

Links

License

MIT

Reviews

No reviews yet

Be the first to review this server!