@lifeaitools/clauth 1.5.12 → 1.5.13

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.
@@ -3087,12 +3087,16 @@ function createServer(initPassword, whitelist, port, tunnelHostnameInit = null,
3087
3087
  }
3088
3088
 
3089
3089
  if (rpcMethod === "initialize") {
3090
+ // Echo back the client's requested protocol version (negotiate down if needed)
3091
+ const clientVersion = req.headers["mcp-protocol-version"] || body.params?.protocolVersion || "2025-03-26";
3092
+ const SUPPORTED = ["2025-11-25", "2025-03-26"];
3093
+ const protocolVersion = SUPPORTED.includes(clientVersion) ? clientVersion : "2025-03-26";
3090
3094
  const result = {
3091
- protocolVersion: "2025-03-26",
3095
+ protocolVersion,
3092
3096
  serverInfo: { name: serverNameForPath(reqPath), version: VERSION },
3093
3097
  capabilities: { tools: {} }
3094
3098
  };
3095
- res.writeHead(200, { "Content-Type": "application/json", ...CORS });
3099
+ res.writeHead(200, { "Content-Type": "application/json", "mcp-protocol-version": protocolVersion, ...CORS });
3096
3100
  return res.end(JSON.stringify({ jsonrpc: "2.0", id, result }));
3097
3101
  }
3098
3102
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lifeaitools/clauth",
3
- "version": "1.5.12",
3
+ "version": "1.5.13",
4
4
  "description": "Hardware-bound credential vault for the LIFEAI infrastructure stack",
5
5
  "type": "module",
6
6
  "bin": {