๐Ÿ“– Introduction
For AI Agents

MCP โ€” Flash Loans for AI Agents

The VAEA MCP Server gives AI agents (Claude, Cursor, ElizaOS, GPT) direct access to flash loan liquidity on Solana. Discover pools, simulate strategies, and build atomic transactions โ€” all through the standard Model Context Protocol.

โ„น๏ธ Note
This documentation is for AI agent developers who want to give their agents access to flash loan capital. If you're writing bot code directly, see the SDK documentation. If you're building a Solana protocol, see CTX.

What is VAEA MCP

An MCP server is a standard interface that lets AI agents call tools, read resources, and use prompts. VAEA's MCP server exposes flash loan operations as tools that any MCP-compatible AI agent can invoke.

The agent doesn't need to understand Solana transactions, PDAs, or lending protocols. It calls vaea_get_capacity to discover available liquidity, vaea_find_best_route to plan its strategy, and vaea_build_flash_loan to get a ready-to-sign transaction.

How It Works

// Agent flow โ€” 4 steps to a flash loan
1. Agent calls vaea_get_capacity("SOL")
โ†’ "245,000 SOL available across 3 protocols"
2. Agent calls vaea_find_best_route("SOL", 1000)
โ†’ "Best: Marginfi, 2.1 bps total, 0.95 confidence"
3. Agent calls vaea_build_flash_loan("SOL", 1000, user_pubkey)
โ†’ Serialized TX with begin_flash + end_flash
4. Agent asks user to sign and send the transaction
โ†’ Agent inserts its arb/liquidation logic between borrow and repay
๐Ÿ’ก Tip
Zero private keys. The MCP server never handles private keys. It builds unsigned transactions that the agent asks the user (or a separate signing service) to sign. This is by design โ€” the agent constructs, the user approves.

Tools Overview

The MCP server exposes 8 tools, 6 resources, and 3 prompts.

ToolCategoryWhat It Does
vaea_get_capacity๐Ÿ‘๏ธ EyesAvailable liquidity per token across all protocols
vaea_get_quote๐Ÿ‘๏ธ EyesFee breakdown for a specific borrow
vaea_find_best_route๐Ÿ‘๏ธ EyesBest protocol + confidence score
vaea_check_profitability๐Ÿ‘๏ธ EyesNet profit after all costs
vaea_get_protocol_status๐Ÿ‘๏ธ EyesProtocol health (active/paused)
vaea_get_liquidity_matrix๐Ÿ‘๏ธ EyesFull token ร— protocol breakdown
vaea_build_flash_loan๐Ÿคฒ HandsBuild unsigned flash loan TX
vaea_build_sandwich๐Ÿคฒ HandsBuild multi-token sandwich TX

Security Model

No private keys
MCP server never touches keys. TX is unsigned.
Read-only discovery
6 of 8 tools are read-only (Eyes). No state mutation.
User signs
Agent builds TX, user reviews & signs via wallet.
Atomic
If repay fails, entire TX reverts. Zero partial execution.

Packages

PackageLanguageInstall
@vaea/mcp-serverTypeScriptnpx @vaea/mcp-server
vaea-mcp (binary)Rustcargo install vaea-mcp

Both implementations expose the exact same 8 tools, 6 resources, and 3 prompts. Use TypeScript for quick setup, Rust for performance-critical deployments.

โš ๏ธ Devnet Only
Mainnet โ€” April 2026
๐Ÿ”