Skip to main content
Glama
PaulieB14

graph-lending-mcp

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
GRAPH_API_KEYYesYour Graph API key from The Graph Studio (https://thegraph.com/studio/apikeys/)

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_protocols

List all supported lending protocols with live TVL, deposit/borrow totals, pool counts, and user counts. Fans out to all registered subgraph endpoints. Optionally filter by network or schema version.

get_protocol

Detailed stats for a single lending protocol: TVL, deposits, borrows, revenue, user counts, transaction counts, pool counts, position counts.

get_markets

List markets (lending pools) for a protocol, ordered by TVL or borrows. Returns token, rates, caps, LTV thresholds, and reward info.

get_market

Deep-dive on a single market by its on-chain contract address. Returns balances, cumulative stats, position counts, risk parameters, rates, and rewards. Get market IDs from get_markets first.

get_interest_rates

Current supply and borrow APRs across all markets in a protocol. Optionally filter by side (LENDER/BORROWER) or rate type (VARIABLE/STABLE/FIXED).

get_account

Account summary for a wallet address: open/closed position counts, deposit/borrow/liquidation activity, and list of current open positions.

get_positions

Open positions for a wallet address with balances, market prices, and activity counts. Optionally filter by side.

get_deposits

Recent deposit events. Optionally filter by market ID and/or account address.

get_borrows

Recent borrow events. Optionally filter by market ID and/or account address.

get_repays

Recent repay events. Optionally filter by market ID and/or account address.

get_withdrawals

Recent withdrawal events. Optionally filter by market ID and/or account address.

get_liquidations

Recent liquidation events with liquidator, liquidatee, collateral asset, and profit amounts. Optionally filter by market.

get_flashloans

Recent flashloan events including fee amounts. Only available for v3+ schema protocols (e.g. aave-v3, compound-v3, spark-lend).

get_daily_financials

Protocol-level daily snapshots: TVL, deposit/borrow/liquidation volume, and revenue breakdown (supply-side vs protocol-side). Returns last N days.

get_market_snapshots

Daily snapshots for a specific market: token price, TVL, volume, revenue, rates history, and active user counts.

get_usage_metrics

Daily active user counts and transaction activity breakdown (deposits, borrows, repays, liquidations) for a protocol.

compare_protocols

Compare multiple protocols side-by-side: TVL, deposits, borrows, revenue, users, pools. Sorted by TVL. Tolerates individual endpoint failures.

top_markets_by_tvl

Global top N markets by TVL across ALL registered lending protocols. Fans out to every endpoint. Optionally filter by network.

query_subgraph

Execute a raw GraphQL query against any registered lending subgraph. Use for custom filters, uncommon fields, or exploratory queries. All subgraphs use the Messari standardized lending schema with entities: lendingProtocols, markets, accounts, positions, deposits, borrows, repays, withdraws, liquidates, flashloans, financialsDailySnapshots, marketDailySnapshots, usageMetricsDailySnapshots.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/PaulieB14/graph-lending-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server