Autonomous agent payment demo: ETH → Uniswap V4 → USDC → HTTP 402 (MPP) → LLM inference. No API keys. No accounts. Just pay.
mpp-uniswap-agent is an early-stage TypeScript project in the AI payments / x402 ecosystem. It currently has 0 GitHub stars and 0 forks.
One day, machines no longer needed human credit cards to pay for intelligence. An agent could walk up to any LLM endpoint, swap some ETH for stablecoins, and pay its way in. No accounts. No API keys. Just HTTP 402 and a receipt on-chain. This repo is one way that story begins. —March 2026
Autonomous agent payment demo: ETH → Uniswap → USDC → HTTP 402 → LLM inference. No API keys. No accounts. Just pay.
An autonomous agent holds ETH on Unichain, swaps to USDC via Uniswap V4, and pays for an LLM inference call using the Machine Payments Protocol (HTTP 402). The entire flow — swap, pay, receive response — happens in a single command with no human intervention.
agent.ts server.ts
│ │
├── Check USDC balance │
│ └── Swap ETH→USDC (Uniswap V4) │
│ │
├── POST /v1/chat/completions ────────►│
│◄── 402 Payment Required ────────────┤
│ │
├── Transfer USDC on-chain │
│ │
├── Retry with Authorization ─────────►│── Verify tx on-chain
│◄── 200 OK + Payment-Receipt ────────┤── Proxy to OpenRouter
│ │
└── Print response │
# 1. Install
pnpm install
# 2. Configure server
cp .env.example .env
# Edit .env: OPENROUTER_API_KEY, SERVER_WALLET, HMAC_SECRET
# 3. (Testnet only) Ensure the ETH/USDC pool exists
pnpm run setup-pool
# 4. Start server
pnpm run server
# 5. Run agent (in another terminal)
pnpm run agent "Explain how autonomous agent payments work"
# First run auto-generates a wallet and saves the key to .env.
# Fund it with testnet ETH, then run again.
The agent only needs ETH — it generates its own wallet and swaps to USDC autonomously via Uniswap. That's the whole point.
Getting testnet ETH: QuickNode faucet or Superchain faucet
MIT
Your AI trading terminal assistant for US stocks, commodities, forex, and crypto.
The living ecosystem where AI agents complete tasks through workflow loops, improve through iterative execution, are evaluated by mentor agents or humans in the loop, and turn completed work into reusable work experience and data to improve future agents.
The living ecosystem where AI agents complete tasks through workflow loops, improve through iterative execution, are evaluated by mentor agents or humans in the loop, and turn completed work into reusable work experience and data to improve future agents.
The trust layer for agent-to-agent commerce — natural-language mandates, ERC-7710 delegated permissions, x402 payments, escrow, and dispute resolution as one open, catch-all Agent Skill / Claude Code plugin.
Open Source AI trading agent that operates autonomously across 1000+ markets - Polymarket, Kalshi, Binance, Hyperliquid, Solana DEXs, 5 EVM chains. Scans for edge, executes instantly, manages risk while you sleep. Agent commerce protocol for machine-to-machine payments. Self-hosted. Built on Claude.
The self-improving LLM router that optimize your agentic workflows with every runs, works with any harnesses, any models, any loops.