MCP Hub
Back to servers

SperaxOS

A comprehensive MCP server for interacting with the Sperax DeFi ecosystem on Arbitrum and BNB Chain. It provides tools for managing the USDs auto-yield stablecoin, SPA governance tokens, veSPA staking, Demeter yield farms, and real-time protocol analytics.

Stars
4
Forks
1
Tools
57
Updated
Jan 7, 2026
Validated
Jan 9, 2026

Sperax Ecosystem Crypto & DeFI MCP Server

Model Context Protocol Server for Sperax DeFi Ecosystem

Arbitrum BNB Chain Ethereum

Enable AI agents to interact with USDs (auto-yield stablecoin), SPA governance, veSPA staking, and Demeter yield farms, and Plutus on BNB Chain and Arbitrum.

🔧 Development

Prerequisites

  • Node.js 18+
  • pnpm (recommended) or npm

Setup

# Clone repository
git clone https://github.com/nirholas/sperax-crypto-mcp
cd sperax-crypto-mcp

# Install dependencies
pnpm install

# Build TypeScript
pnpm build

# Run in development mode (with auto-rebuild)
pnpm dev

Running

# Start stdio server (for Claude Desktop)
pnpm start

# Start HTTP server (for integrations)
pnpm start:http

# Run with BNB Chain RPC
CUSTOM_RPC_URL="https://..." pnpm start

# Run with Arbitrum RPC
ARBITRUM_RPC_URL="https://..." pnpm start

Testing

# Run tests
pnpm test

# Run tests in watch mode
pnpm test:watch

# Test with MCP Inspector
npx @modelcontextprotocol/inspector dist/index.js

Linting & Type Checking

# Lint code
pnpm lint

# Type check
pnpm typecheck

🤝 Quick Start

Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "sperax": {
      "command": "npx",
      "args": ["-y", "@sperax/mcp-server"]
    }
  }
}

Config file locations:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/claude/claude_desktop_config.json

Cursor / VS Code

Add to your MCP settings:

{
  "mcp.servers": {
    "sperax": {
      "command": "npx",
      "args": ["-y", "@sperax/mcp-server"]
    }
  }
}

With Custom RPC Endpoint

For better performance and reliability, use your own Arbitrum RPC:

{
  "mcpServers": {
    "sperax": {
      "command": "npx",
      "args": ["-y", "@sperax/mcp-server"],
      "env": {
        "ARBITRUM_RPC_URL": "https://your-rpc-endpoint.com"
      }
    }
  }
}

HTTP Server Mode

For advanced integrations, run as an HTTP server:

# Start HTTP server on port 3000
pnpm start:http

# Or with custom port
PORT=8080 pnpm start:http
Sperax MCP Server Repository

For best compatability, use within SperaxOS. The servers provided in this repo largely are based upon the already built and tested products on app.sperax.io. The Sperax Crypto and Defi MCP Server project is an additional product of Sperax and SperaxOS, created for the open source community. For the millions of developers that may not have had the tools available to use cryptocurrency, blockchain, defi, and web3 tools within their usual workspace, we are thrilled to be laying the groundworks for the use of blockchain and cryptocurrency use paired with the Model Context Protocol. Sperax is building an autonomous financial infrastructure, centered around its auto-yield stablecoin USDs and its utility/governance token SPA, using AI-driven agents to automate yield generation and financial management across blockchains like Arbitrum and BNB Chain. It combines collateralized stability with algorithmic mechanisms, aiming to offer passive income for users through its integrated system, which includes the SperaxOS AI infrastructure. SperaxOS is the world's first AI-native operating system for decentralized finance, transforming how enterprises, developers, and DeFi protocols manage on-chain capital. SperaxOS replaces manual DeFi workflows with autonomous, intelligent automation. While traditional AI agents generate content or answer questions, SperaxOS agents execute capital, automatically optimizing yields, rebalancing portfolios, defending against risks, and managing treasury operations 24/7 with zero human intervention. This repo will initially focus on Sperax ecosystem products such as USDs and SPA. For organizational purposes, SperaxOS documents and tools are seperated in their respective repositories.

