AI Trading

Trade on Lavarage using AI assistants like Claude, ChatGPT, or Cursor. The Lavarage MCP (Model Context Protocol) server gives your AI agent direct access to open positions, manage risk, check markets, and execute trades — all through natural language.


What You Can Do

Talk to your AI assistant the way you would talk to a trading desk:

  • "Open a 3x long on SOL with 1 SOL margin"
  • "Show me my open positions"
  • "Set a stop loss at $140 on my SOL position"
  • "Sell 50% of my BTC position"
  • "What are the current lending rates for SOL?"

Your AI agent handles the execution — building transactions, finding the best loan offers, and managing the full position lifecycle.

Available Tools

The MCP server provides 20 trading tools:

CategoryWhat You Can Do
TradeOpen and close leveraged positions (long or short)
QuotesPreview trades and closing PnL before committing
Risk ManagementSet and cancel Take-Profit and Stop-Loss orders
Position ManagementSplit, merge, partial sell, partial repay
Market DataBrowse tokens, check lending rates and available liquidity
AccountView trade history and authentication status

Setup

Hosted Mode (Recommended)

The fastest way to start. Lavarage handles wallet creation and signing via email authentication.

Add this to your AI assistant's MCP configuration:

{
  "mcpServers": {
    "lavarage": {
      "url": "https://mcp.lavarage.xyz/mcp"
    }
  }
}

OAuth handles authentication automatically — no API keys to manage.

Local Mode (Self-Custody)

Run the MCP server locally with your own Solana keypair for full self-custody.

npm install -g @lavarage/trader-mcp

Set your keypair path:

export LAVARAGE_KEYPAIR_PATH=/path/to/your/keypair.json

Then add the local server to your MCP configuration.


Compatible AI Assistants

Any AI assistant that supports MCP can connect to Lavarage, including:

  • Claude (Anthropic) — via Claude Desktop or Claude Code
  • ChatGPT (OpenAI) — via MCP-compatible plugins
  • Cursor — built-in MCP support
  • Any MCP-compatible agent — the protocol is open

Learn More

Visit mcp.lavarage.xyz for the full tool reference, setup guides, and live status.


Back to basics? Start with What is Lavarage? to understand the protocol.