ANNOUNCEMENT.md•9.79 kB
# 🚀 Introducing ValueRouter MCP Server: Cross-Chain DeFi for AI Agents
_Making USDC bridging across 15+ blockchains accessible to AI agents through the Model Context Protocol_
---
## TL;DR
We've built the first Model Context Protocol (MCP) server that enables AI agents to seamlessly bridge USDC across 15+ blockchain networks including Ethereum, Arbitrum, Solana, Sui, and Cosmos chains. It's production-ready, fully open-source, and available on NPM today.
**Quick Start:**
```bash
npx @valuerouter/mcp-server
```
**Claude Desktop Integration:**
```json
{
"mcpServers": {
"valuerouter": {
"command": "npx",
"args": ["@valuerouter/mcp-server"]
}
}
}
```
## The Problem: AI Agents Can't Do DeFi
Despite the rapid advancement of AI agents, they've been largely locked out of decentralized finance (DeFi). While they can help with analysis, research, and strategy, they can't actually execute cross-chain transactions, check balances across multiple blockchains, or manage complex bridging operations.
This creates a significant gap between AI capabilities and DeFi opportunities:
- **Manual Bridge Operations**: Users must manually navigate different bridges, compare fees, and monitor transactions
- **Chain Fragmentation**: Assets scattered across multiple blockchains require separate interfaces
- **Complex Fee Calculations**: Bridge fees, gas costs, and slippage vary significantly between routes
- **Transaction Monitoring**: Tracking cross-chain transactions requires checking multiple explorers
## The Solution: ValueRouter MCP Server
The ValueRouter MCP server bridges this gap by providing AI agents with comprehensive cross-chain USDC bridging capabilities through a standardized, secure interface.
### 🌐 Universal Chain Support
**EVM Chains:**
- Ethereum (1)
- Arbitrum (42161)
- Optimism (10)
- Polygon (137)
- Avalanche (43114)
- Base (8453)
- Celo (42220)
**Non-EVM Chains:**
- Solana
- Sui
- Noble (Cosmos)
- Osmosis
- Evmos
- Sei
- Coreum
- dYdX
### 🛠️ Complete Tool Suite
The MCP server provides 7 comprehensive tools:
1. **`get_supported_chains`**: Discover available blockchain networks
2. **`get_supported_tokens`**: List bridgeable tokens and their addresses
3. **`get_bridge_quote`**: Calculate fees, routes, and timing estimates
4. **`execute_bridge`**: Prepare bridge transactions (simulation-safe)
5. **`get_transaction_status`**: Real-time transaction monitoring
6. **`get_user_balance`**: Multi-chain balance checking
7. **`estimate_bridge_fees`**: Advanced fee and gas estimation
### 🔒 Security-First Design
- **Simulation Only**: Never handles private keys or executes transactions
- **Comprehensive Validation**: Full input validation and error handling
- **Read-Only Operations**: All operations are query-based for maximum safety
- **Type Safety**: Full TypeScript implementation with strict typing
## Real-World Use Cases
### 1. AI Trading Assistants
```typescript
// AI agent can now do this:
const quote = await bridgeQuote({
fromChainId: '1', // Ethereum
toChainId: '42161', // Arbitrum
amount: '1000000000' // 1000 USDC
})
// "I can bridge 1000 USDC from Ethereum to Arbitrum for $2.50 in fees,
// taking approximately 15 minutes via Circle CCTP"
```
### 2. Portfolio Management
```typescript
// Check balances across all chains
const balances = await getUserBalance({
chainIds: ['1', '42161', '10', '137', 'solana'],
tokenSymbol: 'USDC',
userAddress: '0x...'
})
// "You have 500 USDC on Ethereum, 1200 USDC on Arbitrum,
// 300 USDC on Solana, totaling 2000 USDC across chains"
```
### 3. Yield Optimization
```typescript
// Find the best bridge route for yield farming
const routes = await compareRoutes({
fromChain: 'ethereum',
toChain: 'arbitrum',
amount: '10000000000',
prioritize: 'lowest_fee'
})
// "The cheapest route saves you $15 in fees compared to alternatives"
```
### 4. Transaction Monitoring
```typescript
// Track bridge progress
const status = await getTransactionStatus({
transactionHash: '0x...',
fromChainId: '1',
toChainId: '42161'
})
// "Your bridge transaction is 60% complete. Estimated completion: 8 minutes"
```
## Integration Examples
### Claude Desktop
Add to your `claude_desktop_config.json`:
```json
{
"mcpServers": {
"valuerouter": {
"command": "npx",
"args": ["@valuerouter/mcp-server"],
"env": {
"ETHEREUM_RPC_URL": "https://mainnet.infura.io/v3/YOUR_KEY",
"ARBITRUM_RPC_URL": "https://arb1.arbitrum.io/rpc",
"SOLANA_RPC_URL": "https://api.mainnet-beta.solana.com"
}
}
}
}
```
### OpenAI Function Calling
```python
from valuerouter_mcp import ValueRouterMCP
# Bridge MCP tools to OpenAI functions
bridge = ValueRouterMCP()
functions = bridge.get_openai_function_definitions()
response = openai.ChatCompletion.create(
model="gpt-4",
messages=[{"role": "user", "content": "Bridge 100 USDC to Arbitrum"}],
functions=functions
)
```
### LangChain Integration
```python
from langchain.tools import Tool
from valuerouter_mcp import ValueRouterMCP
mcp = ValueRouterMCP()
tools = [
Tool(
name="bridge_usdc",
description="Bridge USDC between blockchain networks",
func=mcp.bridge_usdc
)
]
```
## Why This Matters
### For AI Developers
- **First-class DeFi Integration**: Add sophisticated financial capabilities to your AI agents
- **Production Ready**: Comprehensive error handling, logging, and monitoring
- **Easy Integration**: Standard MCP protocol works with any compatible AI framework
### For DeFi Users
- **Intelligent Automation**: AI agents can now optimize your cross-chain operations
- **Better Decision Making**: AI can analyze fees, timing, and routes across all chains
- **Unified Experience**: Single interface for 15+ blockchain networks
### For the Ecosystem
- **Bridge to AI**: First step toward AI-native DeFi protocols
- **Open Source**: Fully open-source and community-driven
- **Extensible**: Easy to add new chains, tokens, and features
## Technical Architecture
### Built on Standards
- **Model Context Protocol**: Anthropic's standard for AI tool integration
- **TypeScript**: Full type safety and developer experience
- **Zod Validation**: Runtime type checking and validation
- **Circle CCTP**: Secure, native USDC transfers
### Chain Integration
- **EVM Support**: Ethers.js for Ethereum-compatible chains
- **Solana**: @solana/web3.js for Solana ecosystem
- **Sui**: @mysten/sui for Sui network
- **Cosmos**: @cosmjs/stargate for Cosmos chains
### Error Handling
- **Structured Errors**: Consistent error codes and messages
- **Validation**: Input validation at every layer
- **Logging**: Comprehensive logging for debugging
- **Graceful Degradation**: Fallback mechanisms for network issues
## Getting Started
### Installation
```bash
# Install globally
npm install -g @valuerouter/mcp-server
# Or use directly
npx @valuerouter/mcp-server
```
### Quick Test
```bash
# Clone the repository
git clone https://github.com/valuerouter/mcp-server
cd mcp-server
# Run quick start script
chmod +x scripts/quick-start.sh
./scripts/quick-start.sh
```
### Configuration
Set up your RPC URLs in `.env`:
```env
ETHEREUM_RPC_URL=https://mainnet.infura.io/v3/YOUR_KEY
ARBITRUM_RPC_URL=https://arb1.arbitrum.io/rpc
SOLANA_RPC_URL=https://api.mainnet-beta.solana.com
SUI_RPC_URL=https://fullnode.mainnet.sui.io:443
```
## Community & Support
### Resources
- **Documentation**: [github.com/valuerouter/mcp-server](https://github.com/valuerouter/mcp-server)
- **Examples**: [Integration examples](https://github.com/valuerouter/mcp-server/tree/main/examples)
- **Issues**: [GitHub Issues](https://github.com/valuerouter/mcp-server/issues)
### Community
- **Discord**: [ValueRouter Community](https://discord.gg/valuerouter)
- **Twitter**: [@ValueRouter](https://twitter.com/valuerouter)
- **Email**: mcp-support@valuerouter.com
## Roadmap
### Short Term (Q1 2024)
- [ ] Additional EVM chains (Scroll, Linea, Mantle)
- [ ] Enhanced fee optimization algorithms
- [ ] Real-time price impact calculations
- [ ] Advanced transaction simulation
### Medium Term (Q2 2024)
- [ ] Multi-token support (USDT, DAI, WETH)
- [ ] Yield farming integration
- [ ] Liquidity pool management
- [ ] Cross-chain arbitrage detection
### Long Term (Q3+ 2024)
- [ ] AI-powered route optimization
- [ ] MEV protection mechanisms
- [ ] Advanced portfolio management
- [ ] Institutional-grade features
## Contributing
We welcome contributions from the community! Whether you're:
- Adding support for new chains
- Improving documentation
- Fixing bugs
- Suggesting features
Check out our [Contributing Guide](https://github.com/valuerouter/mcp-server/blob/main/CONTRIBUTING.md) to get started.
## Conclusion
The ValueRouter MCP server represents a significant step forward in making DeFi accessible to AI agents. By providing a standardized, secure interface for cross-chain USDC bridging, we're enabling a new generation of AI-powered financial applications.
Whether you're building trading bots, portfolio managers, or yield optimizers, the ValueRouter MCP server gives your AI agents the tools they need to operate effectively in the multi-chain DeFi ecosystem.
**Get started today:**
```bash
npx @valuerouter/mcp-server
```
---
_Built with ❤️ by the ValueRouter team. Open source, community-driven, and ready for production._
**Links:**
- [GitHub Repository](https://github.com/valuerouter/mcp-server)
- [NPM Package](https://www.npmjs.com/package/@valuerouter/mcp-server)
- [Documentation](https://github.com/valuerouter/mcp-server#readme)
- [Examples](https://github.com/valuerouter/mcp-server/tree/main/examples)
- [Discord Community](https://discord.gg/valuerouter)