🛠️ Available Tools

USDs Stablecoin (7 tools)

ToolDescription
usds_get_infoGet USDs overview including supply, APR, and last rebase time
usds_get_balanceGet USDs balance and rebase state for any address
usds_get_rebase_stateCheck if an address receives yield rebases
usds_get_mint_paramsGet current mint fees and parameters
usds_get_yield_infoGet current yield metrics, APR, and distribution
usds_get_collateral_ratioGet protocol collateralization ratio
usds_estimate_mintSimulate minting USDs with specific collateral

Vault & Collateral (10 tools)

ToolDescription
vault_get_statusGet Vault TVL, health status, utilization, and fees
vault_get_collateralsList all supported collaterals with current allocations
vault_get_collateral_detailsGet detailed info for specific collateral (USDC, USDT, DAI, FRAX)
vault_get_strategiesList all active yield strategies and their performance
vault_get_strategy_detailsGet specific strategy allocation and APY
vault_get_oracle_pricesGet all collateral oracle prices from Chainlink
vault_get_peg_statusCheck USDs peg health and deviation from $1
vault_simulate_mintSimulate mint with fees and expected output
vault_simulate_redeemSimulate redemption with fees and slippage
vault_get_allocation_targetsGet target vs actual collateral allocations

SPA & Staking (8 tools)

ToolDescription
spa_get_infoGet SPA token overview including supply and staking stats
spa_get_balanceGet SPA, veSPA, and xSPA balances for address
vespa_get_positionGet veSPA lock position details and voting power
vespa_calculate_powerCalculate voting power for specific lock amount/duration
vespa_get_statsGet global veSPA statistics (total locked, holders)
xspa_get_positionGet xSPA vesting position and pending redemptions
xspa_calculate_redemptionCalculate SPA output for xSPA redemption
buyback_get_statsGet SPA buyback & burn statistics

Demeter Farms (7 tools)

ToolDescription
demeter_list_farmsList all active farms with APR, TVL, and filters
demeter_get_farm_detailsGet specific farm detailed info and mechanics
demeter_get_user_positionGet user's positions across all Demeter farms
demeter_calculate_rewardsCalculate pending rewards for user in farm
demeter_estimate_aprEstimate APR for specific deposit amount
demeter_get_top_farmsGet highest APR farms with optional filters
demeter_get_farm_typesGet supported farm types (UniV3, Camelot, Balancer)

Dripper (5 tools)

ToolDescription
dripper_get_statusGet Dripper operational status and health
dripper_get_balanceGet pending yield balance waiting to be distributed
dripper_get_configGet drip period and distribution configuration
dripper_estimate_next_rebaseEstimate next rebase time and expected amount
dripper_calculate_earningsCalculate projected earnings for USDs holdings

Oracle (5 tools)

ToolDescription
oracle_get_all_pricesGet all collateral prices from Chainlink oracles
oracle_get_priceGet specific asset price with timestamp
oracle_check_stalenessCheck if oracle data is fresh (within heartbeat)
oracle_check_deviationCheck price deviation from $1 peg
oracle_get_sourcesGet oracle source information and configuration

Analytics (6 tools)

ToolDescription
analytics_get_tvlGet Total Value Locked breakdown by component
analytics_get_revenueGet protocol revenue metrics and trends
analytics_get_apy_historyGet historical APY data (7d, 30d, 90d, 1y)
analytics_get_user_statsGet comprehensive user statistics
analytics_compare_yieldsCompare USDs yields with competitors (Aave, Compound)
analytics_get_protocol_healthGet overall protocol health score and indicators

Governance (5 tools)

