This document lists all TeamServer API routes that the MCP server uses and would need to support OAuth2 bearer token authentication for the MCP server to be hosted publicly.
GET /ng/{orgId}/applications?base=false&expand=metadata,technologies,skip_links- List all applicationsGET /ng/{orgId}/applications/{appId}?expand=...- Get single application detailsGET /ng/{orgId}/applications/filter?...- Filter applications
POST /ng/{orgId}/traces/{appId}/filter?expand=session_metadata,server_environments- Get traces/vulnerabilities for appPOST /ng/{orgId}/orgtraces/filter/?expand=session_metadata,server_environments- Get traces across organizationGET /ng/{orgId}/traces/{traceId}/recommendation- Get remediation recommendationGET /ng/{orgId}/traces/{traceId}/httprequest- Get HTTP request that triggered vulnerabilityGET /ng/{orgId}/traces/{traceId}/events/summary- Get event summary for traceGET /ng/{orgId}/traces/{traceId}/story- Get vulnerability storyGET /ng/{orgId}/rules- Get vulnerability rules/types
GET /ng/{orgId}/metadata/session/{appId}/filters?modules={appId}- Get session metadata filtersGET /ng/organizations/{orgId}/applications/{appId}/agent-sessions/latest- Get latest session metadata (custom route)
GET /ng/{orgId}/applications/{appId}/libraries/filter?limit={n}&expand=vulns- Get libraries for applicationGET /ng/{orgId}/libraries/filter?...- Get libraries at org levelGET /ng/organizations/{orgId}/cves/{cveId}- Get applications vulnerable to CVE (custom route)GET /ng/organizations/{orgId}/applications/{appId}/libraries/{libraryId}/reports/library-usage?offset={n}&limit={n}&sortBy=lastObservedTime&sortDirection=DESC- Get library observations (custom route)
GET /ng/{orgId}/applications/{appId}/route?sort=-exercised- Get route coveragePOST /ng/{orgId}/applications/{appId}/route/filter?expand=observations- Get route coverage with metadata filterGET /ng/{orgId}/applications/{appId}/route/{routeHash}/observations?expand=skip_links,session_metadata- Get route details (custom route)
GET /ng/{orgId}/protection/policy/{appId}?expand=skip_links- Get protect/ADR rules (custom route)POST /ng/{orgId}/attacks?expand=skip_links&limit={n}&offset={n}&sort={sort}- Get attacks (custom route)
- Scan-related routes via scan manager (delegated to scan API gateway, likely separate from TeamServer OAuth)
GET /ng/profile/organizations- Get user's organizationsGET /ng/{orgId}/users?expand=login,signup- Get organization usersGET /ng/global/properties- Get global properties
- Applications: 3 routes
- Vulnerabilities: 5 routes
- Session metadata: 2 routes
- Libraries/SCA: 2 routes
- Route coverage: 2 routes
- ADR/Protect: 1 route
- User/Org data: 3 routes
- Library observations: 1 route (custom)
- CVE data: 1 route (custom)
- Route details: 1 route (custom)
- Latest session: 1 route (custom)
- Protect policy: 1 route (custom)
- Trace filtering: 2 routes (app-level and org-level)
- Route coverage with metadata: 1 route
- Attacks: 1 route (custom)
These routes are essential for basic MCP server operation:
- All vulnerability/trace routes (
/ng/{orgId}/traces/*,/ng/{orgId}/orgtraces/*) - Application routes (
/ng/{orgId}/applications/*) - Library routes (
/ng/{orgId}/libraries/*,/ng/{orgId}/applications/{appId}/libraries/*)
These routes enable additional MCP server features:
- Route coverage routes
- Session metadata routes
- ADR/Protect routes and attacks endpoint
- Library observations and CVE routes
These routes are less critical or may have alternative implementations:
- User/org management routes
- SAST scan routes (may use separate auth service)
- Custom routes are those not part of the standard Contrast SDK but implemented directly in the MCP server's SDKExtension class
- All routes currently use the legacy API key authentication (Authorization header with API key, service key, and username)
- For OAuth2 implementation, these routes would need to accept
Authorization: Bearer {access_token}headers - The MCP server makes requests to these endpoints on behalf of authenticated users
- RBAC (Role-Based Access Control) checks should remain in place after OAuth2 implementation
When the MCP server is hosted publicly with OAuth2:
- User authenticates via OAuth2 authorization code flow with PKCE
- MCP server receives access token
- MCP server includes access token in
Authorization: Bearer {token}header for all TeamServer API requests - TeamServer validates the JWT token and extracts user identity
- TeamServer applies existing RBAC checks based on user identity from token
The access token JWT should contain at minimum:
userId- User ID for RBAC checksuserUid- User email/identifieruserName- Display nameorganizationMemberships- Organizations the user has access to- Standard claims:
iss,sub,aud,exp,iat,jti
The OAuth2 implementation should maintain backwards compatibility with existing API key authentication to avoid breaking existing integrations.