Getting Started
MCP Server
The MCP server lets AI agents use DeFi Copilot tools directly in conversation. Wallet creation, x402 payments, and on-chain settlement all happen automatically — no human intervention needed.
Installation
Claude Code
Claude Desktop
Add to your claude_desktop_config.json:
npm package
PACKAGE
defi-copilot-mcp
Version: 1.3.0
Registry: npmjs.com
Runtime: Node.js ≥18
Agent wallet
On first use, the MCP server automatically provisions an agent wallet:
01Generates a new Stellar keypair
02Funds with XLM via Friendbot (testnet only)
03Sets up USDC trustline
04Swaps 50 XLM → USDC for payment capability
05Saves to ~/.defi-copilot/wallet-testnet.json
Private keys are stored locally on the user's machine and never leave the device. On mainnet, the wallet is generated but not auto-funded — the user must deposit XLM manually.
Environment variables
| Variable | Required | Default | Description |
|---|---|---|---|
| STELLAR_NETWORK | No | testnet | testnet or mainnet |
| DEFI_COPILOT_API | No | https://api.fxjrin.com | Backend API URL. Override for self-host |
Network switching
Switch networks within a conversation using natural language: