subgraph-registry-mcp 0.9.7 → 0.9.8
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/openapi.json +1 -1
- package/openapi.yaml +1 -1
- package/package.json +3 -2
- package/src/index.js +30 -3
package/data/openapi.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "Subgraph Registry",
|
|
5
5
|
"description": "Agent-friendly subgraph discovery on The Graph Network. 15,330 classified subgraphs with semantic search, reliability scoring, 30-day query volume and schema-evolution tracking. Discovery only: returns subgraph ids and starter queries, which you run with a Graph Studio API key (Authorization: Bearer) or over x402 ($0.01 USDC on Base, no key).",
|
|
6
|
-
"version": "0.9.
|
|
6
|
+
"version": "0.9.8",
|
|
7
7
|
"license": {
|
|
8
8
|
"name": "MIT"
|
|
9
9
|
},
|
package/openapi.yaml
CHANGED
|
@@ -5,7 +5,7 @@ openapi: "3.1.0"
|
|
|
5
5
|
info:
|
|
6
6
|
title: "Subgraph Registry"
|
|
7
7
|
description: "Agent-friendly subgraph discovery on The Graph Network. 15,330 classified subgraphs with semantic search, reliability scoring, 30-day query volume and schema-evolution tracking. Discovery only: returns subgraph ids and starter queries, which you run with a Graph Studio API key (Authorization: Bearer) or over x402 ($0.01 USDC on Base, no key)."
|
|
8
|
-
version: "0.9.
|
|
8
|
+
version: "0.9.8"
|
|
9
9
|
license:
|
|
10
10
|
name: "MIT"
|
|
11
11
|
contact:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "subgraph-registry-mcp",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.8",
|
|
4
4
|
"mcpName": "io.github.PaulieB14/subgraph-registry-mcp",
|
|
5
5
|
"description": "MCP server for agent-friendly subgraph discovery on The Graph Network. 15,330 classified subgraphs with reliability scoring, 30-day query volume, semantic search and protocol classification. Discovery only — returns subgraph ids and ready-to-run queries for you to run with a Graph Studio key or over x402.",
|
|
6
6
|
"type": "module",
|
|
@@ -20,7 +20,8 @@
|
|
|
20
20
|
"start:http-only": "node src/index.js --http-only",
|
|
21
21
|
"test": "node --test test/",
|
|
22
22
|
"sync:server": "node scripts/sync-server-json.js",
|
|
23
|
-
"version": "node scripts/sync-server-json.js && node scripts/gen-openapi.js && git add server.json openapi.yaml data/openapi.json"
|
|
23
|
+
"version": "node scripts/sync-server-json.js && node scripts/gen-openapi.js && git add server.json openapi.yaml data/openapi.json",
|
|
24
|
+
"smoke": "node scripts/smoke-bin.mjs"
|
|
24
25
|
},
|
|
25
26
|
"keywords": [
|
|
26
27
|
"mcp",
|
package/src/index.js
CHANGED
|
@@ -24,7 +24,7 @@ import Database from "better-sqlite3";
|
|
|
24
24
|
import express from "express";
|
|
25
25
|
import { fileURLToPath, pathToFileURL } from "url";
|
|
26
26
|
import { basename, dirname, join } from "path";
|
|
27
|
-
import { existsSync, mkdirSync, readFileSync, unlinkSync, writeFileSync } from "fs";
|
|
27
|
+
import { existsSync, mkdirSync, readFileSync, realpathSync, unlinkSync, writeFileSync } from "fs";
|
|
28
28
|
import { get as httpsGet } from "https";
|
|
29
29
|
import { createHash } from "crypto";
|
|
30
30
|
|
|
@@ -1856,10 +1856,37 @@ export { TOOLS };
|
|
|
1856
1856
|
// the MCP server or open the SQLite file. Use pathToFileURL so the
|
|
1857
1857
|
// comparison works on Windows where process.argv[1] uses backslashes
|
|
1858
1858
|
// while import.meta.url is forward-slashed.
|
|
1859
|
+
// Whether this file was RUN, as opposed to imported (scripts/gen-openapi.js
|
|
1860
|
+
// imports it for TOOLS[] and must not spawn a server).
|
|
1861
|
+
//
|
|
1862
|
+
// This has to compare real paths. npm installs a bin as a symlink —
|
|
1863
|
+
// node_modules/.bin/subgraph-registry-mcp -> ../subgraph-registry-mcp/src/index.js
|
|
1864
|
+
// — and Node sets import.meta.url to the RESOLVED target while argv[1] keeps
|
|
1865
|
+
// the symlink. So the old comparison was:
|
|
1866
|
+
//
|
|
1867
|
+
// pathToFileURL(argv[1]) = file:///…/node_modules/.bin/subgraph-registry-mcp
|
|
1868
|
+
// import.meta.url = file:///…/subgraph-registry-mcp/src/index.js
|
|
1869
|
+
// basename(argv[1]) = "subgraph-registry-mcp" (not "index.js")
|
|
1870
|
+
//
|
|
1871
|
+
// Both branches false, so main() never ran: the process exited 0, instantly,
|
|
1872
|
+
// silently, and every MCP host reported "Connection closed" with 0 tools. It
|
|
1873
|
+
// worked in local testing only because `node src/index.js` satisfies the
|
|
1874
|
+
// basename fallback — which is exactly why no test caught it. The package has
|
|
1875
|
+
// never once started over npx.
|
|
1876
|
+
//
|
|
1877
|
+
// realpathSync collapses the symlink on both sides, so npx, `npm i -g`, a
|
|
1878
|
+
// direct path and a symlinked directory all agree. Note the URL comparison was
|
|
1879
|
+
// already unreliable on its own: on macOS a /var path resolves to /private/var,
|
|
1880
|
+
// so even a direct run failed that branch and survived on the basename check.
|
|
1859
1881
|
const _isMain =
|
|
1860
1882
|
process.argv[1] !== undefined &&
|
|
1861
|
-
(
|
|
1862
|
-
|
|
1883
|
+
(() => {
|
|
1884
|
+
try {
|
|
1885
|
+
return realpathSync(process.argv[1]) === realpathSync(__filename);
|
|
1886
|
+
} catch {
|
|
1887
|
+
return false;
|
|
1888
|
+
}
|
|
1889
|
+
})();
|
|
1863
1890
|
|
|
1864
1891
|
if (_isMain) {
|
|
1865
1892
|
main().catch((err) => {
|