Task — engineering-spec@1

"MCP Protected Resource Metadata (RFC 9728) well-known endpoint"

doneTASK-MCP-005
module mcp · class product · priority p0 · created 2026-05-17 · shipped null
depends on TASK-MCP-004 · blocks none

TASK-MCP-005: MCP Protected Resource Metadata (RFC 9728)

Summary

Serve RFC 9728 Protected Resource Metadata so MCP clients discovering a 401 can learn the authorization server and audience. As-built: pure builders in services/mcp-gateway/src/oauth/prm.rs, public routes on router.rs for aggregate + per-module documents, RS256-only alg advertisement, ETag/Cache-Control, and router tests for public JSON / 304 / unknown-module 404.

Problem

The engineering-spec claimed a standalone services/mcp/src/prm/ tree, drift-log migration, eight prm_* integration tests, four-issuer residency list, EdDSA, rate limits, and OTel p95. None of that matches HEAD: PRM lives inside the oauth module, tests are in-crate / router tests, and the gateway is its own single issuer today.

Proposed Solution

Adopt oauth::prm:

Alternatives Considered

Success Metrics

Scope

In scope:

Out of scope / Non-Goals

Dependencies

depends_on: [TASK-MCP-004]. Soft: TASK-MCP-002 registry for per-module scopes; TASK-AUTH-004 JWKS/issuer alignment.

1. Description (normative)

Acceptance criteria

Verification

cd services && cargo test -p cyberos-mcp-gateway prm
cd services && cargo test -p cyberos-mcp-gateway --lib router::tests::prm_
cd services && cargo test -p cyberos-mcp-gateway --lib router::tests::www_authenticate_challenge_points_at_the_prm
PathCovers
src/oauth/prm.rs unit testsDocument shape, algs, scopes, etag
src/router.rs prm_* / www_authenticate testsHTTP surface

AI Authorship Disclosure


batch/9a-mcp adopt — TASK-MCP-005 re-spec against as-built oauth PRM.