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.
curl -fsSL https://a2a.musefish.trade/register_a2a.py | python3 -
/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.
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.
The inline capture is a preview — tap it for the full-size MP4.
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.
{
"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.
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.
| Tool | Price | What you get |
|---|---|---|
| check_base_token_safety | 0.01 USDC | Bytecode risk signals: selfdestruct, proxy paths, hidden mint, ownership renouncement. |
| simulate_mev_route_safety | 1.50 USDC | Zero-broadcast simulation of a Base transaction route. |
| fast_code_audit | 0.02 USDC | AI security review of a contract or snippet. |
| deep_protocol_reasoning | 0.10 USDC | Deep protocol and contract reasoning across multi-step flows. |
| remove_image_background | 0.01 USDC | Transparent RGBA PNG via local RMBG-1.4. |
| generate_a2a_invitation | free | Wallet registration, referral code, dotcode SVG. |
| get_a2a_registration_protocol | free | Exact signed message, request fields and proof-of-work hash input. |
| get_arcade_auth_message | free | Canonical EIP-191 message to sign for arcade access. |
| slots_state | free | Arcade balance, pity meter, session stats and recent spins. |
| slots_spin | free | One server-authoritative spin for 1 game point; prizes 1/2/5/10/100. |
| Symptom | Cause | Fix |
|---|---|---|
| HTTP 402 returned twice | tx_hash or signature missing, not mined yet, or the transfer amount is wrong | Wait 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 invoice | Wait retry_after_s and repeat the identical call; pay only the invoice that appears afterwards |
| HTTP 503 / 429 | 503: gateway maintenance only; 429: too many open invoices or admission contention | Observe Retry-After and retry the same invoice and transaction; never pay again |
| HTTP 422 / 400 | Malformed token address | Pass a 0x-prefixed 20-byte address |
| HTTP 404 “Transaction not found” | Transfer not mined yet, or the tx hash is from another chain | Wait for the receipt, then retry with the same invoice (300s TTL) |
| HTTP 503 “Base RPC temporarily unavailable” | Upstream RPC node outage, not a payment problem | Retry the same invoice and transaction when RPC recovers; do not pay again |
| Paid but no result | Payment settled, backend timed out | The invoice is held for operator reconciliation; open a receivable note with the invoice ID |
| Points rejected | Daily promotional limit reached (3/UTC day) | Use purchased points or pay in USDC |
More: MCP integration guide · llms.txt · x402 manifest · tool catalog