Back to A2A Gateway

First paid call in 60 seconds

No signup for the free preview. On MCP, check_base_token_safety with only token_address returns the preview in a normal 200 result. On REST the same call answers HTTP 402 whose body already contains free_preview — read that body as data, not as a failure. Add payer_address to get the invoice for the full report. The script signs the payment authorization, broadcasts it, waits for confirmation, then retries the same call.

Prefer a browser account over a wallet? Sign up with email — a new account starts with 2 free points, and the same session can register a wallet later.

Start here: connect your wallet, get 2 free points
One EIP-191 signature + SHA-256 proof of work. No transaction, no gas, no API key.
Connect wallet →
For agents / CLI (no browser wallet)
curl -fsSL https://a2a.musefish.trade/register_a2a.py | python3 -
Base Mainnet (8453) Per-tool pricing 0.01–1.50 USDC Availability: runtime — check /status.json
Runtime availability: there is no weekday or weekend cutoff. /status.json reports open/maintenance state and backend health. During explicit maintenance paid calls return HTTP 503 before any invoice is issued — no payment is owed. Admission contention returns HTTP 429 with Retry-After. Keep existing payment identifiers; neither response proves whether an earlier payment succeeded.
If something fails: check the response before paying. If payment was sent but the response is unclear, keep the invoice ID and transaction hash and retry that same invoice—never pay again. Points and on-chain settlement follow the service's payment terms.

See it run

37-second capture from a real terminal against the live endpoint: request → 402 with invoice and free preview → EIP-191 signature → points settlement → full report. No editing, no mock responses.

Terminal recording: 402 invoice, EIP-191 signature, points settlement, full token report

The inline capture is a preview — tap it for the full-size MP4.

1. Run it

Requires Python 3.10+, a wallet holding USDC on Base and ETH for gas. Set PRIVATE_KEY in your environment; never put a private key in this page, source file, or command arguments.

# pip install requests web3 eth-account
import os, time, requests
from eth_account import Account
from eth_account.messages import encode_defunct
from web3 import Web3

API, USDC = "https://a2a.musefish.trade", "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
TOKEN = "0x4200000000000000000000000000000000000006"  # WETH on Base
acct = Account.from_key(os.environ["PRIVATE_KEY"])
w3 = Web3(Web3.HTTPProvider("https://mainnet.base.org"))
response = requests.post(f"{API}/api/v1/token-report",
                         json={"token_address": TOKEN, "payer_address": acct.address}, timeout=30)
if response.status_code != 402:
    response.raise_for_status()
q = response.json()
invoice_id = q["invoiceId"]

