graph-aave-mcp

v1.0.0
io.github.PaulieB14/graph-aave-mcp Checked 1 day ago Published 9 months ago

AAVE V2/V3 lending & governance MCP — 7 chains via The Graph subgraphs

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

list_aave_chains

Use this when the user asks which AAVE chains are supported, wants to pick a network, or needs to discover available AAVE deployments. Returns all supported chains with their subgraph IDs, protocol version (V2/V3), chain name, 30-day query volume, and key entities. Chains: Ethereum, Base, Arbitrum, Polygon, Optimism, Avalanche, Fantom (V3 + V2 legacy), plus AAVE Governance V3. Always call this first if chain is ambiguous.

get_aave_reserves

Use this when the user asks about AAVE lending markets, available assets, supply APY, borrow APY, TVL, utilization rate, collateral factors, or liquidation thresholds on a specific chain. Returns all active reserves sorted by total liquidity (TVL). RATE CONVERSION: liquidityRate and variableBorrowRate are in RAY units (1e27). Supply APY % = liquidityRate / 1e27 * 100. Borrow APY % = variableBorrowRate / 1e27 * 100. Amounts are in native token units — divide by 10^decimals for human-readable. Ideal for: 'What assets can I lend on Arbitrum?', 'What is USDC supply rate on Base?', 'Show me all A…

ParameterTypeDescription
chain *stringChain identifier (e.g. ethereum, base, arbitrum, polygon, optimism, avalanche). Use list_aave_chains to see all options.
includeInactivebooleanSet true to include frozen, paused, or inactive reserves. Default false (active only).

get_aave_reserve

Use this when the user asks about a specific AAVE asset in detail — e.g. 'Tell me everything about USDC on Ethereum AAVE', 'What are the WETH borrow parameters?', 'What is the liquidation threshold for WBTC collateral?'. Returns full reserve config: current rates, TVL, LTV, liquidation parameters, lifetime stats (total borrows/repayments/liquidations), and token addresses. RATE CONVERSION: divide liquidityRate / variableBorrowRate by 1e27 * 100 for APY %.

ParameterTypeDescription
chain *stringChain identifier
symbol *stringToken symbol — case-insensitive (e.g. USDC, WETH, WBTC, DAI, USDT, LINK, AAVE)

get_aave_user_position

Use this when the user asks about a wallet's AAVE position — 'What is my health factor?', 'What have I supplied to AAVE?', 'How much have I borrowed?', 'Am I at risk of liquidation?', 'Show me my collateral and debt on Arbitrum'. Returns all supplied assets (with aToken balances), all borrowed assets (variable + stable debt), collateral flags, and e-mode category. Health Factor ≈ sum(collateral_i * price_i * liqThreshold_i) / sum(debt_i * price_i). HF < 1.0 = liquidatable. Amounts in native token units — divide by 10^decimals.

ParameterTypeDescription
chain *stringChain identifier
userAddress *stringEthereum wallet address of the user (0x..., lowercase). Returns empty arrays if address has no AAVE positions.

simulate_health_factor

Use this when the user wants to simulate how a price change affects their AAVE health factor — 'What happens to my health factor if ETH drops 20%?', 'How much can WBTC fall before I get liquidated?', 'Simulate a 30% drop in my collateral asset'. Fetches the user's full position, computes current health factor, then recalculates it after applying the specified price change to the target asset. Health Factor < 1.0 means the position is liquidatable.

ParameterTypeDescription
assetSymbol *stringSymbol of the asset whose price changes (e.g. WETH, WBTC, USDC)
chain *stringChain identifier
priceChangePct *numberPrice change percentage — negative for drops, positive for gains. E.g. -20 means the asset price falls 20%.
userAddress *stringWallet address of the user (0x...)

get_recent_borrows

Use this when the user asks about recent borrowing activity on AAVE — 'Who has been borrowing USDC on Ethereum?', 'Show me recent WETH borrows on Arbitrum', 'What has address 0x... borrowed recently?', 'Show borrow volume by asset'. Returns borrow events with: borrower address, asset, raw amount, borrow rate, rate mode (variable=2/stable=1), and timestamp. Divide amount by 10^decimals for human-readable value.

ParameterTypeDescription
chain *stringChain identifier
firstnumberNumber of borrow events to return (1–100, default 20)
reserveSymbolstringOptional: filter by asset symbol (e.g. USDC, WETH, DAI)
userAddressstringOptional: filter by borrower Ethereum address (0x...)

get_recent_supplies

