From 85a9d0238c0cd69b88c567630964fffd26d6b83e Mon Sep 17 00:00:00 2001 From: Admin Date: Sun, 27 Sep 2026 09:42:55 +0000 Subject: [PATCH] fix(mcp): use v1 security scheme compatibility metadata --- apps/api/src/mcp.test.ts | 3 +-- apps/api/src/mcp.ts | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/api/src/mcp.test.ts b/apps/api/src/mcp.test.ts index d8080bb..dad8f45 100644 --- a/apps/api/src/mcp.test.ts +++ b/apps/api/src/mcp.test.ts @@ -14,10 +14,9 @@ describe('FieldLens MCP telemetry', () => { expect(tools.map((tool) => tool.name)).toEqual(['list_print_captures']) expect(tools[0]?.annotations?.readOnlyHint).toBe(true) expect(tools[0]?.inputSchema.properties?.limit).toBeDefined() - expect(tools[0]?.securitySchemes).toEqual([ + expect(tools[0]?._meta?.securitySchemes).toEqual([ { type: 'oauth2', scopes: [...FIELDLENS_MCP_OAUTH_SCOPES] }, ]) - expect(tools[0]?._meta?.securitySchemes).toEqual(tools[0]?.securitySchemes) } finally { await client.close() await server.close() diff --git a/apps/api/src/mcp.ts b/apps/api/src/mcp.ts index 233bc3f..1e3ebcf 100644 --- a/apps/api/src/mcp.ts +++ b/apps/api/src/mcp.ts @@ -18,7 +18,6 @@ export function createFieldLensMcpServer() { description: 'Read recent FieldLens printer capture diagnostics for the authorized tenant. No print document or barcode values are included.', inputSchema: { limit: z.number().int().min(1).max(200).optional() }, annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: false }, - securitySchemes: [{ type: 'oauth2', scopes: [...FIELDLENS_MCP_OAUTH_SCOPES] }], _meta: { securitySchemes: [{ type: 'oauth2', scopes: [...FIELDLENS_MCP_OAUTH_SCOPES] }], },