@troxy/cli 0.1.7 → 0.1.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/package.json +1 -1
- package/src/mcp-server.js +6 -4
package/package.json
CHANGED
package/src/mcp-server.js
CHANGED
|
@@ -105,12 +105,14 @@ export async function runMcp() {
|
|
|
105
105
|
};
|
|
106
106
|
});
|
|
107
107
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
// Heartbeat: tell the dashboard this MCP server is active
|
|
108
|
+
// Heartbeat: tell the dashboard this MCP server is active.
|
|
109
|
+
// Must be set up before server.connect() since stdio transport keeps the
|
|
110
|
+
// event loop running but connect() may not return in all environments.
|
|
112
111
|
const sendHeartbeat = () =>
|
|
113
112
|
api.mcpHeartbeat(apiKey).catch(() => {}); // silent — don't crash MCP on network error
|
|
114
113
|
sendHeartbeat();
|
|
115
114
|
setInterval(sendHeartbeat, 60_000);
|
|
115
|
+
|
|
116
|
+
const transport = new StdioServerTransport();
|
|
117
|
+
await server.connect(transport);
|
|
116
118
|
}
|