LearnNewsExamplesServices
Frontmatter
id9561
titleAdd Functional Tests for MCP Authorization and Refine Error Handling
stateClosed
labels
enhancementaitesting
assigneestobiu
createdAtMar 26, 2026, 3:24 PM
updatedAtMar 26, 2026, 3:25 PM
githubUrlhttps://github.com/neomjs/neo/issues/9561
authortobiu
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtMar 26, 2026, 3:25 PM

Add Functional Tests for MCP Authorization and Refine Error Handling

Closed v12.1.0 enhancementaitesting
tobiu
tobiu commented on Mar 26, 2026, 3:24 PM

Add functional Playwright tests to verify the OIDC/OAuth 2.1 authorization implementation for Neo.mjs MCP servers.

Scope:

  • Create test/playwright/unit/ai/mcp/Authorization.spec.mjs which mocks an OIDC provider and verifies the MCP server's response to valid/invalid tokens and CORS requests.
  • Refine Server.mjs to use the SDK's InvalidTokenError for consistent 401 status codes.
  • Fix content negotiation requirements for the SSE transport in tests.
tobiu added the enhancement label on Mar 26, 2026, 3:24 PM
tobiu added the ai label on Mar 26, 2026, 3:24 PM
tobiu added the testing label on Mar 26, 2026, 3:24 PM
tobiu referenced in commit cdb6de4 - "Add functional tests for MCP authorization and refine error handling (#9561)" on Mar 26, 2026, 3:25 PM
tobiu closed this issue on Mar 26, 2026, 3:25 PM
tobiu assigned to @tobiu on Mar 26, 2026, 3:25 PM
tobiu
tobiu Mar 26, 2026, 3:25 PM

Functional tests implemented in test/playwright/unit/ai/mcp/Authorization.spec.mjs. Verified OIDC/OAuth 2.1 flow, CORS, and error handling.