Bridge LLMs with AURA API for DeFi Intelligence & On-Chain Automation
A production-ready Model Context Protocol (MCP) server that enables Claude & ChatGPT to interact with AURA API for real-time DeFi portfolio analysis, swap execution, yield opportunities, and automated trading strategies across 200+ blockchain networks.
- Natural language swap intent parsing ("swap 1 ETH to USDC on Base")
- AURA-powered DEX aggregation (auto-selects best route across 200+ chains)
- 9M+ token support with real-time pricing
- Web-based transaction signing (secure browser signing)
- Token allowance management (auto-approval flow)
- Guard validation (slippage, gas, risk management)
- Cross-chain wallet balance tracking
- DeFi position monitoring with health factors
- Real-time USD value calculations
- Support for native tokens and ERC-20s
- Airdrop Detection: Eligible & upcoming airdrops with value estimates
- Liquidation Scanning: Health factor monitoring across protocols
- Narrative Opportunities: Real-time market trend analysis
- Governance Tracking: Proposal detection with voting rewards
- DCA Event-Aware: Dollar-cost averaging with market event detection
- Liquidation Guard: Automated position protection
- Basket Rotation: Dynamic portfolio rebalancing
- Historical backtesting with CAGR, Sharpe ratio, max drawdown
- Max slippage & gas price limits
- Allowed DEXes & blocked tokens/protocols
- Emergency stop capability
- Per-user customizable guardrails
- On-chain payment verification
- Per-request monetization
- USDC/USDT support
- Invoice generation & tracking
- Node.js 18+
- AURA API Key (Get one here)
- Git
# Clone repository
git clone https://github.com/aura-mcp/server.git
cd aura-mcp-server
# Install dependencies
npm install
# Configure environment
cp env.example .env
# Edit .env and add your AURA_API_KEY# Start HTTP server (for ChatGPT/web integration)
npm run dev
# Start MCP server (for Claude Desktop)
npm run dev:mcp
# Run tests
npm test
# Build for production
npm run build# Build and start
npm run build
npm startServer runs on:
- Replit: Port 5000 (auto-configured)
- Vercel: Dynamic port (auto-configured)
- Local: Port 5000 (default)
# AURA API Configuration (Required)
AURA_API_KEY=your_aura_api_key_here
# Optional Configuration
AURA_API_URL=https://aura.adex.network  # Default AURA API endpoint
MCP_SERVER_PORT=5000                     # Server port (Replit)
PORT=                                    # Dynamic port (Vercel)
NODE_ENV=production                      # EnvironmentX402_RECEIVER=0xYourWalletAddress
X402_ASSET=USDCNEW: AURA MCP Server now supports native MCP over HTTP with SSE for real-time two-way communication!
MCP Endpoint: https://mcp-aura.replit.app/mcp
Documentation: MCP_INTEGRATION.md
- Open ChatGPT β Settings β Connectors
- Enable Developer mode
- Create new connector:
- Name: AURA DeFi
- URL: https://mcp-aura.replit.app/mcp
 
- Name: 
- Use in chat with 15 DeFi tools!
- Open Settings β Connectors
- Add custom connector:
- Name: AURA DeFi
- URL: https://mcp-aura.replit.app/mcp
 
- Name: 
See MCP_INTEGRATION.md for complete guide.
- 
Edit Claude config: # macOS/Linux nano ~/Library/Application\ Support/Claude/claude_desktop_config.json # Windows notepad %APPDATA%\Claude\claude_desktop_config.json 
- 
Add MCP server: { "mcpServers": { "aura-mcp": { "command": "node", "args": ["path/to/aura-mcp-server/dist/index.js"], "env": { "AURA_API_KEY": "your_api_key_here" } } } }
- 
Restart Claude Desktop 
- Deploy server to Vercel/Replit (see Deployment section)
- Create Custom GPT in ChatGPT
- Add Actions with your server URL
- Import OpenAPI spec from /api/openapi.json
// Parse natural language swap intent
const intent = await mcpClient.call('swap.parse', {
  text: 'swap 1 ETH to USDC on Base',
  userAddress: '0x69bfD720Dd188B8BB04C4b4D24442D3c15576D10'
});
// Get quote (AURA auto-selects best DEX)
const quote = await mcpClient.call('swap.quote', intent.params);
// Prepare transaction (check allowance, get tx data)
const prepared = await mcpClient.call('swap.prepare', {
  quoteId: quote.quoteId,
  userAddress: '0x69bfD720Dd188B8BB04C4b4D24442D3c15576D10'
});
// User signs transaction in browser
const signedTx = await userWallet.signTransaction(prepared.transaction);
// Execute swap
const result = await mcpClient.call('swap.execute', {
  signedTransaction: signedTx
});// Get wallet balance across chains
const balance = await mcpClient.call('portfolio.getBalance', {
  address: '0x69bfD720Dd188B8BB04C4b4D24442D3c15576D10',
  chain: 'ethereum'
});
// Get DeFi positions with health factors
const positions = await mcpClient.call('portfolio.getPositions', {
  address: '0x69bfD720Dd188B8BB04C4b4D24442D3c15576D10'
});// Scan for airdrop opportunities
const airdrops = await mcpClient.call('ops.scanOpportunities', {
  kind: 'airdrop',
  params: { address: '0x69bfD720Dd188B8BB04C4b4D24442D3c15576D10' }
});
// Scan for liquidation risks
const liquidations = await mcpClient.call('ops.scanOpportunities', {
  kind: 'liquidation',
  params: { protocol: 'aave' }
});// Propose DCA Event-Aware Strategy
const strategy = await mcpClient.call('strategy.propose', {
  intent: 'dca_event_aware',
  params: {
    asset: 'ETH',
    budgetUsd: 200,
    cadence: '2x/week',
    eventRules: {
      pauseOnUnlock: true,
      maxGasGwei: 25,
      boostOnDrawdownPct: 3
    }
  },
  address: '0x69bfD720Dd188B8BB04C4b4D24442D3c15576D10'
});
// Backtest strategy
const backtest = await mcpClient.call('strategy.backtest', {
  name: 'dca_event_aware',
  params: strategy.params,
  lookbackDays: 90
});Option 2: Vercel CLI
# Install Vercel CLI
npm i -g vercel
# Login and deploy
vercel login
vercel --prod
# Set environment variable
vercel env add AURA_API_KEYOption 3: GitHub Integration
- Push to GitHub
- Import repository at vercel.com/new
- Add AURA_API_KEYin Environment Variables
- Deploy
π Detailed Guide: See VERCEL_DEPLOY.md
- Import GitHub repository to Replit
- Add AURA_API_KEYto Replit Secrets
- Click Run (auto-configured on port 5000)
npm i -g @railway/cli
railway login
railway up
railway variables set AURA_API_KEY=your_keyβββββββββββββββββββ    βββββββββββββββββββ    βββββββββββββββββββ
β   Claude/ChatGPTβ    β  AURA MCP Serverβ    β    AURA API     β
β                 βββββΊβ                 βββββΊβ                 β
β  - Tool Calls   β    β  - MCP Protocol β    β  - Portfolio    β
β  - Responses    β    β  - Guard Engine β    β  - Swap Agg.    β
β  - Context      β    β  - x402 Paywall β    β  - Strategies   β
βββββββββββββββββββ    βββββββββββββββββββ    βββββββββββββββββββ
                                β
                                βΌ
                       βββββββββββββββββββ
                       β  200+ Chains    β
                       β                 β
                       β  - Ethereum     β
                       β  - Base         β
                       β  - Arbitrum     β
                       β  - Polygon      β
                       β  - Optimism     β
                       β  - And more...  β
                       βββββββββββββββββββ
