DEV Community

Cover image for Solana DeFi from Claude Desktop: Jupiter, Drift, and Jito MCP Tools
Wallet Guy
Wallet Guy

Posted on

Solana DeFi from Claude Desktop: Jupiter, Drift, and Jito MCP Tools

Solana DeFi from Claude Desktop has never been easier — with WAIaaS's MCP tools, your Claude agent can swap tokens on Jupiter, trade perpetuals on Drift, and stake SOL on Jito directly from the chat interface. Instead of building complex wallet integrations, you add one JSON block to your Claude config and instantly get 45 blockchain tools. No API wrangling, no transaction complexity — just natural language commands that execute real DeFi operations.

Why This Changes Everything for AI Agents

Most AI agents can read the blockchain but can't act on it. They can analyze DeFi protocols, research yield opportunities, and recommend strategies — but when it's time to execute, they hit a wall. The agent knows you should swap SOL for USDC before the market moves, but it can't do it. It identifies a 12% APY staking opportunity, but can't stake your tokens.

WAIaaS bridges this gap through Claude's Model Context Protocol (MCP), giving your agent a fully functional wallet with built-in DeFi integrations. Your agent doesn't just analyze — it executes, with proper security controls and human oversight.

From Analysis to Action: MCP-Powered DeFi

WAIaaS provides 45 MCP tools for wallet operations, with dedicated integrations for 15 DeFi protocols including Jupiter (swaps), Drift (perpetuals), Jito (liquid staking), Lido (ETH staking), and Kamino (lending). These aren't wrapped APIs — they're purpose-built tools designed for AI agent use.

Here's your complete Claude Desktop configuration:

{
  "mcpServers": {
    "waiaas": {
      "command": "npx",
      "args": ["-y", "@waiaas/mcp"],
      "env": {
        "WAIAAS_BASE_URL": "http://127.0.0.1:3100",
        "WAIAAS_SESSION_TOKEN": "wai_sess_<your-token>",
        "WAIAAS_DATA_DIR": "~/.waiaas"
      }
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Once configured, your Claude agent gains access to the complete DeFi toolkit. Here's what becomes possible:

Jupiter Integration: "Swap 0.5 SOL for USDC with 1% slippage protection" executes a real Jupiter swap with optimal routing and MEV protection.

Drift Protocol: "Open a 2x long SOL-PERP position with $100" creates an actual perpetual futures position on Drift with proper risk management.

Jito Liquid Staking: "Stake 1 SOL and show me the current APY" stakes your SOL through Jito and returns JitoSOL, maintaining liquidity while earning staking rewards.

The agent handles transaction construction, gas estimation, slippage protection, and execution — all through natural language commands.

Security-First DeFi Operations

WAIaaS implements a 4-tier security model that escalates based on transaction risk. For DeFi operations, this means:

  • INSTANT ($0-10): Small swaps and balance checks execute immediately
  • NOTIFY ($10-100): Medium trades execute with notifications
  • DELAY ($100-1000): Large positions wait 5-15 minutes (cancellable)
  • APPROVAL ($1000+): Major moves require explicit human approval

DeFi-specific policies add another layer of protection:

curl -X POST http://localhost:3100/v1/policies \
  -H 'Content-Type: application/json' \
  -H 'X-Master-Password: <password>' \
  -d '{
    "walletId": "<wallet-uuid>",
    "type": "PERP_MAX_LEVERAGE",
    "rules": {
      "maxLeverage": 3.0,
      "allowedMarkets": ["SOL-PERP", "BTC-PERP"]
    }
  }'
Enter fullscreen mode Exit fullscreen mode

This policy prevents your agent from opening risky 20x leverage positions or trading unfamiliar markets, while still allowing sophisticated strategies within your risk parameters.

Real-World DeFi Workflows

Yield Farming Strategy: Your agent can analyze Kamino's lending pools, calculate optimal capital allocation, and execute the complete strategy — depositing USDC, borrowing SOL, swapping to more USDC, and redepositing for leveraged yield.

Arbitrage Detection: The agent monitors Jupiter prices across DEXs, identifies arbitrage opportunities, and executes the trades when spreads exceed your profitability threshold.

Portfolio Rebalancing: Based on market analysis, your agent can automatically rebalance your portfolio — selling outperforming assets, buying underweight positions, and maintaining your target allocation.

The agent executes these strategies through the same MCP tools you'd use for simple swaps, but orchestrates complex multi-step operations with proper error handling and rollback capabilities.

Cross-Chain DeFi Operations

WAIaaS supports both Solana and EVM chains, enabling cross-chain DeFi strategies. Your agent can:

  • Bridge assets from Ethereum to Solana via LI.FI integration
  • Stake ETH on Ethereum through Lido while managing SOL positions on Solana
  • Compare yield opportunities across chains and execute optimal capital allocation

The same MCP interface works across all supported networks — 2 chain types with 18 networks total. Your agent doesn't need chain-specific knowledge; it just specifies the target network and WAIaaS handles the underlying differences.

Getting Started with DeFi MCP

Step 1: Install and start WAIaaS

npm install -g @waiaas/cli
waiaas init
waiaas start
waiaas quickset --mode mainnet
Enter fullscreen mode Exit fullscreen mode

Step 2: Auto-configure Claude Desktop

waiaas mcp setup --all
Enter fullscreen mode Exit fullscreen mode

Step 3: Create DeFi-specific policies

waiaas quickstart  # Creates sensible default policies
Enter fullscreen mode Exit fullscreen mode

Step 4: Test with a simple command
Open Claude Desktop and try: "Check my wallet balance and show me available DeFi protocols"

Step 5: Execute your first DeFi operation
"Swap $10 worth of SOL for USDC on Jupiter with minimal slippage"

Your agent now has a complete DeFi toolkit. It can read positions across protocols with get_defi_positions, execute swaps with jupiter-swap, manage lending positions through kamino, and handle complex multi-protocol strategies.

The MCP integration transforms Claude from a DeFi analyst into a DeFi executor — one that can act on its insights with proper security controls and human oversight when needed.

Related Posts:

What's Next

Start with simple operations like balance checks and small swaps, then gradually explore more sophisticated DeFi strategies as you become comfortable with the security model. The 45 MCP tools provide building blocks for any DeFi operation you can imagine — from simple yield farming to complex arbitrage strategies.

Ready to give your Claude agent onchain superpowers? Get started at GitHub or learn more at waiaas.ai.

Top comments (0)