Skip to main content
Glama
PaulieB14

graph-lending-mcp

graph-lending-mcp

The Graph上のMessariの標準化されたレンディングサブグラフを介して、AIフレンドリーな統合ツールを提供するMCPサーバーです。

1つの自然言語クエリで、15チェーン上の40以上のレンディングプロトコルに展開し、構造化された比較可能なデータを取得します。

特徴

  • 19種類のMCPツール: プロトコル、市場、レート、ポジション、イベント、スナップショット、クロスプロトコル分析をカバー

  • 90種類のサブグラフデプロイメント: 15チェーン(Ethereum、Polygon、Arbitrum、Avalanche、BSC、Optimism、Base、Scroll、Fantom、Gnosis、Moonbeamなど)上の40以上のレンディングプロトコルに対応

  • クロスプロトコル比較: 1回の呼び出しで、任意のプロトコルセット間でTVL、収益、ユーザー数を比較可能

  • 正常なエラー処理: サブグラフが停止していてもクエリはクラッシュせず、成功した結果とともにエラーが報告されます

  • スキーマバージョン対応: v1.x、v2.x、v3.xのサブグラフに対して互換性のあるクエリを自動的に選択

Related MCP server: graph-polymarket-mcp

ツール

ツール

説明

list_protocols

ライブTVLデータを含む登録済みプロトコルの一覧を表示

get_protocol

プロトコルの詳細統計(TVL、収益、ユーザー数、プール数)

get_markets

任意のフィールドでソートされたプロトコルの市場一覧を表示

get_market

レート、キャップ、ポジションを含む単一市場の詳細データ

get_interest_rates

すべての市場の金利(サイド/タイプフィルターオプション付き)

get_account

ポジション数とアクティビティを含むアカウントの概要

get_positions

アドレスのオープンポジション(サイドフィルターオプション付き)

get_deposits

最近の預け入れイベント(市場およびアカウントでフィルタリング可能)

get_borrows

最近の借り入れイベント

get_repays

最近の返済イベント

get_withdrawals

最近の引き出しイベント

get_liquidations

利益データを含む最近の清算イベント

get_flashloans

最近のフラッシュローンイベント

get_daily_financials

日次財務スナップショット(TVL、ボリューム、収益)

get_market_snapshots

レートとアクティビティを含む日次市場レベルのスナップショット

get_usage_metrics

日次のユーザーアクティビティとトランザクション数

compare_protocols

複数のプロトコルの並列比較

top_markets_by_tvl

すべてのプロトコルにおけるトップ市場(ネットワークでフィルタリング可能)

query_subgraph

登録済みサブグラフ用の生のGraphQLエスケープハッチ

セットアップ

前提条件

クイックスタート (npm)

{
  "mcpServers": {
    "graph-lending": {
      "command": "npx",
      "args": ["graph-lending-mcp"],
      "env": {
        "GRAPH_API_KEY": "your-api-key-here"
      }
    }
  }
}

ソースからインストール

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

次に、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"
      }
    }
  }
}

アーキテクチャ

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

すべてのクエリはMessariの標準化されたレンディングスキーマを使用しており、すべてのプロトコルで同じエンティティとフィールドが使用されます。

サブグラフ・レジストリ

登録されている90のサブグラフデプロイメントのステータス、ネットワーク、スキーマバージョン、メモなどの全リストについては、SUBGRAPHS.mdを参照してください。

ライセンス

MIT

Install Server
A
security – no known vulnerabilities
A
license - permissive license
-
quality - not tested

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