Skip to content

feat: support protected resource metadata for mcp server #67

feat: support protected resource metadata for mcp server

feat: support protected resource metadata for mcp server #67

Triggered via pull request June 10, 2025 01:09
Status Failure
Total duration 28s
Artifacts

codecov.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

6 errors
codecov
Process completed with exit code 1.
src/index.test.ts > MCPAuth class (init) > should not throw an error if the server configuration is valid with warnings: packages/mcp-auth/src/index.test.ts#L53
AssertionError: expected "warn" to be called with arguments: [ Array(1) ] Received: 1st warn call: [ - "The authorization server configuration has warnings: - - - Dynamic Client Registration (RFC 7591) is not supported by the server. - ", + "The `server` config is deprecated. Please migrate to using only `protectedResource`.", ] 2nd warn call: [ - "The authorization server configuration has warnings: + "The authorization server (issuer: `https://example.com`) configuration has warnings: - Dynamic Client Registration (RFC 7591) is not supported by the server. ", ] Number of calls: 2 ❯ src/index.test.ts:53:28
src/index.test.ts > MCPAuth class (init) > should throw an error if the server configuration is empty or not an object: packages/mcp-auth/src/index.test.ts#L8
Error: Snapshot `MCPAuth class (init) > should throw an error if the server configuration is empty or not an object 1` mismatched Expected: "[MCPAuthAuthServerError: The server configuration does not match the MCP specification.]" Received: "[TypeError: Cannot destructure property 'issuer' of 'authServer.metadata' as it is null.]" ❯ src/index.test.ts:8:63
src/index.integration.test.ts > MCPAuth class (bearerAuth) > should return 401 if the token is invalid: packages/mcp-auth/src/index.integration.test.ts#L76
Error: expected 401 "Unauthorized", got 500 "Internal Server Error" ❯ src/index.integration.test.ts:76:86 ❯ Test._assertStatus ../../node_modules/.pnpm/supertest@7.1.0/node_modules/supertest/lib/test.js:267:14 ❯ ../../node_modules/.pnpm/supertest@7.1.0/node_modules/supertest/lib/test.js:323:13 ❯ Test._assertFunction ../../node_modules/.pnpm/supertest@7.1.0/node_modules/supertest/lib/test.js:300:13 ❯ Test.assert ../../node_modules/.pnpm/supertest@7.1.0/node_modules/supertest/lib/test.js:179:23 ❯ Server.localAssert ../../node_modules/.pnpm/supertest@7.1.0/node_modules/supertest/lib/test.js:135:14