AURA MCP Server
Enables Claude and ChatGPT to interact with AURA API for real-time DeFi portfolio analysis, swap execution, yield opportunities, and automated trading strategies across 200+ blockchain networks. Includes natural language swap parsing, cross-chain portfolio tracking, AI strategy automation, and risk management through guard engines.
README
🚀 AURA MCP Server
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.
🌟 Features
🔄 Swap Execution (NEW)
- 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)
💼 Portfolio Management
- Cross-chain wallet balance tracking
- DeFi position monitoring with health factors
- Real-time USD value calculations
- Support for native tokens and ERC-20s
🎯 Operations Intelligence (100% Real-Time AURA API)
- 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
🤖 AI Strategy Automation
- 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
🛡️ Guard Engine (Risk Management)
- Max slippage & gas price limits
- Allowed DEXes & blocked tokens/protocols
- Emergency stop capability
- Per-user customizable guardrails
💰 x402 Payment Protocol
- On-chain payment verification
- Per-request monetization
- USDC/USDT support
- Invoice generation & tracking
🚀 Quick Start
Prerequisites
- Node.js 18+
- AURA API Key (Get one here)
- Git
Installation
# 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
Development
# 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
Production
# Build and start
npm run build
npm start
Server runs on:
- Replit: Port 5000 (auto-configured)
- Vercel: Dynamic port (auto-configured)
- Local: Port 5000 (default)
⚙️ Configuration
Required Environment Variables
# 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 # Environment
Optional: x402 Payment Configuration
X402_RECEIVER=0xYourWalletAddress
X402_ASSET=USDC
🔌 Integration with LLMs
🎯 MCP Protocol (Native Integration)
NEW: 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
ChatGPT MCP Connector (Recommended)
- 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!
Claude Desktop MCP Connector
- Open Settings → Connectors
- Add custom connector:
- Name:
AURA DeFi - URL:
https://mcp-aura.replit.app/mcp
- Name:
See MCP_INTEGRATION.md for complete guide.
Claude Desktop (MCP Native)
-
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
ChatGPT (Custom GPT via HTTP API)
- 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
📖 Usage Examples
Swap Execution
// 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
});
Portfolio Analysis
// 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'
});
Opportunity Scanning
// 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' }
});
AI Strategy Automation
// 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
});
🚀 Deployment
Deploy to Vercel (Recommended)
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_KEY
Option 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
Deploy to Replit
- Import GitHub repository to Replit
- Add
AURA_API_KEYto Replit Secrets - Click Run (auto-configured on port 5000)
Deploy to Railway
npm i -g @railway/cli
railway login
railway up
railway variables set AURA_API_KEY=your_key
🏗️ Architecture
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ 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... │
└─────────────────┘
Tech Stack
- 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)
🧪 Testing
# 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
📊 Performance
- 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)
🔒 Security
- ✅ 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
📚 API Reference
MCP Tools
| 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 |
HTTP Endpoints
All HTTP endpoints available at /api/*:
POST /api/swap/parse- Parse swap intentPOST /api/swap/quote- Get swap quotePOST /api/swap/prepare- Prepare swap transactionPOST /api/swap/execute- Execute swapPOST /api/portfolio/balance- Get balancePOST /api/portfolio/positions- Get positionsPOST /api/strategy/propose- Propose strategyGET /api/health- Health checkGET /api/system/health- System status
🤝 Contributing
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
🏆 AURA API Hackathon
Status: ✅ Production Ready
Key Features Implemented
- ✅ 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
Demo
- Live Server: [Your deployed URL]
- GitHub: https://github.com/aura-mcp/server
- Documentation: See
replit.mdfor technical details
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
📞 Support
- 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
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。