Skip to main content
Glama
PaulieB14

graph-lending-mcp

graph-lending-mcp

The GraphMessari 표준화 대출 서브그래프를 통해 AI 친화적인 통합 도구를 제공하는 MCP 서버입니다.

자연어 쿼리 하나로 15개 체인에 걸쳐 40개 이상의 대출 프로토콜에 분산 요청을 보내고, 구조화된 비교 가능한 데이터를 반환받습니다.

기능

  • 19개의 MCP 도구: 프로토콜, 시장, 이자율, 포지션, 이벤트, 스냅샷 및 프로토콜 간 분석 지원

  • 90개의 서브그래프 배포: 15개 체인(Ethereum, Polygon, Arbitrum, Avalanche, BSC, Optimism, Base, Scroll, Fantom, Gnosis, Moonbeam 등)의 40개 이상 대출 프로토콜 지원

  • 프로토콜 간 비교: 한 번의 호출로 여러 프로토콜의 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