Skip to main content

x402 strict-v2 conformance engine: CLI, MCP server, batch auditor

Project description

x402-validator

Audit, monitor, and protect endpoints against the x402 strict-v2 standard.

pip install x402-validator

Quick examples

CLI:

x402-validate https://observer.137-184-67-179.sslip.io

Batch audit:

x402-validate endpoints.txt --output html --parallel 20

MCP server (Claude / Cursor / any MCP client):

echo '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | x402-mcp

Python:

import asyncio
from x402_validator._engine import run_audit

async def main():
    report = await run_audit("https://example.com")
    print(report.summary)

asyncio.run(main())

What it checks

Four core checks plus marketplace mode:

Check Purpose
manifest_discovery GET /.well-known/x402 returns a valid JSON manifest
caip2_compliance A payment header carries a valid CAIP-2 network
json_resilience HTTP 402 body is a JSON object, not a primitive
bazaar_compliance The 402 body has a valid extensions.bazaar block

For multi-product catalogs, use mode="marketplace" (see API.md).

Extended tools (separate repo)

Dashboard, API server, Stripe monetization, and proxy middleware: MSSATANASS/x402-validator-tools

Documentation

License

Apache-2.0.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

x402_validator-0.3.0.tar.gz (75.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

x402_validator-0.3.0-py3-none-any.whl (30.4 kB view details)

Uploaded Python 3

File details

Details for the file x402_validator-0.3.0.tar.gz.

File metadata

  • Download URL: x402_validator-0.3.0.tar.gz
  • Upload date:
  • Size: 75.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for x402_validator-0.3.0.tar.gz
Algorithm Hash digest
SHA256 8572c63bc81a6deb4cd329baf71598b037f96ccf8f5a3853f915bb7b6e7a41e6
MD5 c13af6d687091f7fce98bd52e3dffa41
BLAKE2b-256 8ced139f82bdf8697ee40ad65a659702e100bfb12d716dad635a9b528a3d671a

See more details on using hashes here.

File details

Details for the file x402_validator-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: x402_validator-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 30.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for x402_validator-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5450aa1880ebd2e463fa0443d47784e003c65adbbf01d568dbea961e19ca172c
MD5 c5d6e4e3c41bcc141f03cdc23e41b751
BLAKE2b-256 17e030883335dd7bd9306cc014da5f0d455298c1b57bd56c80b60e41bbca566c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page