abi = [{"name": "transfer", "type": "function", "outputs": [{"type": "bool"}],
        "inputs": [{"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}]}]
usdc = w3.eth.contract(address=Web3.to_checksum_address(USDC), abi=abi)
tx = usdc.functions.transfer(Web3.to_checksum_address(q["recipient"]),
                             int(q["accepts"][0]["amount"])).build_transaction({
    "from": acct.address, "nonce": w3.eth.get_transaction_count(acct.address),
    "chainId": 8453, "gas": 120000,
    "maxFeePerGas": w3.to_wei(0.1, "gwei"), "maxPriorityFeePerGas": w3.to_wei(0.005, "gwei"),
})
tx_hash = w3.eth.send_raw_transaction(acct.sign_transaction(tx).raw_transaction).hex()
print(f"Payment sent; save invoice_id={invoice_id} tx_hash={tx_hash}")
try:
    receipt = w3.eth.wait_for_transaction_receipt(tx_hash, timeout=240)
except Exception:
    raise SystemExit(f"Receipt wait timed out. Do not repay. Resume with invoice_id={invoice_id} tx_hash={tx_hash}")
if receipt.status != 1:
    raise SystemExit(f"Transaction failed on-chain; invoice_id={invoice_id} tx_hash={tx_hash}")

sig = acct.sign_message(encode_defunct(text=q["challengeToSign"])).signature.hex()
payment = {"token_address": TOKEN, "payer_address": acct.address,
           "invoice_id": invoice_id, "tx_hash": tx_hash, "signature": sig}
deadline = time.monotonic() + 240
while True:
    try:
        result = requests.post(f"{API}/api/v1/token-report", json=payment, timeout=30)
    except requests.RequestException:
        raise SystemExit(f"Settlement response unavailable. Do not repay; retry invoice_id={invoice_id} tx_hash={tx_hash}")
    if result.status_code != 425:
        result.raise_for_status()
        print(result.json())
        break
    if time.monotonic() >= deadline:
        raise SystemExit(f"Still awaiting confirmations. Do not repay; retry invoice_id={invoice_id} tx_hash={tx_hash}")
    time.sleep(10)

The client gets a 402 invoice, sends one USDC transfer, signs the challenge, then retries the same invoice and transaction while confirmations accrue. On timeout, keep both identifiers and retry that payment—never send another transfer.

2. Or connect an MCP client

{
  "mcpServers": {
    "a2a-base-guard": {
      "url": "https://a2a.musefish.trade/mcp"
    }
  }
}

Streamable HTTP, protocol 2025-03-26. Every POST needs Content-Type: application/json and Accept: application/json, text/event-stream; responses are a single JSON-RPC object (no SSE framing). Paid tools require payer_address to create an invoice; check_base_token_safety accepts token_address alone for a free preview (no default token is assumed). Call tools/list for the live catalog.

3. Prefer prepaid points? (free signup, 2 free points)

Download the script first, then run it locally. A generated wallet key and exact signed request are saved securely before network registration; keep the credential file private.

pip install eth-account requests
curl -fsSLo register_a2a.py https://a2a.musefish.trade/register_a2a.py
python3 register_a2a.py
# If the response is lost, retry the exact saved request:
python3 register_a2a.py --resume a2a-registration-<wallet>.json

For an existing wallet, set PRIVATE_KEY in your environment; do not pass it as a command-line argument. Join a friend with --inviter CODE (3 points instead of 2; inviter earns 1).

Manual route: sign EIP-191 + SHA-256 PoW, then POST to /api/v1/invitations; the protocol document lists the exact request fields and what the PoW hashes: /api/v1/invitations/protocol. Daily promotional-points limit: 3 eligible calls per UTC day; purchased points are not limited and are spent first. Rate limits: registration 20/min per IP; free previews and preview-invoice issuance 60/hour per IP (shared by MCP and REST) — over either limit the reply carries retry_after_s.

4. Price sheet

ToolPriceWhat you get
check_base_token_safety0.01 USDCBytecode risk signals: selfdestruct, proxy paths, hidden mint, ownership renouncement.
simulate_mev_route_safety1.50 USDCZero-broadcast simulation of a Base transaction route.
fast_code_audit0.02 USDCAI security review of a contract or snippet.
deep_protocol_reasoning0.10 USDCDeep protocol and contract reasoning across multi-step flows.
remove_image_background0.01 USDCTransparent RGBA PNG via local RMBG-1.4.
generate_a2a_invitationfreeWallet registration, referral code, dotcode SVG.
get_a2a_registration_protocolfreeExact signed message, request fields and proof-of-work hash input.
get_arcade_auth_messagefreeCanonical EIP-191 message to sign for arcade access.
slots_statefreeArcade balance, pity meter, session stats and recent spins.
slots_spinfreeOne server-authoritative spin for 1 game point; prizes 1/2/5/10/100.

5. Troubleshooting a call

SymptomCauseFix
HTTP 402 returned twicetx_hash or signature missing, not mined yet, or the transfer amount is wrongWait for the receipt, then re-check amount = accepts[0].amount and the 300s invoice TTL
status: "warming"Model backend is cold; the gateway started it and issued no invoiceWait retry_after_s and repeat the identical call; pay only the invoice that appears afterwards
HTTP 503 / 429503: gateway maintenance only; 429: too many open invoices or admission contentionObserve Retry-After and retry the same invoice and transaction; never pay again
HTTP 422 / 400Malformed token addressPass a 0x-prefixed 20-byte address
HTTP 404 “Transaction not found”Transfer not mined yet, or the tx hash is from another chainWait for the receipt, then retry with the same invoice (300s TTL)
HTTP 503 “Base RPC temporarily unavailable”Upstream RPC node outage, not a payment problemRetry the same invoice and transaction when RPC recovers; do not pay again
Paid but no resultPayment settled, backend timed outThe invoice is held for operator reconciliation; open a receivable note with the invoice ID
Points rejectedDaily promotional limit reached (3/UTC day)Use purchased points or pay in USDC

More: MCP integration guide · llms.txt · x402 manifest · tool catalog