ToolDescription
governance_get_overviewGet governance overview and current state
governance_get_proposalsList recent/active governance proposals
governance_get_proposal_detailsGet specific proposal details and voting status
governance_get_voting_powerGet voting power for address (veSPA-based)
governance_get_delegatesGet delegation information for address

Yield Reserve (4 tools)

ToolDescription
yield_reserve_get_statusGet yield reserve status and balance
yield_reserve_get_balanceGet available yield for distribution
yield_reserve_get_configGet reserve configuration parameters
yield_reserve_get_historyGet historical yield collection data

📚 Available Resources

Resource URIDescription
sperax://docs/overviewComplete protocol overview and architecture
sperax://docs/usdsUSDs stablecoin documentation and mechanics
sperax://docs/stakingveSPA/xSPA staking guide with formulas
sperax://docs/demeterDemeter yield farming guide
sperax://docs/vaultVault and collateral management documentation
sperax://docs/oraclesOracle system documentation and addresses
sperax://docs/governanceDAO governance guide and voting
sperax://docs/securitySecurity audits and bug bounty program
sperax://docs/formulasKey protocol formulas and calculations
sperax://docs/apiComplete API reference for all tools
sperax://contracts/addressesAll deployed contract addresses on Arbitrum

💡 Example Conversations

Check USDs Yield

User: "What's the current USDs APY and how much would I earn on $10,000?"

Agent: Uses usds_get_yield_info and calculates projections

Find Best Farms

User: "Show me Demeter farms with over 20% APR"

Agent: Uses demeter_get_top_farms with minApr filter

Calculate veSPA Power

User: "How much voting power would I get locking 1000 SPA for 2 years?"

Agent: Uses vespa_calculate_power with amount=1000, days=730

Protocol Health Check

User: "Give me an overview of the Sperax protocol health"

Agent: Uses multiple tools to compile health dashboard

Portfolio Analysis

User: "Check my USDs balance at 0x..."

Agent: Uses usds_get_balance and usds_get_yield_info


💬 Example Prompts

PromptDescription
what_is_usdsLearn about USDs auto-yield stablecoin
how_to_mintStep-by-step guide for minting USDs
how_to_redeemGuide for redeeming USDs to stablecoins
my_usds_balanceCheck USDs balance and yield info
my_yield_earningsCalculate potential yield earnings
stake_spaGuide for staking SPA to get veSPA
my_staking_positionCheck veSPA staking position
best_yield_farmsFind the best Demeter yield farms
my_farm_rewardsCheck pending farm rewards
protocol_healthGet overall protocol health report
spa_tokenomicsExplain SPA token economics
compare_yieldsCompare USDs yield to other options
rebase_calculatorCalculate potential rebase earnings
vespa_calculatorCalculate veSPA voting power

📖 How USDs Works

The Auto-Yield Mechanism

USDs is unique among stablecoins because it generates yield automatically:

  1. Deposit Collateral → User deposits USDC, USDT, DAI, or FRAX
  2. Mint USDs → Protocol mints USDs 1:1 (minus small fee)
  3. Deploy to Strategies → Collateral deployed to Aave, Compound, Stargate, Fluid
  4. Generate Yield → Strategies earn yield from lending/liquidity
  5. Collect & Distribute → Protocol collects yield daily
  6. Auto-Rebase → Your USDs balance increases automatically!

Yield Distribution

RecipientSharePurpose
USDs Holders70%Distributed via auto-rebase
SPA Buyback30%Buy and burn SPA tokens

Why It's Special

  • No claiming — Yield appears in your wallet automatically
  • No staking — Just hold USDs in any wallet
  • Composable — Use USDs in DeFi while earning yield
  • Fully backed — 100%+ collateralized by stablecoins
  • Transparent — All operations visible on-chain

🏗️ Protocol Architecture

