apay_request
Probe and automatically pay HTTP 402 crypto micropayments on Base Layer 2 with USDC or $APAY within pre-configured budget limits.
urlrequiredmethodheadersjson_body
io.github.neuralaisofficial-langPublished by GitHub account neuralaisofficial-langv0.1.8Updated Oct 24, 2026
Universal HTTP 402 Micropayment Protocol & Autonomous Economic Settlement Engine for AI Agents
Gives an AI assistant a non-custodial crypto wallet to probe and pay HTTP 402 micropayments on Base L2 within spending limits.
Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.
Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.
Read https://sourceweft.com/mcp/io.github.neuralaisofficial-lang%2Fapay/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.Add this to your client's mcpServers config.
{
"mcpServers": {
"a-pay-protocol": {
"type": "http",
"url": "https://apay-network.vercel.app/api/mcp"
}
}
}The Universal Micropayment & Economic Layer for Autonomous AI Agents
[Python 3.11+] [Status] [Tests] [Live Console]
8453):
0x8dd4ff9035c7d4e0bef30aa64fc30d128a4066c3 (100M Cap, Base L2)vAMM-WETH/APAY (0x6933...7777)84532):
0x71434344beEF9C44fF3BC95572bEB7bFB8847ec6 (1.0% Protocol Fee)0xD08c8A337E5339d1c083E06d74A9265956ceEA16 (Cumulative Channels & Merkle Claims)0x3E35a9E802627a3D9A86D6554e72b1C446E34aAF (Sub-Agent Delegated Spending)0xD2f3F4D97f4a3fdC9d4eEDfB9747BF9D80CF6225 (Anti-Spam Staking & Slashing Engine)A-Pay is an ultra-lightweight, zero-latency, open economic rail designed for the machine-to-machine (M2M) economy. Just as UPI revolutionized human digital payments in India, A-Pay enables autonomous AI software agents to discover, consume, and pay for data, compute, APIs, and micro-services on the fly—without credit cards, human KYC, or seed phrase friction.
Scaffold a fullstack monetized AI Agent app (Next.js, FastAPI, or Express) in 60 seconds:
Or protect ANY existing website or API with an instant HTTP 402 crypto paywall proxy—zero code modifications required:
Give your AI agent an in-memory wallet and strict spending guardrails with 2 lines of code:
Equip Claude Desktop, Cursor, Antigravity, or Cline with an autonomous A-Pay micro-wallet in 1 click via Smithery.ai:
Or add directly to claude_desktop_config.json or .cursor/mcp.json (zero-setup via uvx):
Now your assistant can autonomously inspect balances, probe paywalls, and settle HTTP 402 micropayments on Base L2!
A-Pay is an open-source decentralized economic protocol for autonomous machine agents. Built on Base L2.
Source: README.md at commit cbab6ab
Probe and automatically pay HTTP 402 crypto micropayments on Base Layer 2 with USDC or $APAY within pre-configured budget limits.
urlrequiredmethodheadersjson_bodyInspect the agent's active non-custodial wallet address, network, current spending guardrails, and total spent in USDC and $APAY.
Takes no parameters.
Configure agent safety invariants and spending guardrails. Prevents runaway loops or overcharging.
daily_budget_apaydaily_budget_usdcmax_per_call_apaymax_per_call_usdcInspect an endpoint to check if it requires an A-Pay micropayment, inspect the exact price quote, currency, and payout receiver without spending any funds.
urlrequiredInspect the agent's live on-chain balances on Base Layer 2, including native ETH (for gas), USDC, and $APAY tokens.
address90% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
Declare a license in the repository or the registry entry.
npx create-apay-app my-paid-agentapay protect --target http://localhost:8000 --price 0.001 --wallet 0xYourWalletAddressfrom apay import APaySession, AgentWallet
# Generate or load wallet with daily safety limitwallet = AgentWallet(private_key="0x...", max_per_call_usdc=0.01, daily_budget_usdc=5.0)session = APaySession(wallet)
# Automatically handles HTTP 402 challenges & settles on the flyresponse = session.get("https://protected-api.com/market-data")print(response.json())npx -y @smithery/cli install apay --client claude{ "mcpServers": { "apay": { "command": "uvx", "args": ["apay", "mcp"], "env": { "APAY_NETWORK": "base-mainnet", "APAY_CURRENCY": "DUAL", "APAY_MAX_PER_CALL": "0.05", "APAY_DAILY_BUDGET": "2.0" } } }}apay/├── src/│ └── apay/│ ├── __init__.py # Package exports│ ├── cli.py # ⚡ 1-Command CLI (`apay protect`, `apay wallet new`, `apay pay`)│ ├── client.py # 🤖 Auto-settling HTTP client (sync & async)│ ├── wallet.py # 🔐 In-memory wallet + local spending limits│ ├── proxy.py # 🛡️ Ultra-light reverse proxy paywall (Starlette + EIP-712)│ ├── relayer.py # 📊 Settlement journal & batch relayer│ └── integrations/ # 🔗 LangChain & CrewAI agent wrappers├── contracts/ # Base Sepolia Smart Contracts (APAYToken & APayRouter)├── tests/ # Automated integration & security test suite├── spec/ # RFC wire format & security model specifications└── pyproject.toml # Hatchling packaging configuration# 1. Install A-Pay via pippip install apay
# 2. Generate a new Agent Wallet with spending limitsapay wallet new
# 3. Protect any website or API with an instant HTTP 402 Paywallapay protect --target http://localhost:8000 --price 0.001 --wallet 0xYourPayoutWalletAddress