npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

graph-lending-mcp

v1.0.1

Published

MCP server exposing unified tools over Messari standardized lending subgraphs

Readme

graph-lending-mcp

MCP server that exposes unified AI-friendly tools over Messari's standardized lending subgraphs on The Graph.

One natural-language query → fan out across 40+ lending protocols on multiple chains → get back structured, comparable data.

Features

  • 19 MCP tools covering protocols, markets, rates, positions, events, snapshots, and cross-protocol analytics
  • 40+ lending protocols across Ethereum, Polygon, Arbitrum, Avalanche, BSC, Optimism, Base, and more
  • Cross-protocol comparison — compare TVL, revenue, users across any set of protocols in one call
  • Graceful failure handling — dead subgraphs don't crash queries; failures are reported alongside successes
  • Schema-version aware — automatically selects compatible queries for v1.x, v2.x, and v3.x subgraphs

Tools

| Tool | Description | |------|-------------| | list_protocols | List all registered protocols with live TVL data | | get_protocol | Detailed protocol stats (TVL, revenue, users, pool counts) | | get_markets | List markets for a protocol, sorted by any field | | get_market | Detailed single market data including rates, caps, and positions | | get_interest_rates | Interest rates across all markets, with optional side/type filters | | get_account | Account overview with position counts and activity | | get_positions | Open positions for an address, with optional side filter | | get_deposits | Recent deposit events, filterable by market and account | | get_borrows | Recent borrow events | | get_repays | Recent repay events | | get_withdrawals | Recent withdrawal events | | get_liquidations | Recent liquidation events with profit data | | get_flashloans | Recent flashloan events | | get_daily_financials | Daily financial snapshots (TVL, volume, revenue) | | get_market_snapshots | Daily market-level snapshots with rates and activity | | get_usage_metrics | Daily user activity and transaction counts | | compare_protocols | Side-by-side comparison of multiple protocols | | top_markets_by_tvl | Top markets across all protocols, optionally filtered by network | | query_subgraph | Raw GraphQL escape hatch for any registered subgraph |

Setup

Prerequisites

Install & Build

git clone https://github.com/PaulieB14/graph-lending-mcp.git
cd graph-lending-mcp
npm install
npx tsc

Configure in Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "graph-lending": {
      "command": "node",
      "args": ["/path/to/graph-lending-mcp/dist/index.js"],
      "env": {
        "GRAPH_API_KEY": "your-api-key-here"
      }
    }
  }
}

Architecture

src/
├── index.ts          # MCP server entry — registers all 19 tools
├── registry.ts       # Protocol → subgraph ID mapping (see SUBGRAPHS.md)
├── client.ts         # GraphQL fetch with retry, timeout, fan-out
├── queries.ts        # All GraphQL query constants
└── tools/
    ├── protocol.ts   # list_protocols, get_protocol
    ├── markets.ts    # get_markets, get_market
    ├── rates.ts      # get_interest_rates
    ├── positions.ts  # get_account, get_positions
    ├── events.ts     # deposits, borrows, repays, withdrawals, liquidations, flashloans
    ├── snapshots.ts  # daily_financials, market_snapshots, usage_metrics
    └── cross.ts      # compare_protocols, top_markets_by_tvl

All queries use Messari's standardized lending schema — same entities and fields across every protocol.

Subgraph Registry

See SUBGRAPHS.md for the full list of registered subgraphs with their status, network, schema version, and notes.

License

MIT