┌─────────────────────────────────────────────────────────────────┐
│                         SPERAX PROTOCOL                         │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  ┌─────────────┐    ┌─────────────┐    ┌─────────────┐          │
│  │   USDs      │◄───│   Vault     │───►│  Strategies │          │
│  │ Stablecoin  │    │  (TVL Hub)  │    │ Aave/Comp/  │          │
│  │  ~5% APY    │    │             │    │  Stargate   │          │
│  └─────────────┘    └─────────────┘    └─────────────┘          │
│         ▲                  │                   │                │
│         │                  ▼                   ▼                │
│  ┌─────────────┐    ┌─────────────┐    ┌─────────────┐          │
│  │   Dripper   │◄───│Yield Reserve│◄───│   Oracles   │          │
│  │ (Daily Drip)│    │ (70%/30%)   │    │ (Chainlink) │          │
│  └─────────────┘    └─────────────┘    └─────────────┘          │
│         │                  │                                    │
│         ▼                  ▼                                    │
│  ┌─────────────┐    ┌─────────────┐                             │
│  │   Rebase    │    │ SPA Buyback │                             │
│  │  (70% →     │    │   (30% →    │                             │
│  │   Holders)  │    │    Burn)    │                             │
│  └─────────────┘    └─────────────┘                             │
│                                                                 │
├─────────────────────────────────────────────────────────────────┤
│                      GOVERNANCE LAYER                           │
├─────────────────────────────────────────────────────────────────┤
│  ┌─────────────┐    ┌─────────────┐    ┌─────────────┐          │
│  │    SPA      │───►│   veSPA     │───►│  Governance │          │
│  │   Token     │    │   (Locked)  │    │  (Snapshot) │          │
│  └─────────────┘    └─────────────┘    └─────────────┘          │
│         │                                                       │
│         ▼                                                       │
│  ┌─────────────┐    ┌─────────────┐                             │
│  │   xSPA      │───►│   Demeter   │                             │
│  │  (Rewards)  │    │   (Farms)   │                             │
│  └─────────────┘    └─────────────┘                             │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

📐 Key Protocol Formulas

veSPA Voting Power

veSPA = SPA × (lockDays / 365)
Lock Duration1000 SPA → veSPA
7 days19.2 veSPA
1 year1,000 veSPA
2 years2,000 veSPA
4 years4,000 veSPA

⚠️ Note: Voting power decays linearly as unlock time approaches. No early unlock!

xSPA Redemption

SPA_out = xSPA × (vestingDays + 150) / 330
Vesting PeriodSPA Received
15 days (min)50%
30 days54.5%
90 days72.7%
180 days (max)100%

USDs Rebase (Auto-Yield)

USDs uses a credit system for automatic yield distribution:

balance = credits / creditsPerToken

When yield is distributed:

  1. Protocol collects yield from strategies (Aave, Compound, Stargate, Fluid)
  2. 70% is distributed to USDs holders via rebase
  3. creditsPerToken decreases globally
  4. Your balance increases automatically!

No claiming required. Your wallet balance grows daily.

🔒 Security

FeatureDescription
Read-OnlyNo transaction execution—server only reads blockchain state
No Private KeysServer never handles or stores private keys
Rate LimitedBuilt-in RPC rate limiting prevents abuse
Validated InputsAll inputs validated with Zod schemas
Audited ContractsSperax contracts audited by leading firms

Security Considerations

  • This server provides read-only access to on-chain data
  • Transaction signing must happen through user's wallet
  • Always verify contract addresses before interacting
  • Use official RPC endpoints or trusted providers

⚙️ Environment Variables

VariableDescriptionDefault
ARBITRUM_RPC_URLArbitrum One RPC endpointhttps://arb1.arbitrum.io/rpc
LOG_LEVELLogging level (debug, info, warn, error)info
PORTHTTP server port (for HTTP mode)3000

🔗 Links

