Configuration
This guide covers the essential configuration steps needed to get AutoMCP running with your specific requirements.
Basic Configuration
Environment Variables
Create a .env file in your project root:
# Solana Network Configuration
SOLANA_RPC_URL=https://api.mainnet-beta.solana.com
SOLANA_WS_URL=wss://api.mainnet-beta.solana.com
SOLANA_COMMITMENT=confirmed
# Database Configuration
DATABASE_URL=postgresql://automcp:password@localhost:5432/automcp
REDIS_URL=redis://localhost:6379
# Security Configuration
JWT_SECRET=your-jwt-secret-key-here
ENCRYPTION_KEY=your-32-byte-encryption-key-here
# API Configuration
PORT=3000
NODE_ENV=production
# External Services
WEBHOOK_URL=https://your-webhook-endpoint.com
NOTIFICATION_EMAIL=[email protected]Wallet Configuration
Authentication Wallet Setup
Connect Primary Wallet
// Supported wallet types const supportedWallets = [ 'phantom', 'solflare', 'backpack', 'ledger', 'trezor' ];Verify Wallet Connection
# Test wallet connectivity yarn test:wallet-connection
Operation Wallet Setup
Import Operation Wallet
# Using mnemonic phrase yarn wallet:import --type mnemonic --phrase "your twelve word phrase here" # Using private key yarn wallet:import --type privatekey --key "your-base58-private-key" # Using hardware wallet yarn wallet:import --type hardware --device ledgerConfigure Wallet Strategy
# wallet-strategy.yml strategy: type: "single" # single, rotation, hot_cold max_balance: 1000 # USDC backup_wallet: true encryption: true
Advanced Configuration
Protocol Settings
Configure your preferred DeFi protocols:
# protocols.yml
protocols:
jupiter:
enabled: true
api_url: "https://quote-api.jup.ag/v6"
max_slippage: 0.02
raydium:
enabled: true
pools: ["SOL-USDC", "RAY-SOL"]
orca:
enabled: true
whirlpools: true
solend:
enabled: false
lending_only: trueSecurity Settings
# security.yml
security:
transaction_limits:
daily_max: 10000 # USDC
single_max: 1000 # USDC
confirmations:
required: true
timeout: 30 # seconds
monitoring:
enabled: true
anomaly_detection: true
emergency:
stop_loss: true
panic_button: truePerformance Optimization
# performance.yml
performance:
rpc:
connection_pool: 10
timeout: 5000
retry_attempts: 3
caching:
enabled: true
ttl: 60 # seconds
batch_processing:
enabled: true
batch_size: 10Network Configuration
RPC Endpoints
Choose appropriate RPC endpoints for your needs:
# Free public endpoints (rate limited)
SOLANA_RPC_URL=https://api.mainnet-beta.solana.com
# Premium endpoints (recommended for production)
SOLANA_RPC_URL=https://api.helius.xyz/v0/YOUR-API-KEY
SOLANA_RPC_URL=https://api.quicknode.com/YOUR-ENDPOINTWebSocket Configuration
# WebSocket for real-time data
SOLANA_WS_URL=wss://api.mainnet-beta.solana.com
SOLANA_WS_URL=wss://api.helius.xyz/v0/YOUR-API-KEYMonitoring and Alerts
Webhook Configuration
# webhooks.yml
webhooks:
transaction_complete:
url: "https://your-app.com/webhook/transaction"
method: "POST"
headers:
Authorization: "Bearer your-token"
error_alerts:
url: "https://your-app.com/webhook/error"
method: "POST"
daily_report:
url: "https://your-app.com/webhook/report"
method: "POST"
schedule: "0 9 * * *" # 9 AM dailyEmail Notifications
# notifications.yml
email:
smtp:
host: "smtp.gmail.com"
port: 587
secure: false
auth:
user: "[email protected]"
pass: "your-app-password"
templates:
transaction_success: "templates/transaction-success.html"
error_alert: "templates/error-alert.html"
daily_report: "templates/daily-report.html"Testing Configuration
Sandbox Mode
# Enable sandbox mode for testing
SANDBOX_MODE=true
SOLANA_RPC_URL=https://api.devnet.solana.com
SOLANA_WS_URL=wss://api.devnet.solana.comTest Configuration
# test-config.yml
testing:
mock_transactions: true
simulate_network_delays: true
test_data_path: "./test-data"
scenarios:
- name: "high_volatility"
price_change: 0.1
duration: 300
- name: "network_congestion"
delay_factor: 2.0
success_rate: 0.8Deployment Configuration
Docker Configuration
# docker-compose.yml
version: '3.8'
services:
automcp:
image: automcp/core:latest
ports:
- "3000:3000"
environment:
- NODE_ENV=production
- DATABASE_URL=postgresql://automcp:password@postgres:5432/automcp
depends_on:
- postgres
- redis
postgres:
image: postgres:14
environment:
POSTGRES_DB: automcp
POSTGRES_USER: automcp
POSTGRES_PASSWORD: password
redis:
image: redis:7-alpineProduction Checklist
Troubleshooting
Common Issues
Issue: RPC connection failures
# Test RPC connectivity
curl -X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"getHealth"}' \
$SOLANA_RPC_URLIssue: Wallet connection problems
# Verify wallet configuration
yarn config:verify-walletIssue: Database connection errors
# Test database connection
yarn db:test-connectionOnce configuration is complete, you're ready to create your first MCP server!
Last updated