Skip to main content
Glama

x402-test-mcp

Can your AI agent actually pay for things? Prove it in one tool call.

An MCP server with a single tool, test_agent_payment, that makes a real x402 payment ($10 USDC on Base) to the Sycamore Agent Payment Test endpoint and returns an Ed25519-signed diagnostic report card covering every step of the flow:

  • HTTP 402 challenge handling

  • Payment authorization (gasless EIP-3009 signature)

  • Facilitator verification

  • On-chain settlement proof (transaction hash)

  • Latency and request-origin diagnostics

No signup, no API keys — just a funded wallet.

Install

Installs straight from GitHub — no npm registry needed:

// Claude Desktop / Cursor / any MCP client config
{
  "mcpServers": {
    "x402-test": {
      "command": "npx",
      "args": ["-y", "github:sansscott/x402-test-mcp"],
      "env": {
        "X402_PRIVATE_KEY": "0x..." // funded wallet (USDC on Base)
      }
    }
  }
}

Without X402_PRIVATE_KEY (or with dry_run: true) the tool fetches the free 402 challenge only — useful for checking that your client parses x402 payment requirements.

Related MCP server: obolpay-x402-mcp

Tool

test_agent_payment

Input

Type

Description

dry_run

boolean?

Fetch the 402 challenge without paying

receipt_email

string?

Email a signed receipt with the tx hash

Returns the HTTP status, settlement object (tx hash, network, payer), and the full signed report card. Verify the signature against /pubkey.

Cost

$10.00 per paid call, settled in USDC on Base. The endpoint's 402 response (accepts[]) is the source of truth for current price and network.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers