PayAgent
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@PayAgentfetch this paywalled URL: https://api.example.com/premium"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
PayAgent — an MCP server that gives AI agents a wallet
An MCP server (Streamable HTTP, MCP spec 2025-11-25) that lets AI agents pay for metered web APIs per call, without a human in the loop. Built for the Alexa+ track of the Amazon Developer Hackathon (Build, Ship, Shape).
The problem
AI agents can browse, reason, and act, but they cannot pay. Every metered API on the web expects a human with a credit card. PayAgent closes that gap: the agent holds its own USDC wallet and settles x402 micropayments autonomously, inside the spending limits its owner sets.
Related MCP server: PipRail
Tools
Tool | What it does |
| Fetch a URL. On an x402 v2 |
| Show the agent wallet's address and testnet USDC balance. |
Safety bounds: only x402 v2 exact challenges are honored; per-call spend is capped
(default $1, hard cap $100); only http(s) URLs; private/loopback hosts are blocked
unless ALLOW_PRIVATE_HOSTS=true; 15s request timeout.
Run it
npm install
npm run build
# Terminal 1: stub x402 seller (local demo endpoint, $0.05 per call)
node dist/examples/paid-endpoint-stub.js
# Terminal 2: the MCP server (Streamable HTTP on :3001/mcp)
ALLOW_PRIVATE_HOSTS=true node dist/src/server.js
# Terminal 3: demo MCP client (connects like any Alexa+/MCP agent would)
node dist/examples/demo-client.jsExpected: the client lists both tools, wallet_info shows the agent address, and
x402_fetch returns PAID $0.050000 USDC ... HTTP 200 with the seller's data —
the full 402 → sign → 200 loop, negotiated over MCP spec 2025-11-25.
Env
Var | Default | Purpose |
| ephemeral demo key | Agent wallet (0x hex). Set your own for real use. |
|
| Set |
|
| MCP server port ( |
Copy .env.example to .env to configure.
How it works
MCP client (agent) --Streamable HTTP--> PayAgent --HTTPS--> paywalled API
402 challenge
<-- x402 v2 (price, payTo)
EIP-3009 sign (agent wallet)
PAYMENT-SIGNATURE -->
<-- 200 + dataThe x402 buyer logic (src/x402buyer.ts) is adapted from our production-tested
CRE x402 gateway:
same EIP-3009 domain, same PAYMENT-SIGNATURE (v2) header format.
Layout
src/
server.ts # McpServer, tool registrations, Streamable HTTP bridge
x402buyer.ts # x402 v2 buyer: challenge parsing, EIP-3009 signing, wallet info
x402verify.ts # x402 v2 seller-side verification (used by the stub)
examples/
paid-endpoint-stub.ts # local $0.05/query x402 seller for demos
demo-client.ts # MCP client driving the full paid-fetch flowLicense
MIT. See LICENSE.
This server cannot be deployed
Maintenance
Related MCP Connectors
Let an AI agent find and pay for x402 APIs and products in USDC on Base, within owner-set limits.
Pay-per-call tools for autonomous agents, settled in USDC on Base via x402.
Pay-per-use tool API for AI agents. Free tier, x402 USDC micropayments, or API key.
Pay-per-use web extract, token prices, and wallet balances via x402 USDC micropayments.
Related MCP Servers
- FlicenseAqualityDmaintenanceEnables AI agents to call x402-gated APIs using a central credit balance, abstracting away blockchain complexity and payment proofs. It provides tools to fetch data from payment-required endpoints, check usage balances, and simulate transaction costs.635 npm2-
- AlicenseAqualityAmaintenanceA budget-bound x402 payment wallet for AI agents: it autonomously pays HTTP 402 payment-gated URLs across every major chain (EVM, Solana, and many non-EVM families). Self-custodial and backendless, your key, your RPC, with spend caps enforced before any on-chain send.89MIT

@arispay/payagent-mcpofficial
AlicenseAqualityAmaintenanceEnables AI agents to call paid APIs and settle HTTP 402 payment challenges with USDC on Base, without private keys ever being involved.7129 npmMIT- AlicenseNot gradedqualityBmaintenanceEnables AI agents to discover, pay for, and sell HTTP APIs using the x402 micropayment protocol, with USDC settlement on Base mainnet. Includes tools for payment requirements, paying and fetching resources, building seller configurations, and monitoring revenue.104 npm1MIT