graph-lending-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| GRAPH_API_KEY | Yes | Your Graph API key from The Graph Studio (https://thegraph.com/studio/apikeys/) |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_protocolsA | 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_protocolA | Detailed stats for a single lending protocol: TVL, deposits, borrows, revenue, user counts, transaction counts, pool counts, position counts. |
| get_marketsA | List markets (lending pools) for a protocol, ordered by TVL or borrows. Returns token, rates, caps, LTV thresholds, and reward info. |
| get_marketA | 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_ratesA | Current supply and borrow APRs across all markets in a protocol. Optionally filter by side (LENDER/BORROWER) or rate type (VARIABLE/STABLE/FIXED). |
| get_accountA | Account summary for a wallet address: open/closed position counts, deposit/borrow/liquidation activity, and list of current open positions. |
| get_positionsA | Open positions for a wallet address with balances, market prices, and activity counts. Optionally filter by side. |
| get_depositsA | Recent deposit events. Optionally filter by market ID and/or account address. |
| get_borrowsB | Recent borrow events. Optionally filter by market ID and/or account address. |
| get_repaysA | Recent repay events. Optionally filter by market ID and/or account address. |
| get_withdrawalsA | Recent withdrawal events. Optionally filter by market ID and/or account address. |
| get_liquidationsA | Recent liquidation events with liquidator, liquidatee, collateral asset, and profit amounts. Optionally filter by market. |
| get_flashloansA | Recent flashloan events including fee amounts. Only available for v3+ schema protocols (e.g. aave-v3, compound-v3, spark-lend). |
| get_daily_financialsA | Protocol-level daily snapshots: TVL, deposit/borrow/liquidation volume, and revenue breakdown (supply-side vs protocol-side). Returns last N days. |
| get_market_snapshotsA | Daily snapshots for a specific market: token price, TVL, volume, revenue, rates history, and active user counts. |
| get_usage_metricsB | Daily active user counts and transaction activity breakdown (deposits, borrows, repays, liquidations) for a protocol. |
| compare_protocolsA | Compare multiple protocols side-by-side: TVL, deposits, borrows, revenue, users, pools. Sorted by TVL. Tolerates individual endpoint failures. |
| top_markets_by_tvlA | Global top N markets by TVL across ALL registered lending protocols. Fans out to every endpoint. Optionally filter by network. |
| query_subgraphA | 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
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 19 tools
Each tool has a clearly distinct purpose, targeting specific entities (protocols, markets, events, accounts) or actions (list, get, compare, query). There is no ambiguity; even similar-sounding tools like get_market and get_markets are differentiated by singular vs plural and depth of data.
All tools follow a consistent verb_noun pattern using snake_case (e.g., get_markets, list_protocols, query_subgraph). Minor deviations like compare_protocols and top_markets_by_tvl still adhere to the same pattern, ensuring predictability.
19 tools is on the higher end but appropriate for the comprehensive scope of lending protocol data. Each tool covers a specific aspect (protocols, markets, events, analytics) without redundancy, justifying the count.
The tool set provides full coverage for a read-only lending data API: protocol listing and details, market analysis, event history (deposits, borrows, etc.), account positions, aggregated financials, usage metrics, interest rates, comparisons, and raw GraphQL access. No obvious gaps for the intended domain.