eXpress402 is a paid MCP server infrastructure for AI agents, implementing x402 v2 with wallet authentication. It provides two payment rails for accessing premium tools and data.
Off-chain session-based payments with instant settlement:
- Pay once, call many times - Create a session, make unlimited paid calls without per-transaction fees
- SIWx authentication - Wallet-based identity using CAIP-122 message signing
- Sub-millisecond lookups - Session mapping stored in Redis for instant authentication
- Zero gas fees - All payments settled off-chain on Yellow Network
On-chain payments with blockchain proof:
- USDC payments - Pay with Circle USDC on Arc Testnet
- On-chain verification - Every payment recorded on-chain for full transparency
- Circle Gateway integration - Seamless USDC handling through Circle's infrastructure
- Blockchain receipts - Verifiable payment proofs on Arc Testnet
Sentifi demonstrates eXpress402 in action - an autonomous AI trading agent that combines real-time market sentiment analysis with cross-chain DeFi execution. It uses eXpress402 MCP tools for paid market intelligence and LI.FI SDK for optimal swap routing across chains.
Generate an AI agent wallet for authentication and payments:
npm run generate-walletThis creates:
YELLOW_AGENT_PRIVATE_KEY- Your AI agent's wallet private keyYELLOW_AGENT_ADDRESS- Your AI agent's public address
The wallet will be automatically funded with test tokens via Yellow Network faucet.
Required environment variables (auto-configured by setup):
# Agent Wallet (auto-generated)
YELLOW_AGENT_PRIVATE_KEY=0x...
YELLOW_AGENT_ADDRESS=0x...
# Merchant Wallet (auto-generated)
YELLOW_MERCHANT_ADDRESS=0x...
YELLOW_MERCHANT_PRIVATE_KEY=0x...
# Optional: Market Research
TAVILY_API_KEY=your_tavily_key
# Optional: Redis (default works in devcontainer)
KV_URL=redis://redis:6379Copy .env.example to .env and run:
npm run setup # Generates wallets, funds them, installs dependenciesStart the trading agent with live dashboard:
npm run demo:sentifi
# Open dashboard in browser
open http://localhost:3456The dashboard provides:
- Payment rail selector - Switch between Yellow Network (off-chain) and Arc Gateway (on-chain)
- Real-time sentiment analysis - Live market data from Reddit and news sources
- Trading decisions - AI-powered strategy with confidence scores
- Portfolio tracking - Real-time P&L and position monitoring
Autonomous Decision Loop:
- MONITOR - Fetch sentiment data via eXpress402 MCP tools (choose Yellow or Arc rail)
- DECIDE - Analyze signals and determine strategy (bullish/bearish/neutral)
- EXECUTE - Route trades through LI.FI SDK across 30+ DEXs for best prices
- RECORD - Track P&L and update portfolio state
The dashboard lets you switch between payment rails to see both Yellow Network (off-chain) and Arc Gateway (on-chain) in action.
Customize trading behavior via environment variables:
# Strategy Thresholds
SENTIFI_BULLISH_THRESHOLD=40 # Score above this = buy signal
SENTIFI_BEARISH_THRESHOLD=-40 # Score below this = sell signal
SENTIFI_MIN_CONFIDENCE=0.5 # Minimum confidence to trade
# Risk Management
SENTIFI_MAX_POSITION_PCT=25 # Max position size (% of portfolio)
SENTIFI_CONFIDENCE_SCALING=true # Scale size by confidence
# Execution
SENTIFI_CHAIN_ID=42161 # Chain ID (Arbitrum One)Suifi: Alternative implementation using Sui blockchain for AI vault investment decisions. Records and evaluates DeFi vault strategies using DefiLlama data. Fully implemented in src/suifi/ but not integrated into the main demo due to time constraints.
For complete documentation, architecture details, and additional demos, see docs/README.md.

