You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All integrated projects maintain their original MIT licenses with full attribution.
See CONTRIBUTORS.md for detailed attribution and our modifications.
# Add to your environmentexport X402_PRIVATE_KEY=0x... # Your EVM private keyexport X402_CHAIN=arbitrum # Default chain (or base, ethereum, polygon)
x402 Tools (14 Total)
Tool
Description
x402_pay_request
Make HTTP request with automatic 402 payment
x402_balance
Check wallet balance (USDC/USDs + native)
x402_send
Send direct payment to an address
x402_batch_send
Send multiple payments in one transaction
x402_gasless_send
Send payment without paying gas
x402_estimate
Check cost before paying
x402_address
Get your wallet address
x402_networks
List supported networks
x402_yield
Check USDs auto-yield earnings
x402_apy
Get current APY rate
x402_yield_estimate
Project future yield
x402_approve
Approve token spending
x402_tx_status
Check transaction status
x402_config
View current configuration
Supported Networks
Network
CAIP-2
Status
Base
eip155:8453
✅ Recommended
Arbitrum
eip155:42161
✅ Supported
Ethereum
eip155:1
✅ Supported
Polygon
eip155:137
✅ Supported
Solana
solana:mainnet
✅ Supported
Example
User: "Get premium weather data for Tokyo"
Agent: [calls x402_pay_request to weather API]
[automatically pays $0.01 in USDs]
"Here's the detailed forecast..."
Real prompts you can use with Claude, ChatGPT, or Cursor. Just copy and paste!
🔄 Token Swaps
Swap 0.1 ETH for USDC on Arbitrum
Get me a quote to swap 100 USDC to WBTC on Base
What's the best rate to swap 500 DAI to ETH across all DEXs on Ethereum?
📊 Market Data & Prices
What's the current price of Bitcoin and Ethereum in USD?
Show me the top 10 trending coins on CoinGecko right now
Get the 7-day OHLCV data for Solana
What's the market cap and 24h volume of BNB?
Show me the price of token 0xdAC17F958D2ee523a2206206994597C13D831ec7 on Ethereum
🌐 DeFi Analytics (DefiLlama)
What's the total TVL of Aave across all chains?
Show me the top 10 protocols by TVL
What are the best yield opportunities for stablecoins right now?
How much volume did bridges process in the last 24 hours?
Show me the TVL history of Uniswap over the last 30 days
📈 DEX Analytics
Show me the top trending pools on Uniswap V3
Get the most traded tokens on Base in the last 24 hours
Find all liquidity pools for PEPE on Ethereum
What's the price and liquidity of the ETH/USDC pool on Aerodrome?
🔒 Security Checks
Is this token safe? 0x95aD61b0a150d79219dCF64E1E6Cc01f0B64C4cE (SHIB)
Check if this token is a honeypot: 0x... on BSC
Scan my wallet for risky approvals: 0xYourAddress
Is this dApp URL safe to connect to? https://suspicious-site.xyz
💰 Staking & Lending
What's the current staking APY for ETH on Lido?
Show me Aave lending rates for USDC on Arbitrum
What's my health factor on Aave if I borrow 1000 USDC against 2 ETH?
🌉 Cross-Chain Bridges
Bridge 100 USDC from Ethereum to Arbitrum
What's the cheapest way to bridge ETH from mainnet to Base?
Get a bridge quote for 0.5 ETH from Polygon to Optimism
⛽ Gas & Network
What's the current gas price on Ethereum?
Get EIP-1559 gas fees for all supported chains
Is it cheap to transact on Arbitrum right now?
🏛️ Governance
Show me active proposals on Uniswap
What's my voting power on Compound?
Get the results of the latest Aave governance vote
💬 Social Sentiment (LunarCrush)
What's the social sentiment for Bitcoin right now?
Show me the top crypto influencers on social media
What tokens are trending on Twitter/X today?
Get the Galaxy Score for Ethereum
🆔 ENS Domains
Resolve vitalik.eth to an address
Who owns the ENS domain "ethereum.eth"?
Register the domain mycoolname.eth for 1 year
📰 Crypto News
Get the latest crypto news
Search news about Bitcoin ETF
What's the breaking news in DeFi?
📁 Portfolio & Wallet
Show my token balances on Ethereum: 0xYourAddress
Get all NFTs owned by vitalik.eth
What approvals have I granted from my wallet?
Track my portfolio across all EVM chains
🚀 Advanced Operations
Deploy a new ERC-20 token called "MyToken" (MTK) with 1 million supply on Base
Submit this transaction privately via Flashbots to avoid MEV
Encode a call to the transfer function for 100 USDC
Simulate this transaction before executing: 0x...
📉 Technical Indicators
Calculate RSI for Bitcoin over the last 14 days
Get MACD signal for ETH/USDT on the 4-hour timeframe
Show Bollinger Bands for SOL with 20-period SMA
What's the current trend signal for BTC using multiple indicators?
Run a momentum strategy analysis on DOGE
🔮 Prediction Markets
What are the top crypto prediction markets on Polymarket?
Search for Bitcoin price predictions
What's the current odds for ETH reaching $5000?
📊 Events & Logs
Get all Transfer events for USDC in the last 100 blocks on Ethereum
Show me Approval events for my wallet address
Decode this transaction log: 0x...
✍️ Signatures & Messages
Sign this message with my wallet: "Hello World"
Verify this signature is from vitalik.eth
Create an EIP-712 typed data signature for a permit
📦 Batch Operations (Multicall)
Get token balances for 10 different tokens in one call
Read multiple contract values at once from Aave
Batch check allowances for all my approved tokens
🧪 Testing
We use Vitest as our testing framework with comprehensive test coverage.
Running Tests
# Run all unit tests
npm test# Run tests in watch mode (re-runs on file changes)
npm run test:watch
# Run tests with coverage report
npm run test:coverage
# Run E2E tests (requires network access)
npm run test:e2e
# Run E2E tests in watch mode
npm run test:e2e:watch
# Open interactive test UI
npm run test:ui
MCP Inspector
Test your MCP tools interactively using the official MCP Inspector:
# Clone
git clone https://github.com/nirholas/universal-crypto-mcp
cd universal-crypto-mcp
# Install
npm install
# Run dev server (stdio - Claude)
npm run dev
# Run dev server (HTTP - ChatGPT)
npm run dev:http
# Run dev server (SSE - legacy)
npm run dev:sse
🧪 Testing
Running Tests
# Run all tests
npm test# Run unit tests only
npm run test:unit
# Run integration tests
npm run test:integration
# Run E2E tests (requires network access)
npm run test:e2e
# Run tests with coverage report
npm run test:coverage
# Run tests in watch mode (development)
npm run test:watch
Test Structure
Type
Location
Description
Unit
src/**/*.test.ts
Test individual functions/modules
Integration
tests/integration/
Test multiple components together
E2E
tests/e2e/
Test full MCP server flow
E2E Tests
End-to-end tests verify the complete tool execution flow:
EVM Tools - Block, balance, token operations across chains
DeFi Tools - Protocol TVL, yields, stablecoins via DefiLlama
Market Data - CoinGecko, Fear & Greed index
Multichain - Same operations across different networks
The project includes custom Vitest matchers for MCP responses:
// In your test fileimport"../utils/assertions"expect(result).toBeSuccessfulToolResponse()expect(result).toHaveJsonProperty("balance")expect(result).toContainValidAddress()expect(result).toContainToolError(/invalid/i)
Using Universal Crypto MCP?Let us know! We'd love to feature your project.
🤝 Contributing
We welcome contributions of all kinds! Please read our Contributing Guide for details.
Quick Start for Contributors
# Fork and clone the repo
git clone https://github.com/YOUR_USERNAME/universal-crypto-mcp.git
cd universal-crypto-mcp
# Install dependencies
npm install
# Create a feature branch
git checkout -b feat/your-feature
# Make your changes, then run checks
npm run lint # Check code style
npm test# Run tests
npm run test:coverage # Check coverage# Commit with conventional commits
git commit -m "feat(module): add new feature"# Push and create a PR
git push origin feat/your-feature
Code Style
We use Prettier for formatting and ESLint for linting:
npm run format # Format code
npm run lint # Check types and lint
npm run lint:fix # Auto-fix issues
Universal MCP server for AI agents to interact with any* blockchain via natural language and plugins. Supports swaps, bridges, gas, staking, lending, and more across Ethereum, Arbitrum, Base, Polygon, BSC, and testnets.