keryx 0.12.4 → 0.13.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.
@@ -382,7 +382,13 @@ function createMcpServer(): McpServer {
382
382
 
383
383
  const clientIp = (authInfo?.extra?.ip as string) || "unknown";
384
384
  const mcpSessionId = extra.sessionId || "";
385
- const connection = new Connection("mcp", clientIp, randomUUID());
385
+ const connection = new Connection(
386
+ "mcp",
387
+ clientIp,
388
+ randomUUID(),
389
+ undefined,
390
+ authInfo?.token,
391
+ );
386
392
 
387
393
  try {
388
394
  // If Bearer token was verified, set up authenticated session
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "keryx",
3
- "version": "0.12.4",
3
+ "version": "0.13.1",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -77,6 +77,10 @@ export function buildResponse(
77
77
  status = 200,
78
78
  requestOrigin?: string,
79
79
  ) {
80
+ if (response instanceof Response) {
81
+ return response;
82
+ }
83
+
80
84
  return new Response(JSON.stringify(response, null, 2) + EOL, {
81
85
  status,
82
86
  headers: buildHeaders(connection, requestOrigin),