# Overview
## What is Universal Crypto MCP?
Universal Crypto MCP is the world's first **AI-native blockchain infrastructure** that combines:
### π Universal MCP Server
A comprehensive Model Context Protocol server that gives AI agents superpowers:
- **380+ blockchain tools** across 20+ networks
- **Natural language blockchain interactions**
- **Multi-chain portfolio management**
- **DeFi protocol integrations** (Uniswap, Aave, Compound, etc.)
- **Real-time market data & analytics**
- **Smart contract interactions**
### π x402 Payment Protocol
An industry-first **AI agent payment system** that enables:
- **Pay-per-request APIs** accepting cryptocurrency
- **Automatic on-chain payment verification**
- **AI agent discovery network** for finding paid services
- **One-click deployment** to production
- **Built-in escrow & settlements**
---
## The Problem We Solve
### For AI Agents
β **Before**: AI agents couldn't interact with blockchains or make payments
β
**After**: Full blockchain access + ability to pay for premium services
### For Developers
β **Before**: Building paid APIs for AI required complex payment infrastructure
β
**After**: One command to add crypto payments to any API
### For Users
β **Before**: Manual blockchain interactions across multiple interfaces
β
**After**: Just describe what you want in natural language
---
## Architecture
```
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β AI Agents Layer β
β ββββββββββββ ββββββββββββ ββββββββββββ ββββββββββββ β
β β Claude β β ChatGPT β β Cursor β β Custom β β
β ββββββ¬ββββββ ββββββ¬ββββββ ββββββ¬ββββββ ββββββ¬ββββββ β
βββββββββΌββββββββββββββΌββββββββββββββΌββββββββββββββΌβββββββββββ
β β β β
βββββββββββββββ΄ββββββββββββββ΄ββββββββββββββ
β
βββββββββββββΌββββββββββββ
β β
β MCP Protocol β
β (JSON-RPC 2.0) β
β β
βββββββββββββ¬ββββββββββββ
β
βββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββ
β Universal Crypto MCP Server β
β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Core MCP Server (380+ Tools) β β
β β ββ Blockchain Tools (transfers, queries, contracts) β β
β β ββ DeFi Tools (swap, lend, borrow, stake) β β
β β ββ Analytics Tools (portfolio, market data) β β
β β ββ Trading Tools (strategies, execution) β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β x402 Payment Gateway β β
β β ββ Payment Verification (on-chain) β β
β β ββ Pricing Engine (dynamic, tiered) β β
β β ββ Rate Limiting & Analytics β β
β β ββ Discovery Protocol β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β
ββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββΌββββββββββββββββ
β β β
βΌ βΌ βΌ
ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ
β EVM Chains β β Solana β β DeFi DEXs β
β β’ Ethereum β β β’ Mainnet β β β’ Uniswap β
β β’ Arbitrum β β β’ Devnet β β β’ Aave β
β β’ Base β β β’ SPL Tokens β β β’ Compound β
β β’ Polygon β ββββββββββββββββ β β’ Curve β
β β’ Optimism β ββββββββββββββββ
β β’ 10+ more β
ββββββββββββββββ
```
---
## Key Concepts
### Model Context Protocol (MCP)
- **What**: Open protocol for connecting AI assistants to data sources
- **Why**: Standardized way for AI to access external tools
- **How**: JSON-RPC 2.0 over stdio or HTTP
### x402 Protocol
- **What**: Payment protocol for AI agent services (HTTP 402 Payment Required)
- **Why**: Enables monetization of AI services with crypto
- **How**: HTTP headers + on-chain verification
### Multi-Chain Support
- **What**: Single API for 20+ blockchain networks
- **Why**: Eliminate per-chain integration complexity
- **How**: Unified abstractions over viem, ethers, web3.js
### Pay-Per-Request Model
- **What**: Micropayments for each API call
- **Why**: Fair pricing, no subscriptions, no rate limits
- **How**: Crypto payments verified on-chain
---
## Use Cases
### π€ AI Agent Capabilities
**Portfolio Management**
```
User: "Show my crypto portfolio across all chains"
Agent: *Uses Universal MCP to query 20+ chains*
*Aggregates balances, calculates values*
*Returns formatted portfolio with USD values*
```
**Automated Trading**
```
User: "If ETH drops below $2000, swap 1 ETH to USDC on Arbitrum"
Agent: *Monitors price using market data tools*
*Executes swap via Uniswap tools*
*Confirms transaction on-chain*
```
**DeFi Interactions**
```
User: "Find the best yield for 1000 USDC across all chains"
Agent: *Queries lending rates on Aave, Compound, etc.*
*Compares APYs across chains*
*Suggests optimal strategy*
```
### π° Monetized AI Services
**Premium Data APIs**
```typescript
// Weather API that charges per request
import { wrapWithX402 } from "@nirholas/universal-crypto-mcp/x402";
const app = express();
app.get("/api/weather/:city", async (req, res) => {
const forecast = await getWeatherForecast(req.params.city);
res.json(forecast);
});
wrapWithX402(app, {
pricing: { "GET /api/weather/*": "$0.001" },
wallet: "0x..." // Payments go here
});
```
**AI Agent Marketplace**
```typescript
// Register your AI service for discovery
import { registerService } from "@nirholas/universal-crypto-mcp/x402";
await registerService({
name: "crypto-sentiment-analyzer",
description: "Real-time crypto sentiment analysis",
pricing: { "analyze": "$0.01" },
categories: ["analytics", "sentiment"],
});
```
### π’ Business Applications
**Analytics Dashboards**
- Build paid analytics APIs
- Charge per query or dataset
- Automatic crypto payment handling
**Trading Bots**
- Multi-chain execution
- DeFi strategy automation
- Risk management tools
**Data Services**
- On-chain data feeds
- Market intelligence
- Transaction monitoring
---
## Technology Stack
### Core Technologies
| Component | Technology | Purpose |
|-----------|-----------|---------|
| **Runtime** | Node.js 18+ | Server execution |
| **Language** | TypeScript 5.0 | Type safety |
| **Protocol** | MCP 1.0 | AI agent communication |
| **Blockchain** | viem, ethers | EVM interactions |
| **Solana** | @solana/web3.js | Solana support |
| **HTTP** | Express 4.x | API server |
| **Payments** | x402 Protocol | Crypto payments |
### Blockchain Integrations
**EVM Chains** (via viem)
- Ethereum, Arbitrum, Base, Polygon, Optimism
- BNB Chain, Avalanche, Fantom
- zkSync, Linea, Scroll, Blast, Mode
**Solana** (via @solana/web3.js)
- Mainnet, Devnet, Testnet
- SPL Token support
- Program interactions
**DeFi Protocols**
- Uniswap V2/V3
- Aave V2/V3
- Compound V2/V3
- Curve Finance
---
## Getting Started
Ready to give AI agents superpowers?
1. **[Installation](installation.md)** - Install in 60 seconds
2. **[Quick Start](quickstart.md)** - Your first blockchain transaction
3. **[Configuration](configuration.md)** - Set up your environment
4. **[x402 Setup](../x402-deploy/quick-start.md)** - Accept payments
---
## Next Steps
<div class="grid cards" markdown>
- π **[Quick Start Guide](quickstart.md)**
Get up and running in minutes
- π **[API Reference](../mcp-server/api-reference.md)**
Complete tool documentation
- π‘ **[Tutorials](../tutorials/index.md)**
Learn by building real projects
- π° **[x402 Deploy](../x402-deploy/overview.md)**
Monetize your AI services
</div>