
Subgraph Registry Mcp
io.github.PaulieB14由 GitHub 帳號 PaulieB14 發布v0.4.2更新於 Nov 10, 2026
Discover and query 15,500+ classified subgraphs on The Graph Network
概覽
在包含 15,452 筆已分類 Graph Network 子圖的快照中檢索,並為助理準備有界的 GraphQL 起始查詢。
- 可以做什麼
- 依鏈、協定、實體或合約地址搜尋、語意搜尋、推薦並檢視已發布子圖的詳細資料
- 查出某個 EVM 合約地址在某條鏈上由哪個子圖建立索引
- 在本機依目標產生 GraphQL 起始查詢,附上實體對應、信心程度與未套用的篩選條件
- 設定 Studio 金鑰後可選擇以即時 schema 驗證並執行查詢
- 透過可選的閘道中介資料請求檢查子圖健康狀態
- 檢視登錄統計、領域、網路與協定類型分布
- 適用情境
- 適合在助理查詢 The Graph 上的區塊鏈資料前先挑選合適的子圖,或回答某個合約由哪個子圖建立索引。無金鑰的探索與本機查詢準備不需帳號;執行查詢則需要 Studio 金鑰。
- 執行需求
- 本機 Node.js 程序(Node 20 通過 CI 測試),通常以 npx 執行並固定套件版本。探索與準備不需金鑰;即時 schema 驗證、執行查詢與健康檢查需要在程序環境中由人工設定 THE_GRAPH_STUDIO_API_KEY(或 GATEWAY_API_KEY)。僅在內附登錄檔缺少時才需要網路存取。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Subgraph Registry Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Subgraph Registry
[圖片]Discover published subgraphs on The Graph Network by chain, protocol, entity or contract, then prepare a bounded GraphQL starter.
The bundled snapshot contains 15,452 classified subgraph records. It is not a live directory of every subgraph: Studio-only deployments, dynamic contracts and later updates may be absent. Availability must be checked separately from ranking.
Start here: agents and MCP users
Share the canonical SKILL.md for the complete agent workflow.
-
Connect a pinned, published release (Node 20 is CI-tested):
Inspect
tools/list: Node 0.13.6 exposes 10 tools without a key, or 19 total with a Studio key. A hosted connector can mount a different subset or corpus; installing npm does not update or restart it. -
Discover explicitly. Tool-call parameters below work with published 0.13.6:
For newer networks, an explicit discovery opt-in can include zero-allocation snapshot records without probing them:
arcis mainnet;arc-testnetis distinct. Neither missing rewards/curation nor zero allocations proves unqueryability. Denied/testnet opt-ins remain separate. -
Prepare locally, if the tool is advertised:
Inspect the selected deployment, query,
goal_mappingand validation labels. Releases before 0.12.0 return a stored starter that may not answer the goal; older connectors can use recommendation/detail instead. -
Bring your own Studio key — set up by a human. This server never ships or shares a key. Studio keys belong to a Studio account managed by a person, so agents should hand this step to their operator rather than sign up or mint keys. The operator creates a key at Studio API Keys, stores it via the host's secret manager or environment as
THE_GRAPH_STUDIO_API_KEYand restarts the server; never paste it in chat, source, tool arguments or logs. Official pricing currently advertises 100,000 free queries/month; verify the account's plan and remaining allowance. It is not a new quota per key; Studio development endpoints have separate limits. See host configuration. -
Execute only when wanted and authorized, using an advertised execution tool and reviewed fields. Bearer format:
Authorization: Bearer <STUDIO_API_KEY>. Read GraphQLerrorsand partialdataeven on HTTP 200. On missing credentials/quota, stop and resolve that issue; never silently switch to x402.
What 0.13.6 adds
npm test now passes a test/*.test.mjs glob. Node 22 rejects node --test test/
(a bare directory), which also broke the scheduled-update test gate on its first
dry run. No runtime behaviour changed.
What 0.13.5 adds
query_for_goal fixes found by the weekly health check:
- No chain is hidden by snapshot signals. Zero active allocations or denied
indexing rewards only rank a deployment lower; they never exclude it
(Arc is queryable without rewards). Unserved deployments are planned after
served ones, annotated
snapshot_note, and withvalidate_schema:truea deployment the gateway rejects ("no allocations", validation failure) is skipped and the next-ranked one is tried. - "pools containing WETH/ETH/USDC…" maps to a
token0/token1filter (where: {or: [...]}) using per-chain addresses for the major tokens (WETH, WBTC, USDC, USDT, DAI, ...). Unknown symbols are reported as unmet, not silently dropped; pass an address instead. - More spam signals (never delete rows): TVL-per-transaction and
volume-to-TVL sanity, implausible
totalSupply, an absolute TVL cap. If every row is flagged, another deployment is tried, otherwise rows are ordered byvolumeUSDand reported withall_flagged. - Keyless plans are no longer id-only for Uniswap v3/v4-family swaps, pools
and positions: they come from a bundled schema-family catalog (labelled
field_source: "bundled_family_catalog", not live-validated) with newest-first/TVL ordering. A key withvalidate_schema:truestill confirms fields live. - The scheduled registry update now also re-pins the literal npx package in
src/index.jsand README, so the pinned config example matches the release.
What 0.13.2 adds
npm/ClawHub 0.13.2 hardens installation and network behaviour: dependencies
are pinned to exact versions, semantic search uses only the bundled model (never
a download; if it is missing the tool answers with keyword search and says so),
and a missing registry.db is an error unless
SUBGRAPH_REGISTRY_ALLOW_DB_DOWNLOAD=1 is set. Generated config examples use the
literal pinned package [email protected].
0.13.1 secured the optional HTTP/SSE transport. It binds
127.0.0.1 by default and refuses a non-loopback bind unless
SUBGRAPH_REGISTRY_HTTP_TOKEN is set; then every route except /health needs
Authorization: Bearer <token> (401 otherwise). See
HTTP transport security. Stdio (the default) is
unchanged.
0.13.0 made query_for_goal skip deployments that time out,
have failing indexers or are more than 2 hours behind, and fall back to the next
deployment that fits the goal. Skips are reported in
goal_mapping.skipped_deployments, and recommend_subgraph also drops recently
failed deployments. Token and pool results carry token_quality spam flags
(spam_handling, trusted_tokens); flagged rows move last by default and are
never removed. A chain named late in a long goal is no longer ignored. The
bundled registry database is unchanged.
0.12.0 added goal-specific query_for_goal planning (entity
mapping, confidence, unmet/filters_not_applied, alternatives, optional
validate_schema) and human-handoff bring-your-own-key onboarding. It also ships
the discovery fixes merged after 0.11.0: chain-only inference, empty-result
diagnostics, strict search validation and structured next_action hints. The
bundled registry database is unchanged from 0.11.0. A mounted connector keeps its
own pinned runtime until it is updated. See the discovery audit.
The Problem
Agents querying The Graph need to discover and select the right subgraph before they can query data. Search results include snapshot query volume, classification, entities and starter queries to reduce extra discovery steps. Live schema relevance, health and successful execution still require separate checks when needed.
What It Does
- Builds a snapshot from active published subgraphs in the configured Graph Network meta-subgraph; it does not enumerate all private/Studio deployments
- Attempts to fetch schema metadata for indexed deployments; missing data remains a coverage limitation
- Extracts contract addresses from each manifest's
dataSourcesandtemplates— agents can answer "which subgraph indexes contract 0x… on chain X?" - Stores a starter GraphQL query from parsed schema metadata where available; it is an example, not a live validation or a goal-specific answer
- Classifies each subgraph by domain, protocol type, canonical entities, and schema family
- Scores reliability using on-chain signals (query fees, volume, curation, stake)
- Returns keyed gateway and optional paid x402 routes — the MCP never signs payments or auto-pays; see the explicit payment-approval warning below
- Publishes as SQLite database + REST API + MCP server + per-subgraph JSON-LD at
/.well-known/subgraph/{id}.jsonldfor ecosystem crawlers - Generates visual dashboards and bot-readable category files (auto-updated with each sync)
Contract lookup, measured freshness, and goal-to-starter workflow
Released in 0.11.0, the Node MCP server (stdio and SSE) implements three complementary tools. Health is advertised only when a Studio key is configured; the other two are keyless preparation/discovery tools. Existing search/recommend/detail calls remain discovery-only; they never probe or execute. No crawler/database migration or Python API change is required.
find_by_contract(address, chain?, limit=3)
JavaScript examples use a host-provided mcp.call(name, args) adapter. For the
actual MCP SDK Client.callTool({name, arguments}) flow, see
scripts/audit-discovery.mjs.
Matches exact, case-insensitive EVM addresses from crawled manifests, checking
each manifest record's network (falling back to the deployment network).
Ranks allocated, non-denied snapshot deployments by reliability then 30-day
volume; de-duplicates before limiting. get_top_subgraph_deployments keeps its
existing (contract_address, chain) interface and uses the same implementation.
Results include matched manifest records, starters, and schema_entities for the
whole deployment. Current registry data does not map a contract to particular
entities/fields, so coverage.contract_to_entity_mapping is explicitly null.
Dynamic template instances and substreams may be missing. No match is not proof
that no subgraph indexes the contract; allocation/reliability remain snapshot signals.
check_subgraph_health(id | subgraph_id | ipfs_hash | deployment_id)
Explicitly opts into one Studio-key gateway request for:
Known subgraph IDs are pinned to the crawled deployment. Returns freshness.live
with measured observed_at (Unix seconds), indexed block/timestamp, indexing-error
flag, HTTP status, and one of serving, indexing_errors, metadata_unavailable,
or query_failed. A successful metadata query does not prove chain-head sync;
synced_to_chain_head remains null. Unsupported metadata is unknown, not fabricated.
Search, recommendation, detail, contract results, and JSON-LD manifests expose
cached freshness without making calls. Before a probe, live is null. Observations
are process-local (maximum 500), become stale: true after 300 seconds, and disappear
on restart. There is no background check or new reliability-score interpretation.
registry_updated_at is the upstream metadata update, not a crawl/health timestamp.
This credential-only tool is not advertised on keyless servers.
query_for_goal(goal, chain?, first?, execute=false, validate_schema=false)
Since 0.12.0: goal-specific planning. Earlier releases return the first recommendation's stored starter instead.
How it maps a goal:
- Parses entity intent (pool IDs, swaps, candles/OHLCV, daily/hourly data,
positions, liquidations, borrows, mints, tokens, domains…), ordering
(latest/top),
top N, 0x addresses and time ranges (last 7 days). - Scores recommended deployments plus an entity-aware candidate search by whether their crawled entity names contain the requested entity, protocol text match and recommendation rank, within the inferred chain.
- Keyless: derives the collection with graph-node's pluralisation, selects
id(plus stored-starter fields only when the starter targets the same entity), and filters byidwhen an address names that entity. Anything that needs field types (ordering, time filters, relation filters, aggregation intervals) goes intogoal_mapping.unmetinstead of being guessed. Confidence is at mostmediumandvalidation.live_schemaisnot_checked. validate_schema:truewith a key: one aliased introspection request scoped to the chosen entity (Queryfields, entity fields,_orderBy,_filter, aggregation intervals). Fields,orderBy,whereand required arguments are emitted only if present; confidence becomeshigh. Address context maps to relation filters (owned by→owner,token→token0ORtoken1when the schema hasor). If a requested address or time filter cannot be applied, it is listed ingoal_mapping.filters_not_appliedand execution is skipped (requested_filter_not_applied) rather than returning unfiltered rows. Probe errors caused by auth, quota or payment mark validationfailed, returnquery:nulland block execution, with no fallback. Healthy-alternative fallback (0.13.0+). The probe also reads_meta. If a deployment times out, returns indexer errors (bad indexers,indexing_error, unavailable) or is more than 2 hours behind, it is skipped and the next deployment whose entities fit the goal is tried: at most 3 deployments and 6 gateway requests per call. Every skip is listed ingoal_mapping.skipped_deploymentswith its reason and evidence, plusfallback_usedanddeployment_health. Failures are remembered in the process for 5 minutes, sorecommend_subgraphalso drops the deployment and lists it inskipped_unhealthy. If every fitting deployment that answered is stale, the freshest stale one is used with a warning. Reward-denial, curation and chains without indexing rewards (such as Arc) are never treated as unhealthy. Spam-token flags (0.13.0+). Token and pool results are checked for likely spam: URL or lure words (claim, visit, airdrop…) in a symbol or name, TVL above $100B, TVL with almost no volume, and very low activity. Pool queries selecttoken0/token1 { id symbol name }so the token side can be checked. A small per-chain known-good list (WETH, USDC, USDT, DAI, WBTC…) plustrusted_tokensis never flagged.token_qualitylists flagged rows, reasons and original positions. Withspam_handling:"flag_and_push_down"(the default), flagged rows move after the others;flag_onlykeeps the gateway order andoffdisables the check. Rows are never removed. Whenfirstis not given for a top-N token or pool goal, up to twice as many rows are fetched (goal_mapping.first_fetched) so good rows remain after push-down.- No confident mapping returns
query:null,confidencelow/none, and rankedalternatives. Matching deployments hidden by default filters appear inhidden_candidates;include_denied/include_unservedopt them in (neither denied rewards nor zero allocations proves a deployment is unqueryable). Goals with no entity intent keep the stored starter, labelledconfidence: "generic_starter".
Rows are 1–10 (first defaults to a number in the goal or 5); selections are
flat scalars plus single relations as { id }. Mutations, variables, fragments
and nested lists are never generated. execute defaults to false and needs an
explicit call and THE_GRAPH_STUDIO_API_KEY; keyless execution returns
credentials_required, the unsigned request and onboarding. Gateway success is
reported separately: GraphQL/auth errors (even HTTP 200), partial data,
malformed responses and transport failures never become a success claim. No
retries, fallbacks, arbitrary endpoints or x402 payments.
With a key configured, preparation results include
next_action.execute_call (the same goal with validate_schema and execute
set) so the explicit next step is one call away. Without a key, onboarding
contains relay_to_human (a short message for the agent's operator), steps,
a placeholder-only MCP config and a curl command that reads
$THE_GRAPH_STUDIO_API_KEY from the environment. Tool output never contains
the key.
Bring your own key: host configuration
The server reads the key only from its process environment
(THE_GRAPH_STUDIO_API_KEY, or GATEWAY_API_KEY). Prefer interpolation or a
secret manager over a literal value in a config file, never commit a key, and
restart the server afterwards: tools/list grows from 10 to 19 tools.
Cursor (~/.cursor/mcp.json or .cursor/mcp.json; ${env:NAME} resolves from
the environment Cursor was started with):
Claude Code (.mcp.json supports ${VAR} expansion):
Claude Desktop and other stdio hosts use the same mcpServers shape. Without
interpolation, the env value is plain text in that local file — use it only on
a machine you control and keep the file out of version control:
Goal-specific planning requires 0.12.0 or later.
Agent usability and discovery diagnostics
The canonical shareable agent guide is SKILL.md: pinned installation, capability discovery, chain/protocol lookup, human-assisted Studio key setup, bounded preparation, opt-in execution and error handling. See the reproducible discovery audit for measured results against the earlier 0.11.0 package.
Search recognizes a standalone known chain/alias (for example query:"arc") as
a network filter and returns inferred_network; an explicit network always
wins. Use network:"arc" for mainnet and network:"arc-testnet" for testnet.
Empty searches explain matching snapshot records and overlapping exclusions in
diagnostics. Default allocation/denied/testnet filters remain unchanged;
include_unserved:true deliberately includes zero-allocation records for discovery.
Rewards, curation and queryability are not interchangeable. A chain can be live and queried before rewards or curation signaling is enabled. Zero allocations is not proof of unavailable queries, and positive allocations is not a live health check. Reward denial is not proof of spam or query failure. Reliability is a traction-weighted ranking input, not a measured uptime or reward-eligibility score. Unknown health remains unknown; no discovery probe is performed. The published-network corpus cannot include all Studio-only deployments.
Search/recommend/goal responses provide a structured next_action: reuse a
configured key (not assumed valid), or have a human create one at
Studio API Keys, then store it in the MCP
host's secret manager as THE_GRAPH_STUDIO_API_KEY. Never paste it in chat or
logs. Official Studio pricing currently
advertises 100,000 free monthly queries; check the account's remaining quota
and plan, not a fictitious per-key allowance. Studio development endpoints have
separate limits. These hints never create a key, execute GraphQL, or auto-pay.
Search limit is an integer 1–100 (semantic: 1–50); booleans must be JSON
booleans. Unsupported offset/cursor arguments are rejected, not silently ignored.
total remains the number returned, not a total-match or pagination promise.
Querying with x402 (no API key)
Discovery hits include query_url_x402 alongside the keyed query_url. The returned pricing manifest advertises $0.01 USDC on Base per query; a separate external client must validate the gateway's actual payment request and obtain approval before signing. No wallet is needed for discovery or the keyed route.
Financial capability warning: this optional external client signs a USDC payment authorization and may retry automatically. It is not the registry server. Use it only after explicit owner approval of the payment/amount and review of the signing client and query. Never fall back to payment on auth/quota failure. The example is disabled by default; the keyed Studio route above needs no wallet.
Pricing manifest returned per subgraph:
Client libraries: @graphprotocol/client-x402, x402-fetch, or any generic x402 wrapper.
Registry at a Glance
Generated charts/category files retain their own snapshot dates and may lag the bundled database. They are not live serving metrics. The counts below were read from the bundled 0.11.0 database; use
list_registry_statsto inspect the connected runtime. Seepython/generate_docs.py.
Browse by Category
Domains
Explore subgraphs by use case — each file lists the top 25 subgraphs ranked by reliability score.
Full index: docs/DOMAINS.md
Networks
Explore subgraphs by blockchain — each file lists the top 25 subgraphs on that chain.
Full index: docs/NETWORKS.md
Protocol Types
Reliability Score
Each subgraph gets a composite reliability score (0-1) based on four on-chain signals:
All values are log-scaled and capped at 1.0. A 0.5 penalty is applied when the snapshot records denied indexing rewards. This does not establish deprecation, safety, reward eligibility for a whole chain, or query availability.
Higher scores mean larger combined ranking inputs, not calibrated confidence. No score establishes functionality, safety, testnet status, rewards eligibility or current query availability.
Traction-weighted ranking can favor older deployments
Lifetime fees accumulate, curation/stake are snapshots, and 30-day volume is a rolling window (it does not require waiting 30 days to register traffic). Older deployments can have a ranking advantage; this is not an uptime or quality test. For context, a historical 2026-08-25 snapshot with positive allocations and no denied rewards showed:
These are dated observations, not current corpus or health measurements. The runtime caveat deliberately avoids frozen claims about the youngest top-ranked entry. New networks may serve traffic before rewards or curation are enabled.
Rather than reweight the score and trade a measurable signal for a guess,
search_subgraphs returns young matches in a separate emerging list
alongside an emerging_caveat explaining that a low score at that age is
expected rather than damning. Every result also carries age_days and
maturity (new < 30d, emerging < 90d, established). This matters most
for new chains and new protocols, where no mature deployment can exist —
newer matching deployments can appear separately without being mislabelled as
bad or unavailable merely because their traction score is lower.
semantic_search_subgraphs combines cosine similarity with the reliability
weight below. It is not age-neutral: traction can influence the order. It
carries maturity labels but no separate emerging list; relevance still needs
review, and neither semantic score nor age establishes health.
Ranking
Three tools rank, and each ranks differently on purpose:
search_subgraphs— re-ranks candidates using word boundaries and exact distinctive-name preference, then reliability (0.12.0 adds the exact-name boost and standalone-chain inference). OR-ing the terms and ordering on reliability alone meant a popular subgraph matching one incidental word beat a precise match on all three, so being more specific returned worse answers. Version tokens (v2,v3,v4) are kept rather than dropped as too short.semantic_search_subgraphs— orders bysemantic_score × (0.5 + 0.5 × reliability). Pure cosine put testnets first, since their text is nearly identical to mainnet's. The 0.5 floor keeps new subgraphs competitive.recommend_subgraph— infers domain and protocol type from the goal, but as a ranking bonus, never a filter. As a filter, one bad keyword collapsed the candidate pool to nothing.
A term matching a subgraph's name counts for more than one matching its
description — %ens% also matches "tokens", so equal weighting handed a
search for ens to four Uniswap subgraphs.
Chain names are aliased, so ethereum, arbitrum, polygon and bnb resolve
to the corpus values mainnet, arbitrum-one, matic and bsc.
Testnets
Testnet deployments can resemble mainnet twins and compete for the top slot.
In keyword/semantic search they are
excluded by default and every result carries testnet: true|false. Pass
include_testnets: true to see them — and an explicit request for a testnet
network (network: "sepolia") always wins over the default, so that still
returns exactly what you asked for.
Using the registry from payql
The optional [email protected] pin below prevents floating installs; it is not an audit
or a safety endorsement of that external package. Review it before running, and
require explicit approval before enabling any funded payment/signing path.
payql can use this registry as its
free discovery source instead of paying for a network-subgraph query. Run the
registry's HTTP transport and point payql at it:
POST /graphql answers in the Graph network subgraph's subgraphMetadataSearch
shape, which is what payql already parses — so this needs no change on payql's
side, and discovery becomes free and locally-ranked.
Denied deployments
Curation-denied deployments (deniedAt > 0 — denied indexing rewards, not proof
of spam, deprecation or query failure) are excluded by default from
search_subgraphs, semantic_search_subgraphs and recommend_subgraph. Pass
include_denied: true to the two search tools to see them; every result then
carries denied: true|false so the choice stays visible.
MCP Server
The registry is available as an MCP server with dual transport — stdio for local clients and SSE/HTTP for remote agents.
The Node server provides official-name schema, execute, contract-lookup and
30-day-count aliases for clients using graphops/subgraph-mcp.
Its discovery names are search_subgraphs, recommend_subgraph and
semantic_search_subgraphs. Interchangeability is not a guarantee of identical
ranking, corpus coverage or every remote connector capability.
Every search/recommend hit carries the snapshot's query_volume_30d, so a
separate registry counts call is usually unnecessary. It is historical demand,
not current serving health; no live volume measurement is performed by discovery.
The shipped server is the Node implementation in
src/index.js; that's whatnpx -y [email protected]runs and what's published to npm. A Python equivalent inpython/mcp_server.pyis kept for local development against the same SQLite database — bug fixes and new tools should land in the Node version first.
Ten keyless discovery/preparation tools (inspect tools/list on your actual host; no automatic GraphQL execution or live schema introspection):
- search_subgraphs — filter by domain, network, protocol type, entity, or keyword. Ranked by matched terms, reliability and real
query_volume_30d. - recommend_subgraph — natural language goal to best subgraphs (includes
schema_stable_days) - semantic_search_subgraphs — vector-similarity search over precomputed embeddings (sentence-transformers/all-MiniLM-L6-v2, 384-dim). Use for fuzzy/paraphrased goals where literal keyword match would miss.
- get_subgraph_detail — full classification for a specific subgraph (includes
schema_changed_atand crawledcontract_addresses) - list_registry_stats — registry overview (domains, networks, counts)
- get_schema_changes — chronological fingerprint history. Fingerprints use entity names/field counts, not a full semantic schema diff.
- find_by_contract and get_top_subgraph_deployments — exact manifest-address discovery, not live contract-to-entity validation
- get_deployment_30day_query_counts — snapshot volumes for known IDs/hashes, not a live volume probe
- query_for_goal — goal-to-query planning (0.12.0+) with rationale/confidence; keyless by default;
validate_schema/executeare separately credential-gated
Nine additional keyed tools (19 total). Caller must invoke them; discovery never auto-queries:
- execute_query_by_subgraph_id / execute_query_by_deployment_id / execute_query_by_ipfs_hash — POST GraphQL to The Graph gateway. Same routing as official (
subgraphs/idvsdeployments/id). RequiresTHE_GRAPH_STUDIO_API_KEY(orGATEWAY_API_KEY). Without a key, returns{error: credentials_required, query_url, query_url_x402, hint}immediately — no hang, no x402 auto-pay. Convenience superset: execute_query acceptsidORdeployment_idORipfs_hash. - get_schema_by_subgraph_id / get_schema_by_deployment_id / get_schema_by_ipfs_hash — local
registry_schema(entities, example_query, fingerprint) with no network when the subgraph is in the corpus; live__schemaintrospection only when a Studio key is set. Convenience superset: get_schema. - check_subgraph_health — one fixed, opt-in
_metarequest; cache evidence does not prove chain-head sync.
Set THE_GRAPH_STUDIO_API_KEY via the MCP host's secret manager to enable execute/live-schema/health. No private key is bundled. The keyed gateway often returns HTTP 200 with a GraphQL error body when auth is missing — execute_query surfaces http_status and errors honestly.
Install
Node 20 is CI-tested. Pin a reviewed release rather than floating to latest.
Claude Code:
A JSON MCP host configuration (keyless discovery):
For a local HTTP/SSE client:
HTTP transport security
The default transport is stdio, with no listener. --http, --http-only or
MCP_HTTP_PORT start an HTTP/SSE listener (0.13.1+):
- Loopback by default. It binds
127.0.0.1. Without a token, requests are accepted only from a loopback socket with a loopbackHostheader, which blocks DNS-rebinding requests from browser pages. - Remote binds need a token. If
MCP_HTTP_HOSTis anything other than a loopback address (for example0.0.0.0), the server refuses to start unlessSUBGRAPH_REGISTRY_HTTP_TOKENis set to a random secret of at least 24 characters. - Bearer auth. With a token set, every route except
/health(/sse,/messages,/graphql, OpenAPI and JSON-LD) requiresAuthorization: Bearer <token>. The token is compared in constant time; anything else gets401. The token is never logged or echoed. - No unauthenticated remote caller can reach a tool, so none can spend the operator's Studio key. The access token is separate from the Studio key; never reuse the Studio key as the token.
Prefer TLS (a reverse proxy) for any non-local network.
The npm package bundles the SQLite registry and offline model. Nothing is downloaded at runtime by default. If the bundled registry is missing the server stops with an error; set SUBGRAPH_REGISTRY_ALLOW_DB_DOWNLOAD=1 to fetch it from GitHub instead (hash-verified). The example configuration is keyless; see host configuration to add your own Studio key for opt-in execution.
Well-Known JSON-LD Manifest
Stable, machine-readable per-subgraph manifest that other crawlers and agent frameworks can index without going through MCP. Served by the Node MCP HTTP transport:
Each manifest includes classification, parsed entities, contract addresses (from the indexed dataSources), endpoints (x402 + API-key), a per-subgraph starter query generated from the actual schema, pricing, and metadata. The @context + @type make the shape auto-discoverable.
Semantic Search
Indexed deployments with embeddings have a precomputed 384-dim vector from sentence-transformers/all-MiniLM-L6-v2, built from its display name, description, canonical entities, top schema entity names, and protocol metadata. At MCP-tool-call time the Node server embeds the query string with the same model (via @xenova/transformers, quantized ONNX bundled in the npm package — no first-call download) and ranks by cosine similarity weighted by snapshot reliability, as described above.
Use it when:
- The goal is paraphrased or use-case-shaped (
search_subgraphsis keyword-only). - You're exploring "what data exists for X?" rather than fetching a specific protocol's subgraph.
Python crawl-time (fastembed) and JS runtime (@xenova/transformers) use the
same model architecture. Float32 versus quantized ONNX inference is not
bitwise-identical, and scores/rankings can differ. Semantic search uses only
the bundled model and never downloads one (remote model loading is disabled). If
the bundled files are missing, semantic_search_subgraphs returns keyword-search
results with search_mode: "keyword_fallback" and a semantic_unavailable
explanation.
Embeddings and the model increase package size; inspect the actual tarball rather than treating historical size estimates as a current download guarantee.
Schema Evolution
Each crawl computes a schema_fingerprint (MD5 of sorted entity:field_count pairs) per subgraph. Whenever the fingerprint changes from the previous sync, an immutable row is written to schema_history. The table is append-only and survives full DB rebuilds.
Illustrative output shape below; the sample counts/timestamps are not live measurements.
recommend_subgraph and get_subgraph_detail results now also include schema_changed_at (unix seconds of last detected change) and schema_stable_days so agents can prefer subgraphs whose data contract has been stable longer — useful when a query needs to keep working across the agent's planning horizon.
OpenAPI
The full API surface (MCP tools + REST routes) is published as OpenAPI 3.1:
openapi.yaml— checked-in generated specificationdata/openapi.json— bundled with the npm tarballGET /.well-known/openapi.json— served by the HTTP transport for live discovery
The spec is regenerated on every release from the declarative TOOLS[] + REST_ROUTES[] exports in src/index.js via scripts/gen-openapi.js. CI fails any PR that touches src/index.js without regenerating the spec.
Python REST API (separate local-development service)
These routes belong to python/server.py on port 3847, not the Node MCP
HTTP transport on 3848. The new Node discovery diagnostics/validation are not
implemented here; for example this Python API has its own offset pagination.
Bot-Readable Category Files
The docs/ directory contains structured .md files with YAML frontmatter designed for AI agents and bots to consume:
Each category file includes:
- YAML frontmatter (domain/network, count, percentage, last updated)
- Top 25 subgraphs ranked by reliability score
- MCP tool and REST API query examples
Architecture
Maintainer-only: optional data rebuilds and publication
Normal agent use runs the bundled snapshot; do not crawl to install or query.
The Python crawler/rebuild workflow is separate maintenance: it can make network
requests, consume gateway allowance, rewrite the database and publish updates.
Only run it with explicit authorization, suitable credentials and a query budget.
Keep real credentials in a secret manager; do not paste them into shell history
or commit a .env file. After an intentional rebuild, synchronize the pinned
hash, package/skill metadata and reviewed release artifacts; do not disable hash
verification to distribute a changed database.
Inspect maintenance options without starting a crawl:
The update workflow currently schedules incremental maintenance with a five-day day-of-month cron step and a monthly full refresh. It also supports manual dispatch; this is not proof a particular connected runtime received an update. Generated category files/charts can have different snapshot dates. The standalone Python scheduler's default weekly loop is separate from the GitHub Actions schedule.
For publication without a crawl or data rebuild, use the publish-only release guide. Its main-only manual workflow uses repository secrets and does not write main. Neither this README update nor merging these fixes publishes a new npm/ClawHub version.
License
MIT
來源:README.md,提交 f8b3d9c
工具
0版本歷史
1- v0.4.2最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分