DEFI_COPILOT
Getting Started

Introduction

DeFi Copilot is a Stellar-native DeFi intelligence layer for AI agents. Query yield strategies and swap routes — paying per request with x402. No API keys. No subscriptions.

13
MCP Tools
0.001
USDC / call
x402
Protocol
Stellar
Network

Overview

DeFi Copilot exposes two intelligent endpoints — /defi/yield/best and /defi/swap/best — that return live on-chain intelligence from Blend Finance via Soroban RPC and Stellar DEX.

Each paid call uses the x402 protocol: the server returns HTTP 402, the agent builds and signs a Stellar USDC transaction, and the local facilitator settles it on-chain before returning data.

Two ways to use

MCP Server

Install in Claude Desktop or any MCP-compatible AI. Agents query and pay automatically without human intervention.

Claude DesktopClaude Code
REST API

Standard HTTP with x402 payment protocol. Works with any HTTP client. Live at api.fxjrin.com.

HTTPx402

How it works

payment flow
User / AI Agent
      |
      | natural language or direct API call
      v
MCP Server (defi-copilot-mcp)
      |
      | GET /defi/yield/best
      v
Backend API  →  402 Payment Required
      |
      | Agent builds + signs Stellar USDC tx
      v
Facilitator verifies + settles on-chain
      |
      v
Return DeFi intelligence  ✓

Live backend

BASE URL
https://api.fxjrin.com
Payment: USDC via x402
Network: Stellar Mainnet
Facilitator: internal (port 4022)

Quick start

The fastest way to get started is via the MCP server — install in Claude Code with one command:

claude code
claude mcp add defi-copilot -- npx -y defi-copilot-mcp

Or add to Claude Desktop config:

claude_desktop_config.json
{
  "mcpServers": {
    "defi-copilot": {
      "command": "npx",
      "args": ["-y", "defi-copilot-mcp"],
      "env": {
        "STELLAR_NETWORK": "testnet"
      }
    }
  }
}