@gremlin/mcp-server 2.2.2 → 2.3.0
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/Readme.md +7 -0
- package/build/main.mjs +14 -4
- package/package.json +1 -1
package/Readme.md
CHANGED
|
@@ -18,6 +18,13 @@ This MCP server provides access to Gremlin's reliability testing and management
|
|
|
18
18
|
- Node.js 18 or higher
|
|
19
19
|
- A valid [Gremlin API key](https://app.gremlin.com/settings/api-keys)
|
|
20
20
|
|
|
21
|
+
### Environment Variables
|
|
22
|
+
|
|
23
|
+
| Variable | Required | Default | Description |
|
|
24
|
+
| --- | --- | --- | --- |
|
|
25
|
+
| `GREMLIN_API_KEY` | Yes | — | Your Gremlin API key. The server exits immediately if this is missing. |
|
|
26
|
+
| `GREMLIN_SERVICE_URL` | No | `https://api.gremlin.com/v1` | Base URL for the Gremlin API, including the version prefix. Override to target a staging or self-hosted environment. |
|
|
27
|
+
|
|
21
28
|
### Claude Desktop
|
|
22
29
|
|
|
23
30
|
Go to Claude Settings > Developer and add the following to your `claude_desktop_config.json`:
|
package/build/main.mjs
CHANGED
|
@@ -21589,10 +21589,20 @@ var StdioServerTransport = class {
|
|
|
21589
21589
|
|
|
21590
21590
|
// src/client/gremlin.ts
|
|
21591
21591
|
var import_ttlcache = __toESM(require_ttlcache(), 1);
|
|
21592
|
+
|
|
21593
|
+
// src/config.ts
|
|
21594
|
+
var DEFAULT_SERVICE_URL = "https://api.gremlin.com/v1";
|
|
21595
|
+
function getServiceUrl() {
|
|
21596
|
+
const configured = process.env.GREMLIN_SERVICE_URL?.trim();
|
|
21597
|
+
if (!configured) return DEFAULT_SERVICE_URL;
|
|
21598
|
+
return configured.replace(/\/+$/, "");
|
|
21599
|
+
}
|
|
21600
|
+
|
|
21601
|
+
// src/client/gremlin.ts
|
|
21592
21602
|
var GremlinApi = class {
|
|
21593
21603
|
constructor() {
|
|
21594
|
-
this.baseUrl =
|
|
21595
|
-
this.userAgent = "@gremlin/gremlin-mcp/2.
|
|
21604
|
+
this.baseUrl = getServiceUrl();
|
|
21605
|
+
this.userAgent = "@gremlin/gremlin-mcp/2.3.0";
|
|
21596
21606
|
this.cache = new import_ttlcache.default();
|
|
21597
21607
|
}
|
|
21598
21608
|
async listUsers() {
|
|
@@ -22291,7 +22301,7 @@ function createGetAttackSummaryTool(api) {
|
|
|
22291
22301
|
}
|
|
22292
22302
|
|
|
22293
22303
|
// src/openapi/spec-loader.ts
|
|
22294
|
-
var
|
|
22304
|
+
var SPEC_PATH = "openapi.json";
|
|
22295
22305
|
var HTTP_METHODS = ["get", "post", "put", "delete", "patch"];
|
|
22296
22306
|
var SPEC_TTL_MS = 60 * 60 * 1e3;
|
|
22297
22307
|
var cachedSpec = null;
|
|
@@ -22313,7 +22323,7 @@ async function getSpec() {
|
|
|
22313
22323
|
return specFetchPromise;
|
|
22314
22324
|
}
|
|
22315
22325
|
async function fetchSpec() {
|
|
22316
|
-
const res = await fetch(
|
|
22326
|
+
const res = await fetch(`${getServiceUrl()}/${SPEC_PATH}`);
|
|
22317
22327
|
if (!res.ok) {
|
|
22318
22328
|
throw new Error(`Failed to fetch Gremlin OpenAPI spec: HTTP ${res.status}`);
|
|
22319
22329
|
}
|