@nexusbloom/mcp-server 1.0.0 → 1.0.1
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/index.js +37 -9
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -363,16 +363,44 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
363
363
|
// ---- Start ----
|
|
364
364
|
async function main() {
|
|
365
365
|
try {
|
|
366
|
-
// Verify API connectivity
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
366
|
+
// Verify API connectivity — try multiple possible API URLs
|
|
367
|
+
const apiUrlCandidates = [
|
|
368
|
+
API_URL,
|
|
369
|
+
API_URL.replace("/api", ""), // base domain without /api
|
|
370
|
+
];
|
|
371
|
+
|
|
372
|
+
let connected = false;
|
|
373
|
+
for (const url of apiUrlCandidates) {
|
|
374
|
+
try {
|
|
375
|
+
const testUrl = url.includes("/api") ? `${url}/tools` : `${url}/api/tools`;
|
|
376
|
+
const res = await fetch(testUrl, { ...FETCH_OPTS });
|
|
377
|
+
if (res.ok || res.status === 429) {
|
|
378
|
+
console.error(`NexusBloom MCP server connected to ${url}`);
|
|
379
|
+
connected = true;
|
|
380
|
+
break;
|
|
381
|
+
} else if (res.status === 404) {
|
|
382
|
+
// Try without /tools path
|
|
383
|
+
const res2 = await fetch(url, { ...FETCH_OPTS });
|
|
384
|
+
if (res2.ok) {
|
|
385
|
+
console.error(`NexusBloom MCP server connected to ${url}`);
|
|
386
|
+
connected = true;
|
|
387
|
+
break;
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
} catch (_) {
|
|
391
|
+
// Continue to next candidate
|
|
373
392
|
}
|
|
374
|
-
}
|
|
375
|
-
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
if (!connected) {
|
|
396
|
+
console.error(
|
|
397
|
+
`WARNING: Could not reach NexusBloom API. ` +
|
|
398
|
+
`The MCP server will start in degraded mode — tool execution requires a working API.\n` +
|
|
399
|
+
`Checked endpoints:\n` +
|
|
400
|
+
apiUrlCandidates.map(u => ` - ${u.includes("/api") ? `${u}/tools` : `${u}/api/tools`}`).join("\n") + "\n" +
|
|
401
|
+
`To fix: ensure NEXUSBLOOM_API_URL is set correctly (default: https://nexusbloom.dev/api)\n` +
|
|
402
|
+
`Or deploy the platform API and verify the Vercel rewrite from your frontend project.`
|
|
403
|
+
);
|
|
376
404
|
}
|
|
377
405
|
|
|
378
406
|
const transport = new StdioServerTransport();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nexusbloom/mcp-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "MCP server for NexusBloom — AI agents discover and execute tools through a single interface. No Supabase credentials needed, just connect to our API.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -13,4 +13,4 @@
|
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@modelcontextprotocol/sdk": "^1.8.0"
|
|
15
15
|
}
|
|
16
|
-
}
|
|
16
|
+
}
|