Subgraph Registry MCP

Subgraph Registry MCP

Agent-friendly semantic classification of all subgraphs on The Graph Network. Pre-computed index of 15,500+ subgraphs with domain classification, protocol type detection, schema fingerprinting, canonical entity mapping, and composite reliability scoring.

Category
访问服务器

README

Subgraph Registry

<a href="https://glama.ai/mcp/servers/PaulieB14/subgraph-registry"> <img width="380" height="200" src="https://glama.ai/mcp/servers/PaulieB14/subgraph-registry/badge" /> </a>

Agent-friendly semantic classification of all subgraphs on The Graph Network.

Pre-computed index of 15,500+ subgraphs with domain classification, protocol type detection, schema fingerprinting, canonical entity mapping, and composite reliability scoring.

The Problem

Agents querying The Graph need to discover and select the right subgraph before they can query data. Today this requires 3-4 tool calls (search, check volumes, fetch schema, infer structure) before any real work happens. This registry flips that: agents start with structured knowledge, not a blank slate.

What It Does

  1. Crawls all active subgraphs from the Graph Network meta-subgraph (subgraphs indexing subgraphs)
  2. Fetches the GraphQL schema for every deployment
  3. Classifies each subgraph by:
    • Domain: DeFi, NFTs, DAOs, Gaming, Identity, Infrastructure, Social, Analytics
    • Protocol Type: DEX, Lending, Bridge, Staking, Options, Perpetuals, Marketplace, etc.
    • Canonical Entities: Maps schema types to a standard vocabulary (Pool -> liquidity_pool, Swap -> trade, etc.)
    • Schema Family: Groups forks/clones by schema fingerprint
  4. Scores reliability (see Reliability Score below)
  5. Publishes as JSON registry + SQLite database + REST API

Quick Start

cd python
python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt

# Create .env with your Graph API key
echo "GATEWAY_API_KEY=your-key-here" > .env

# Full crawl + classify (all 15K+ subgraphs, ~11 min)
python registry.py

# Or limit to top N by signal
python registry.py --max 500

# Start API server
python server.py

API Endpoints

GET /summary                    Registry overview and stats
GET /domains                    Domain breakdown
GET /networks                   Network breakdown
GET /families                   Schema family groups (fork/clone detection)
GET /subgraphs                  Filter subgraphs
GET /subgraphs/{id}             Full detail for one subgraph
GET /search?q=uniswap           Free-text search
GET /recommend?goal=...&chain=  Agent-optimized recommendation

Example: Agent Recommendation

curl "http://localhost:3847/recommend?goal=query+DEX+trades+on+Arbitrum&chain=arbitrum-one"

Returns the top subgraphs matching the intent, with reliability scores and query instructions.

Example: Filter by Entity Type

curl "http://localhost:3847/subgraphs?entity=liquidity_pool&network=base&min_reliability=0.5"

Weekly Sync

# Run weekly incremental updates (only fetches new/changed subgraphs)
python scheduler.py

# One-shot incremental
python scheduler.py --once

Architecture

Graph Network Subgraph (meta-subgraph, 140M queries/month)
    |
    v
crawler.py ---- async httpx, ID-based cursor pagination (bypasses 5K skip limit)
    |
    v
classifier.py - rule-based domain/protocol classification + schema fingerprinting
    |
    v
registry.py --- builds JSON registry + SQLite + indices
    |
    v
server.py ----- FastAPI REST API with /recommend endpoint (:3847)
    |
    v
scheduler.py -- weekly incremental sync via updatedAt filtering

MCP Server (src/index.js)
    |
    ├── stdio transport  ←── Claude Desktop / Claude Code (npx command)
    └── SSE/HTTP :3848   ←── OpenClaw / remote agents (--http flag)

Output

File Size Description
registry.json ~130 MB Full registry with all entity details
registry.db ~8 MB SQLite with indexed lookups
sync-state.json <1 KB Last sync timestamp for incremental updates

Classification Results (as of March 2026)

Domain Count Network Count
DeFi 11,841 Ethereum 2,471
NFTs 893 Base 1,845
Infrastructure 602 BSC 1,664
DAO 450 Arbitrum 1,442
Identity 424 Polygon 1,364
Analytics 348 Optimism 593
Gaming 255 Avalanche 454
Social 78

Reliability Score

Each subgraph gets a composite reliability score (0–1) based on four on-chain signals:

Signal Weight What it measures Source
Query Fees 30% GRT fees earned from actual usage — proves real demand Network subgraph
Query Volume 30% 30-day query count — recent activity level QoS subgraph
Curation Signal 20% GRT tokens curated — community vote of confidence Network subgraph
Indexer Stake 20% GRT staked by indexers — skin in the game Network subgraph

All values are log-scaled and capped at 1.0. Usage signals (fees + volume) are weighted higher at 60% because they prove real demand. A 0.5 penalty is applied if the subgraph has been denied/deprecated.

What the scores mean:

  • 0.7–1.0: High reliability — strong signal, active indexers, real usage (e.g. Uniswap, Aave)
  • 0.3–0.7: Moderate — some signal and usage, likely functional
  • 0.0–0.3: Low — minimal signal, may be inactive or a test deployment

MCP Server

The registry is available as an MCP server for agent integration. It supports dual transport — stdio for local clients (Claude Desktop, Claude Code) and SSE/HTTP for remote agents (OpenClaw, custom agent frameworks).

It exposes 4 tools:

  • search_subgraphs — filter by domain, network, protocol type, entity, or keyword
  • recommend_subgraph — natural language goal to best subgraphs
  • get_subgraph_detail — full classification for a specific subgraph
  • list_registry_stats — registry overview (domains, networks, counts)

Install via NPM

npx subgraph-registry-mcp

Add to Claude Desktop (stdio)

{
  "mcpServers": {
    "subgraph-registry": {
      "command": "npx",
      "args": ["subgraph-registry-mcp"]
    }
  }
}

Add to OpenClaw / Remote Agents (SSE)

Start the server with the HTTP transport:

# Dual transport — stdio + SSE on port 3848
npx subgraph-registry-mcp --http

# SSE only (for remote/server deployments)
npx subgraph-registry-mcp --http-only

# Custom port
MCP_HTTP_PORT=4000 npx subgraph-registry-mcp --http

Then point your agent at the SSE endpoint:

{
  "mcpServers": {
    "subgraph-registry": {
      "url": "http://localhost:3848/sse"
    }
  }
}

Transport Modes

Invocation Transports Use case
npx subgraph-registry-mcp stdio Claude Desktop, Claude Code
npx subgraph-registry-mcp --http stdio + SSE :3848 Dual — local + remote agents
npx subgraph-registry-mcp --http-only SSE :3848 OpenClaw, remote deployments

A /health endpoint is available at http://localhost:3848/health when HTTP transport is active.

The server auto-downloads the pre-built registry (8MB SQLite) from GitHub on first run — no local build needed.

How It Stays Current

The Graph Network subgraph indexes all subgraph deployments on-chain. The crawler queries updatedAt_gte: lastSyncTimestamp to fetch only what changed since the last run. Weekly syncs keep the registry fresh without full rebuilds.

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选