@codai/axiom-mcp 1.0.13 → 1.0.15
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/dist/mcp-stdio.js +24 -4
- package/package.json +1 -1
package/dist/mcp-stdio.js
CHANGED
|
@@ -338,11 +338,31 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
338
338
|
}
|
|
339
339
|
});
|
|
340
340
|
async function main() {
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
console.error(
|
|
341
|
+
console.error("[AXIOM MCP] Starting server initialization...");
|
|
342
|
+
console.error(`[AXIOM MCP] Process: Node ${process.version}, PID ${process.pid}`);
|
|
343
|
+
console.error(`[AXIOM MCP] Working directory: ${process.cwd()}`);
|
|
344
|
+
// CRITICAL: Give VS Code time to attach stdio pipes
|
|
345
|
+
// Without this delay, VS Code may miss early stderr output
|
|
346
|
+
await new Promise(resolve => setTimeout(resolve, 100));
|
|
347
|
+
console.error("[AXIOM MCP] Stdio pipes ready, proceeding with initialization...");
|
|
348
|
+
try {
|
|
349
|
+
const transport = new StdioServerTransport();
|
|
350
|
+
console.error("[AXIOM MCP] Transport created, connecting...");
|
|
351
|
+
await server.connect(transport);
|
|
352
|
+
console.error("[AXIOM MCP] Server connected successfully");
|
|
353
|
+
console.error(`[AXIOM MCP] Version ${MCP_VERSION}, Engine ${packageJson.dependencies?.["@codai/axiom-engine"]}`);
|
|
354
|
+
console.error("[AXIOM MCP] Ready to receive requests via stdio");
|
|
355
|
+
console.error("[AXIOM MCP] Waiting for initialize request from client...");
|
|
356
|
+
// Keep process alive - MCP SDK handles stdin/stdout
|
|
357
|
+
// No explicit exit - let MCP SDK manage lifecycle
|
|
358
|
+
}
|
|
359
|
+
catch (error) {
|
|
360
|
+
console.error("[AXIOM MCP] FATAL - Initialization failed:", error.message || String(error));
|
|
361
|
+
console.error("[AXIOM MCP] Stack trace:", error.stack);
|
|
362
|
+
process.exit(1);
|
|
363
|
+
}
|
|
344
364
|
}
|
|
345
365
|
main().catch((error) => {
|
|
346
|
-
console.error("
|
|
366
|
+
console.error("[AXIOM MCP] FATAL - Uncaught error in main():", error);
|
|
347
367
|
process.exit(1);
|
|
348
368
|
});
|