mcp-server-kubernetes 2.4.0 → 2.4.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.
Files changed (2) hide show
  1. package/dist/utils/sse.js +11 -3
  2. package/package.json +1 -1
package/dist/utils/sse.js CHANGED
@@ -21,7 +21,15 @@ export function startSSEServer(server) {
21
21
  .send("Not found. Must pass valid sessionId as query param.");
22
22
  }
23
23
  });
24
- const port = process.env.PORT || 3000;
25
- app.listen(port);
26
- console.log(`mcp-kubernetes-server is listening on port ${port}\nUse the following url to connect to the server:\n\http://localhost:${port}/sse`);
24
+ let port = 3000;
25
+ try {
26
+ port = parseInt(process.env.PORT || "3000", 10);
27
+ }
28
+ catch (e) {
29
+ console.error("Invalid PORT environment variable, using default port 3000.");
30
+ }
31
+ const host = process.env.HOST || "localhost";
32
+ app.listen(port, host, () => {
33
+ console.log(`mcp-kubernetes-server is listening on port ${port}\nUse the following url to connect to the server:\n\http://${host}:${port}/sse`);
34
+ });
27
35
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-server-kubernetes",
3
- "version": "2.4.0",
3
+ "version": "2.4.1",
4
4
  "description": "MCP server for interacting with Kubernetes clusters via kubectl",
5
5
  "license": "MIT",
6
6
  "type": "module",