Trade leveraged positions on Solana via your AI agent

Server online at https://mcp.lavarage.xyz

Quick Install

Open your AI coding agent and paste one of these. The agent does the rest.

Hosted Mode Recommended

We handle wallet creation and signing. Just log in with email.

Install Lavarage MCP: add a "lavarage" MCP server to the project MCP config. The server URL is https://mcp.lavarage.xyz/mcp (Streamable HTTP transport). The OAuth flow will handle authentication when I use any trading tool. Copy

Local Mode Self-custody

Run on your machine with your own Solana keypair. Full control.

Install Lavarage MCP: run `npm install -g @lavarage/trader-mcp` then add a "lavarage" MCP server to the project MCP config with command "lavarage-trader-mcp-local" and env var LAVARAGE_KEYPAIR_PATH set to my Solana keypair file path (ask me where mine is). The API key and URL are built in — no configuration needed. Copy

Manual Config

If you prefer to edit the config files directly:

Hosted — Streamable HTTP

// Server URL (Streamable HTTP transport with OAuth):
https://mcp.lavarage.xyz/mcp

// Example .mcp.json (adapt for your MCP client):
{
  "mcpServers": {
    "lavarage": {
      "url": "https://mcp.lavarage.xyz/mcp"
    }
  }
}

Local — MCP config

{
  "mcpServers": {
    "lavarage": {
      "command": "lavarage-trader-mcp-local",
      "env": {
        "LAVARAGE_KEYPAIR_PATH": "~/.config/solana/id.json"
      }
    }
  }
}

API key and URL are built in. Just set your keypair path.

20 Trading Tools

ToolDescription
lavarage_loginCheck auth status
lavarage_setupConfigure trading mode
lavarage_list_tokensBrowse supported tokens
lavarage_get_ratesLending rates and liquidity
lavarage_get_quotePreview a leverage trade
lavarage_open_positionOpen a leveraged position
lavarage_close_positionClose a position
lavarage_close_quotePreview close PnL
lavarage_list_positionsView your open positions
lavarage_get_positionPosition details
lavarage_trade_historyPast trades and events
lavarage_set_tp_slSet take-profit or stop-loss
lavarage_get_ordersView active TP/SL orders
lavarage_cancel_orderCancel an order
lavarage_partial_sellTake partial profit
lavarage_repayRepay a borrow position
lavarage_partial_repayPartially repay a borrow
lavarage_split_positionSplit into two positions
lavarage_merge_positionsMerge two positions

Example Prompts

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