- Runtime: Node.js 18+ with TypeScript
- Framework: Fastify (HTTP), MCP SDK (stdio)
- Validation: Zod schemas
- Testing: Jest with 80%+ coverage
- Blockchain: Ethers.js v6
- API: AURA API (https://aura.adex.network)
# Run all tests
npm test
# Run with coverage
npm test -- --coverage
# Run specific test suite
npm test -- --testNamePattern="Swap Tools"
# Watch mode
npm run test:watch- Swap Quote: < 500ms (AURA API aggregation)
- Portfolio Analysis: < 2s across chains
- Strategy Backtest: < 5s for 90-day window
- Throughput: 100+ requests/minute
- Uptime: 99.9% SLA (Vercel/Railway)
- β Input validation with Zod schemas
- β Guard engine risk management
- β Web-based signing (no server-side private keys)
- β x402 on-chain payment verification
- β Rate limiting & DDoS protection
- β Environment variable encryption
| Tool | Description | Input | Output | 
|---|---|---|---|
| swap.parse | Parse natural language swap intent | { text, userAddress } | Parsed swap params | 
| swap.quote | Get swap quote with best DEX | { fromToken, toToken, amount, chain } | Quote with route | 
| swap.prepare | Prepare swap transaction | { quoteId, userAddress } | Transaction data | 
| swap.execute | Execute signed swap | { signedTransaction } | Execution result | 
| portfolio.getBalance | Get wallet balance | { address, chain } | Token balances | 
| portfolio.getPositions | Get DeFi positions | { address } | Positions with health | 
| ops.scanOpportunities | Scan opportunities | { kind, params } | Opportunity list | 
| strategy.propose | Propose strategy | { intent, params, address } | Strategy proposal | 
| strategy.backtest | Backtest strategy | { name, params, lookbackDays } | Performance metrics | 
| transaction.simulate | Simulate transaction | { intentId, txParams } | Simulation result | 
| transaction.execute | Execute transaction | { intentId, txParams } | Execution result | 
| guard.setRules | Set risk rules | { ruleType, params } | Confirmation | 
| report.get | Get trading report | { sessionId } | PnL & fills | 
| system.health | Check system health | {} | Health status | 
All HTTP endpoints available at /api/*:
- POST /api/swap/parse- Parse swap intent
- POST /api/swap/quote- Get swap quote
- POST /api/swap/prepare- Prepare swap transaction
- POST /api/swap/execute- Execute swap
- POST /api/portfolio/balance- Get balance
- POST /api/portfolio/positions- Get positions
- POST /api/strategy/propose- Propose strategy
- GET /api/health- Health check
- GET /api/system/health- System status
Contributions welcome! Please follow these steps:
- Fork the repository
- Create feature branch (git checkout -b feature/amazing-feature)
- Commit changes (git commit -m 'Add amazing feature')
- Push to branch (git push origin feature/amazing-feature)
- Open Pull Request
Status: β Production Ready
- β 100% Real-time AURA API integration (zero mock data)
- β Swap execution with auto-DEX selection (200+ chains, 9M+ tokens)
- β AI-powered strategy automation (DCA, liquidation guards)
- β Opportunity scanning (airdrops, liquidations, governance)
- β x402 payment protocol integration
- β Guard engine risk management
- β MCP protocol for Claude & ChatGPT
- Live Server: [Your deployed URL]
- GitHub: https://github.com/aura-mcp/server
- Documentation: See replit.mdfor technical details
This project is licensed under the MIT License - see the LICENSE file for details.
- Documentation: VERCEL_DEPLOY.md
- Issues: GitHub Issues
- AURA API: https://aura.adex.network
- MCP Protocol: https://modelcontextprotocol.io
Built with β€οΈ for the AURA community
Powered by AURA API β’ Model Context Protocol β’ Web3