@kya-os/mcp-i 1.6.13 → 1.6.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.
@@ -56,7 +56,7 @@ class StatelessHttpServerTransport extends base_streamable_http_1.BaseHttpServer
56
56
  if (requestId === undefined || requestId === null) {
57
57
  // In stateless mode, we can't handle notifications without request IDs
58
58
  if (this.debug) {
59
- console.log("[StatelessHTTP] Dropping notification without request ID");
59
+ console.error("[StatelessHTTP] Dropping notification without request ID");
60
60
  }
61
61
  return;
62
62
  }
@@ -228,7 +228,7 @@ class StatelessStreamableHTTPTransport {
228
228
  }
229
229
  log(message, ...args) {
230
230
  if (this.debug) {
231
- console.log(`[StatelessHTTP] ${message}`, ...args);
231
+ console.error(`[StatelessHTTP] ${message}`, ...args);
232
232
  }
233
233
  }
234
234
  setupMiddleware(bodySizeLimit) {
@@ -306,14 +306,14 @@ class StatelessStreamableHTTPTransport {
306
306
  start() {
307
307
  const host = this.options.host || "127.0.0.1";
308
308
  this.server.listen(this.port, host, () => {
309
- console.log(`${cli_icons_1.greenCheck} MCP Server running on http://${host}:${this.port}${this.endpoint}`);
309
+ console.error(`${cli_icons_1.greenCheck} MCP Server running on http://${host}:${this.port}${this.endpoint}`);
310
310
  if (this.oauthProxy && this.debug) {
311
- console.log(`🔐 OAuth endpoints available:`);
312
- console.log(` Discovery: http://${host}:${this.port}/.well-known/oauth-authorization-server`);
313
- console.log(` Authorize: http://${host}:${this.port}/oauth2/authorize`);
314
- console.log(` Token: http://${host}:${this.port}/oauth2/token`);
315
- console.log(` Revoke: http://${host}:${this.port}/oauth2/revoke`);
316
- console.log(` Introspect: http://${host}:${this.port}/oauth2/introspect`);
311
+ console.error(`🔐 OAuth endpoints available:`);
312
+ console.error(` Discovery: http://${host}:${this.port}/.well-known/oauth-authorization-server`);
313
+ console.error(` Authorize: http://${host}:${this.port}/oauth2/authorize`);
314
+ console.error(` Token: http://${host}:${this.port}/oauth2/token`);
315
+ console.error(` Revoke: http://${host}:${this.port}/oauth2/revoke`);
316
+ console.error(` Introspect: http://${host}:${this.port}/oauth2/introspect`);
317
317
  }
318
318
  this.setupShutdownHandlers();
319
319
  });
@@ -92,7 +92,7 @@ class AudienceKeyEncryption {
92
92
  */
93
93
  static async importPrivateKey(privateKey) {
94
94
  const keyBytes = Buffer.from(privateKey, "base64");
95
- return await crypto_1.webcrypto.subtle.importKey("raw", keyBytes, {
95
+ return await crypto_1.webcrypto.subtle.importKey("pkcs8", keyBytes, {
96
96
  name: "X25519",
97
97
  }, false, ["deriveKey"]);
98
98
  }
@@ -107,7 +107,8 @@ class AudienceKeyEncryption {
107
107
  * Export private key to base64 string
108
108
  */
109
109
  static async exportPrivateKey(privateKey) {
110
- const keyBytes = await crypto_1.webcrypto.subtle.exportKey("raw", privateKey);
110
+ // X25519 private keys must be exported in PKCS8 format, not raw
111
+ const keyBytes = await crypto_1.webcrypto.subtle.exportKey("pkcs8", privateKey);
111
112
  return Buffer.from(keyBytes).toString("base64");
112
113
  }
113
114
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kya-os/mcp-i",
3
- "version": "1.6.13",
3
+ "version": "1.6.15",
4
4
  "description": "The TypeScript MCP framework with identity features built-in",
5
5
  "type": "commonjs",
6
6
  "main": "dist/index.js",
@@ -63,8 +63,8 @@
63
63
  "model-context-protocol"
64
64
  ],
65
65
  "dependencies": {
66
- "@kya-os/contracts": "^1.6.16",
67
- "@kya-os/mcp-i-core": "^1.3.23",
66
+ "@kya-os/contracts": "^1.6.18",
67
+ "@kya-os/mcp-i-core": "^1.3.25",
68
68
  "@modelcontextprotocol/sdk": "^1.11.4",
69
69
  "@swc/core": "^1.11.24",
70
70
  "@types/express": "^5.0.1",