ResourceLink
🌐 Websitesperax.io
📖 Documentationdocs.sperax.io
🚀 Appapp.sperax.io
🐦 Twitter@SperaxUSD
💬 Discorddiscord.gg/sperax
📊 DeFiLlamadefillama.com/protocol/sperax
🔍 Arbiscan (USDs)arbiscan.io/token/0xD74f...5748
🗳️ Governancesnapshot.org/#/speraxdao.eth
🐙 GitHubgithub.com/sperax

📋 Contract Addresses (Arbitrum One)

Core Protocol

ContractAddress
USDs Token0xD74f5255D557944cf7Dd0E45FF521520002D5748
SPA Token0x5575552988A3A80504bBaeB1311674fCFd40aD4B
Vault0x6Bbc476Ee35CBA9e9c3A59fc5b10d7a0BC6f74Ca
Collateral Manager0xdA6B48BA29fE5F0f32eB52FBA21D26DACA04E5e7

Staking

ContractAddress
veSPA0x2e2071180682Ce6C247B1eF93d382D509F5F6A17
xSPA0x0966E72256d6055145902F72F9D3B6a194B9cCc3

Yield Distribution

ContractAddress
SPA Buyback0xFbc0d3cA777722d234FE01dba94DeDeDb277AFe3
Yield Reserve0x0CB89A7A6a9E0d9E06EE0c52De040db0e2B079E6
Dripper0xEaA79893D17d4c1b3e76c684e7A89B3D46a6fb03
Rebase Manager0xC21b3b55Db3cb0B6CA6F96c18E9534c96E1d4cfc

Oracles

ContractAddress
Master Price Oracle0x14D99412dAB1878dC01Fe7a1664cdE85896e8E50
Chainlink Oracle0xB9e5A70e1B1F3C99Db6Ed28f67d8d7d1248F8b3B
SPA Oracle0x5Fb534B4B07a0E417B449E264A8c7A6f9C5C2C69
USDs Oracle0x1C27c2a4aD63DE5F44f5a0e7a651e3FC7F3BBBe3

Demeter Protocol

ContractAddress
Farm Registry0x45bC6B44107837E7aBB21E2CaCbe7612Fce222e0
Rewarder Factory0x926477bAF60C25857419CC9Bf52E914881E1bDD3
Farm Deployer0x0d9EFD8f11c0a09DB8C2CCBfF4cC6c26Ad98b956

Yield Strategies

ContractAddress
Aave Strategy0x5E8422345238F34275888049021821E8E08CAa1f
Compound Strategy0x8c9532a60E0E7C6BbD2B2c1303F63aCE1c3e9811
Stargate Strategy0x6cD7bEF920f4C05aF3386A2c0070e1e26CD85c85
Fluid Strategy0xE0f51Ec5f35B0D7Ce31b26b8C15b9B9f3fF1f5C5

Supported Collaterals

TokenAddressDecimals
USDC (Native)0xaf88d065e77c8cC2239327C5EDb3A432268e58316
USDC.e (Bridged)0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC86
USDT0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb96
DAI0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da118
FRAX0x17FC002b466eEc40DaE837Fc4bE5c67993ddBd6F18

📊 Server Capabilities

CapabilityCountDescription
Tools57Comprehensive protocol interaction capabilities across 9 categories
Resources11Complete documentation and contract references
Prompts19Pre-built conversation starters for common tasks

✨ Features

CategoryDescription
🪙 USDs StablecoinQuery balances, yields, rebase mechanics, mint/redeem simulations
Auto-Yield~5% APY distributed automatically via daily rebase
🗳️ veSPA GovernanceVote-escrowed staking with 7-day to 4-year locks
🌾 Demeter FarmsDiscover and analyze yield farming opportunities
🏛️ Vault SystemCollateral management and yield strategies
🔮 Oracle IntegrationChainlink price feeds and monitoring
📈 Yield ReserveProtocol yield collection and distribution

🤝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.


Built with ❤️ by the Sperax Team

Empowering Autonomous Finance on Arbitrum and BNB Chain

Reviews

No reviews yet

Sign in to write a review