subgraph-registry-mcp 0.6.0 → 0.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/data/registry.db CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "subgraph-registry-mcp",
3
- "version": "0.6.0",
3
+ "version": "0.6.3",
4
4
  "mcpName": "io.github.PaulieB14/subgraph-registry-mcp",
5
5
  "description": "MCP server for agent-friendly subgraph discovery on The Graph Network. 14,733 classified subgraphs with x402 query URLs ($0.01 USDC on Base, no API key required), reliability scoring, and protocol classification.",
6
6
  "type": "module",
package/src/index.js CHANGED
@@ -45,7 +45,7 @@ const GITHUB_DB_URL =
45
45
  // 3. Paste the new hash here and bump package.json version
46
46
  // 4. Update SKILL.md "Verifying the registry" section
47
47
  const EXPECTED_DB_SHA256 =
48
- "f81b79c53cc13c3428472024187fc7fd502f7418f5da20f0a6e01807dd4011c6";
48
+ "a5b0377218090f61fd204aea48bd3a9c81a9adf94a54f120b7bbfba81f14ac56";
49
49
  // Skip-verification escape hatch (set to "1" only if you're rebuilding the DB
50
50
  // locally and know what you're doing — never set in agent-runtime defaults).
51
51
  const SKIP_VERIFY = process.env.SUBGRAPH_REGISTRY_SKIP_VERIFY === "1";
@@ -166,11 +166,18 @@ function searchSubgraphs({
166
166
  protocol_type = "",
167
167
  entity = "",
168
168
  min_reliability = 0,
169
+ include_unserved = false,
169
170
  limit = 20,
170
171
  } = {}) {
171
172
  const conditions = [];
172
173
  const params = [];
173
174
 
175
+ // Default: hide deployments with 0 active indexer allocations — these
176
+ // return "subgraph not found: no allocations" even though the ID is valid.
177
+ if (!include_unserved) {
178
+ conditions.push("active_allocation_count > 0");
179
+ }
180
+
174
181
  if (domain) {
175
182
  conditions.push("domain = ?");
176
183
  params.push(domain);
@@ -209,7 +216,7 @@ function searchSubgraphs({
209
216
  const sql = `
210
217
  SELECT id, display_name, description, auto_description, domain, protocol_type, network,
211
218
  reliability_score, ipfs_hash, entity_count, canonical_entities,
212
- powered_by_substreams
219
+ powered_by_substreams, active_allocation_count
213
220
  FROM subgraphs
214
221
  ${where}
215
222
  ORDER BY reliability_score DESC
@@ -236,6 +243,7 @@ function searchSubgraphs({
236
243
  entity_count: r.entity_count,
237
244
  canonical_entities: JSON.parse(r.canonical_entities),
238
245
  powered_by_substreams: Boolean(r.powered_by_substreams),
246
+ active_allocation_count: r.active_allocation_count || 0,
239
247
  ...buildQueryEndpoints(r.id),
240
248
  });
241
249
  if (results.length >= limit) break;
@@ -279,7 +287,7 @@ function recommendSubgraph({ goal, chain = "" }) {
279
287
  .filter(([, kws]) => kws.some((k) => goalLower.includes(k)))
280
288
  .map(([t]) => t);
281
289
 
282
- const conditions = [];
290
+ const conditions = ["active_allocation_count > 0"];
283
291
  const params = [];
284
292
 
285
293
  if (chain) {
@@ -304,10 +312,10 @@ function recommendSubgraph({ goal, chain = "" }) {
304
312
  }
305
313
  }
306
314
 
307
- const where = conditions.length ? `WHERE ${conditions.join(" AND ")}` : "";
315
+ const where = `WHERE ${conditions.join(" AND ")}`;
308
316
  const sql = `
309
317
  SELECT id, display_name, description, auto_description, domain, protocol_type, network,
310
- reliability_score, ipfs_hash, canonical_entities
318
+ reliability_score, ipfs_hash, canonical_entities, active_allocation_count
311
319
  FROM subgraphs
312
320
  ${where}
313
321
  ORDER BY reliability_score DESC
@@ -330,6 +338,7 @@ function recommendSubgraph({ goal, chain = "" }) {
330
338
  reliability_score: r.reliability_score,
331
339
  ipfs_hash: r.ipfs_hash,
332
340
  canonical_entities: JSON.parse(r.canonical_entities),
341
+ active_allocation_count: r.active_allocation_count || 0,
333
342
  ...buildQueryEndpoints(r.id),
334
343
  });
335
344
  if (recommendations.length >= 5) break;