Use this when the user asks about recent deposit/supply activity on AAVE — 'Who has been supplying ETH on Base?', 'Show me recent USDC deposits on Polygon', 'What has address 0x... deposited recently?'. V3 chains use the 'supply' entity; V2 chains use 'deposit' — handled automatically. Returns: supplier address, asset symbol, raw amount, and timestamp. Divide amount by 10^decimals for human-readable value.

ParameterTypeDescription
chain *stringChain identifier
firstnumberNumber of supply events to return (1–100, default 20)
reserveSymbolstringOptional: filter by asset symbol (e.g. USDC, WETH, WBTC)
userAddressstringOptional: filter by supplier address (0x...)

get_aave_liquidations

Use this when the user asks about AAVE liquidation events — 'Show me recent liquidations on Ethereum', 'Has address 0x... been liquidated?', 'Who are the top liquidators on Arbitrum?', 'What collateral is being seized most?'. Returns: liquidator address, liquidated user, collateral asset seized, debt asset repaid, amounts, and timestamp. Liquidations occur when a user's health factor drops below 1.0.

ParameterTypeDescription
chain *stringChain identifier
firstnumberNumber of liquidation events to return (1–100, default 20)
liquidatorstringOptional: filter by liquidator address
userAddressstringOptional: filter by the address that was liquidated

get_aave_flash_loans

Use this when the user asks about AAVE flash loans — 'Show me recent flash loans on Ethereum', 'What assets are flash-loaned most?', 'How much in flash loan fees has AAVE earned?'. Returns: initiator address, asset borrowed, amount, fee paid (totalFee), and timestamp. Flash loans must be borrowed and repaid within a single transaction.

ParameterTypeDescription
chain *stringChain identifier
firstnumberNumber of flash loan events to return (1–100, default 20)

get_reserve_rate_history

Use this when the user asks about historical AAVE rates or TVL trends — 'How has USDC supply rate changed over time?', 'Show me ETH borrow rate history on Polygon', 'What was the utilization rate last week?'. Returns timestamped snapshots of: liquidityRate, variableBorrowRate, stableBorrowRate, utilizationRate, availableLiquidity, totalLiquidity, totalCurrentVariableDebt. Rates are in RAY units (divide by 1e27 * 100 for APY %). Get the reserve ID from get_aave_reserves (the 'id' field = underlyingAsset + poolAddress).

ParameterTypeDescription
chain *stringChain identifier
reserveId *stringReserve ID — from get_aave_reserves 'id' field (concatenation of underlyingAsset address + pool address, lowercase)
firstnumberNumber of historical snapshots to return (default 30)

get_governance_proposals

Use this when the user asks about AAVE governance — 'Show me recent AAVE governance proposals', 'What proposals are currently active?', 'What is the status of AAVE proposal #X?', 'Show me governance voting activity'. Queries the AAVE Governance V3 subgraph on Ethereum. Returns: proposal ID, creator, access level (1=short executor/2=long executor), current state, voting duration (seconds), for/against votes, title, and payload info. Proposal states: Created=0, Active=1, Queued=2, Executed=3, Failed=4, Cancelled=5, Expired=6.

ParameterTypeDescription
firstnumberNumber of proposals to return (1–50, default 10)
statenumberOptional: filter by state number. 0=Created, 1=Active, 2=Queued, 3=Executed, 4=Failed, 5=Cancelled, 6=Expired

get_proposal_votes

Use this when the user asks about votes on a specific AAVE governance proposal — 'Who voted on proposal #X?', 'Show me the voting breakdown for this proposal', 'Which addresses voted against?'. Returns individual votes with: voter address, voting power, support (true=for/false=against), and timestamp.

ParameterTypeDescription
proposalId *stringAAVE governance proposal ID (numeric string, e.g. '185')
firstnumberNumber of votes to return (default 50)

query_aave_subgraph

Use this when a pre-built tool doesn't cover the user's need — execute a raw GraphQL query against any AAVE chain's subgraph. Use get_aave_schema first to explore available entities and fields. Lending schema entities: reserves, userReserves, borrows, supplies (V3) / deposits (V2), repays, liquidationCalls, flashLoans, pool, protocol, reserveParamsHistoryItems. Governance schema entities: proposals, proposalVotes_collection, payloads, votingPortals, votingConfigs, proposalMetadata_collection.

ParameterTypeDescription
chain *stringChain identifier (includes 'governance')
query *stringGraphQL query string
variablesobjectOptional GraphQL variables

get_aave_schema

Use this to introspect the full GraphQL schema for any AAVE chain's subgraph. Returns all queryable root fields and their types. Useful before writing a custom query_aave_subgraph call, or to understand what data is available on a specific chain/version.

ParameterTypeDescription
chain *stringChain identifier (includes 'governance')