Documentation Index
Fetch the complete documentation index at: https://terminal49-codex-data-8540-workos-only-mcp-auth.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Hosted HTTP OAuth Test Plan
Use this plan to validate the hosted MCP OAuth implementation in the Terminal49 monorepo.Test Objectives
- Verify all phase 1 OAuth requirements for hosted MCP.
- Prove compatibility with both target client tracks:
- Claude/local-agent path
- ChatGPT app path
- Validate safe migration from legacy API token auth to OAuth.
- Validate RFC-compliant OAuth challenge semantics (
WWW-Authenticate+resource_metadata).
Test Tracks
| Track | Purpose |
|---|---|
| Unit | PKCE, token lifecycle, scope checks, replay protections |
| Integration (Rails) | OAuth endpoint behavior and error handling |
| Integration (MCP) | /mcp bearer validation and auth semantics |
| End-to-End Client | Real OAuth flow and MCP calls from target clients |
| Security | Abuse/replay/redirect/state attack resistance |
| Rollout/Operations | Metrics, deprecation readiness, regression watch |
Requirement Traceability Matrix
| Requirement | Unit | Integration | E2E | Security |
|---|---|---|---|---|
MCP-OAUTH-001 | - | Yes | Yes | - |
MCP-OAUTH-002 | - | Yes | Yes | - |
MCP-OAUTH-003 | Yes | Yes | Yes | Yes |
MCP-OAUTH-004 | Yes | Yes | Yes | Yes |
MCP-OAUTH-005 | Yes | Yes | Yes | - |
MCP-OAUTH-006 | - | Yes | Yes | - |
MCP-OAUTH-007 | Yes | Yes | - | Yes |
MCP-OAUTH-008 | Yes | Yes | - | Yes |
MCP-OAUTH-009 | - | Yes | Yes | Yes |
MCP-OAUTH-010 | - | Yes | Yes | - |
MCP-OAUTH-011 | - | Yes | Yes | - |
MCP-OAUTH-012 | - | Yes | Yes | - |
MCP-OAUTH-013 | - | Yes | - | Yes |
MCP-OAUTH-014 | - | - | Yes | - |
MCP-OAUTH-015 | - | Yes | - | - |
Core Test Cases
OAuth Endpoint Integration
AUTH-001Valid auth code + PKCE exchange returns access and refresh tokens.AUTH-002Missing PKCE verifier fails token exchange.AUTH-003Reused authorization code is rejected.AUTH-004Invalid redirect URI is rejected.AUTH-005Invalidstateis rejected.AUTH-006Refresh token rotates and old refresh token is invalidated.AUTH-007Revoked token cannot be used at/mcp.AUTH-008Discovery metadata endpoints return expected values.
MCP Auth Integration
MCP-001Valid OAuth token succeeds forinitialize.MCP-002Valid OAuth token succeeds fortools/list.MCP-003Valid OAuth token succeeds fortools/call.MCP-004Expired token returns401withWWW-Authenticate.MCP-005Missing token returns401withWWW-Authenticate.MCP-006Wrong scope returns401or403per contract and is logged.MCP-007Legacy API token succeeds during dual-mode and emitsauth_type=legacy_api_token.
Security Tests
SEC-001Authorization code replay attempt is blocked.SEC-002Refresh token replay marks token chain compromised and blocks reuse.SEC-003Redirect URI tampering attempt is blocked.SEC-004CSRF/state mismatch is blocked.SEC-005PKCE downgrade/non-S256is blocked.SEC-006Auth endpoint rate limits trigger under abuse load.
Client Certification Scenarios
Claude / Local-Agent Certification
- Configure client with registered OAuth app and redirect URI.
- Complete OAuth sign-in and consent.
- Run MCP handshake (
initialize,tools/list). - Execute one read-only tool and one write-like tracking tool.
- Force token expiry and verify refresh path succeeds.
- Confirm no fallback to legacy token was required.
ChatGPT App Certification
- Configure ChatGPT app OAuth settings with registered Terminal49 client.
- Complete OAuth sign-in and consent.
- Confirm app can call hosted MCP endpoint with issued access token.
- Validate refresh and revoke behavior in app session lifecycle.
- Verify auth failures are actionable and standards-compliant.
Rollout Validation
Track these metrics during dual-mode:- OAuth auth success rate
- OAuth token issuance and refresh success
/mcpauth failures by reason- Legacy-token request share over time
- Per-client error rate (Claude app vs ChatGPT app)
- Median and p95 auth latency for
/oauth/tokenand/mcp
Quick Smoke Validation
For repeatable smoke checks, run the OAuth E2E Smoke Test runbook and script.Exit Criteria (GA Gate)
All must pass:- All
AUTH-*,MCP-*, andSEC-*critical tests green. - Claude/local-agent and ChatGPT certifications completed and documented.
- Legacy-token migration adoption target met.
- No open critical vulnerabilities in OAuth or auth middleware.
- Deprecation date for legacy API token auth communicated and approved.