USDCx Bridge
A conversational MCP server that enables bridging USDC between Ethereum and Stacks through natural language interactions with ChatGPT, handling deposits, withdrawals, and live status tracking via React widgets.
README
USDCx Bridge
Bridge USDC to Stacks using ChatGPT. No contracts. No complexity. Just conversation.
The first conversational bridge interface built on ChatGPT's Apps SDK and Model Context Protocol.
What It Does
Talk to ChatGPT, connect your wallets (MetaMask + Leather), and bridge USDC between Ethereum and Stacks—all without leaving the chat interface.
Why It Exists
Bridging USDC to Stacks today requires manual smart contract calls, complex address encoding (c32 → bytes32), and waiting 15-60 minutes with zero visibility.
USDCx Bridge makes it as easy as describing what you want in plain English.
How It Works
- Natural language - "Bridge 50 USDC to Stacks"
- Widget appears - React component renders in ChatGPT
- Connect wallets - MetaMask for Ethereum, Leather for Stacks
- Sign & bridge - One click, you sign with your wallet
- Track live - See confirmations and ETA in real-time
Features
- ✅ Conversational interface - No technical knowledge required
- ✅ Your wallets, your control - We never custody funds
- ✅ Live status tracking - Know exactly what's happening
- ✅ Built on official protocols - Circle xReserve + Stacks attestation
- ✅ Open source - Verify everything
- ✅ First MCP blockchain app - Sets the standard
Quick Start
1. Enable Developer Mode in ChatGPT settings
2. Create a custom app and add this MCP server:
https://usdcxbridge.fly.dev/mcp
3. Type in ChatGPT:
"Bridge USDC to Stacks"
That's it. The widget will appear and guide you through the rest.
Tech Stack
Backend
- @modelcontextprotocol/sdk - MCP server
- viem - Ethereum contract interactions
- @stacks/transactions - Stacks operations
- Node.js + TypeScript
Frontend (Widgets)
- React + TypeScript
- viem - Ethereum wallet connections
- @stacks/connect - Stacks wallet integration
Bridge Infrastructure
- Circle xReserve (Ethereum smart contracts)
- Stacks attestation service
Security
- ✅ You connect your own wallets
- ✅ You sign every transaction
- ✅ We never custody your funds
- ✅ We never access your private keys
- ✅ Uses official Circle xReserve protocol
Development
Prerequisites
- Node.js 18+
- npm or pnpm
Installation
# Clone repo
git clone https://github.com/yourusername/usdcx-bridge.git
cd usdcx-bridge
# Install dependencies
npm install
# Build everything (server + widgets)
npm run build
# Run MCP server locally (stdio mode)
npm start
# Run HTTP server (for ChatGPT integration)
npm run start:http
# Test with MCP inspector
npm test
Environment Variables
Create a .env file:
# Ethereum Network (mainnet or testnet)
ETHEREUM_NETWORK=testnet
ETHEREUM_RPC_URL=https://ethereum-sepolia.publicnode.com
# Stacks Network
STACKS_NETWORK=testnet
# Contract Addresses (Testnet)
XRESERVE_CONTRACT=0x008888878f94C0d87defdf0B07f46B93C1934442
USDC_CONTRACT=0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238
STACKS_USDCX_CONTRACT=ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.usdcx-v1
# HTTP Server
PORT=3001
BASE_URL=http://localhost:3001
Project Structure
usdcx-bridge/
├── src/
│ ├── server/
│ │ ├── index.ts # MCP server (stdio mode)
│ │ ├── http-server.ts # HTTP wrapper for ChatGPT
│ │ └── lib/
│ │ ├── ethereum.ts # Ethereum/xReserve logic
│ │ ├── stacks.ts # Stacks/USDCx logic
│ │ └── helpers.ts # Address encoding utilities
│ └── widgets/
│ ├── DepositWidget.tsx # Ethereum → Stacks
│ ├── WithdrawalWidget.tsx # Stacks → Ethereum
│ ├── StatusWidget.tsx # Transaction tracking
│ └── hooks/
│ ├── useMetaMask.ts # MetaMask integration
│ └── useLeather.ts # Leather wallet integration
├── dist/ # Built files
├── package.json
├── tsconfig.json
└── README.md
Architecture
ChatGPT
↓
MCP Server (tools: prepareDeposit, prepareWithdrawal, checkStatus)
↓
React Widgets (wallet connection + transaction signing)
↓
Smart Contracts (xReserve on Ethereum, usdcx-v1 on Stacks)
MCP Tools
The server exposes these tools to ChatGPT:
prepareDeposit
Prepares USDC → USDCx bridge transaction (Ethereum to Stacks)
Parameters:
amount- Amount of USDC to bridgestacksRecipient- Destination Stacks addressuserEthereumAddress- User's Ethereum address
Returns: Widget URL for MetaMask signing
prepareWithdrawal
Prepares USDCx → USDC withdrawal transaction (Stacks to Ethereum)
Parameters:
amount- Amount of USDCx to withdraw (minimum 4.80)ethereumRecipient- Destination Ethereum addressstacksAddress- User's Stacks address
Returns: Widget URL for Leather signing
checkStatus
Checks transaction status on either chain
Parameters:
txHash- Transaction hashchain- Either "ethereum" or "stacks"
Returns: Status widget with live updates
getBalances
Gets USDC and USDCx balances
Parameters:
ethereumAddress(optional)stacksAddress(optional)
Returns: Balance information
healthCheck
Verifies bridge contracts are operational
Returns: System status
Deployment
Docker
# Build image
docker build -t usdcx-bridge .
# Run container
docker run -p 3001:3001 usdcx-bridge
Fly.io
# Install flyctl
curl -L https://fly.io/install.sh | sh
# Deploy
fly deploy
Manual
# Build
npm run build
# Start
NODE_ENV=production npm run start:http
Testing
Local Testing with MCP Inspector
npm test
This opens the MCP inspector for testing tools locally.
Test Deposit Flow
- Get testnet USDC from Sepolia faucet
- In ChatGPT: "Bridge 5 USDC to ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM"
- Click widget link
- Connect MetaMask
- Approve USDC (if needed)
- Sign bridge transaction
- Wait ~15 minutes
- Check USDCx balance on Stacks
Test Withdrawal Flow
- Ensure you have USDCx on Stacks testnet
- In ChatGPT: "Withdraw 5 USDCx to 0xYourEthereumAddress"
- Click widget link
- Connect Leather wallet
- Sign burn transaction
- Wait ~25-45 minutes
- Check USDC balance on Ethereum
Troubleshooting
Widget not loading
- Check that
npm run buildcompleted successfully - Verify HTTP server is running on correct port
- Check browser console for errors
MetaMask connection fails
- Install MetaMask extension
- Switch to Sepolia testnet
- Refresh page and try again
Leather connection fails
- Install Leather wallet
- Create/import Stacks wallet
- Ensure on testnet mode
Transaction stuck
- Check transaction on block explorer
- For Ethereum: https://sepolia.etherscan.io
- For Stacks: https://explorer.hiro.so (testnet)
- Bridge can take 15-60 minutes depending on attestation
Contributing
Contributions welcome! Please:
- Fork the repo
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
License
MIT License - see LICENSE file
Links
- Documentation: MCP Protocol Docs
- Circle xReserve: Official Docs
- Stacks USDCx: GitHub
- Report Issues: GitHub Issues
Acknowledgments
Built with:
- ChatGPT Apps SDK
- Model Context Protocol
- Circle's xReserve Protocol
- Stacks Blockchain
- Viem & wagmi
- React
Made with ❤️ for the Bitcoin & Ethereum ecosystems
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。
mcp-server-qdrant
这个仓库展示了如何为向量搜索引擎 Qdrant 创建一个 MCP (Managed Control Plane) 服务器的示例。