Handling Protected Resource Metadata Discovery for Auth for MCP With Auth0

Overview

When implementing Auth for Model Context Protocol (MCP) with Auth0, Protected Resource Metadata (PRM) discovery must be handled by the resource server rather than Auth0. The application must host the specific well-known endpoints to provide the required JSON response containing the resource metadata.

Applies To

  • Auth0
  • Auth for Model Context Protocol (MCP)
  • Protected Resource Metadata (PRM)

Solution

How is Protected Resource Metadata discovery handled by the resource server?

Implement Protected Resource Metadata discovery by configuring the application to host the required well-known endpoints and return the appropriate JSON response.

  1. Host the primary endpoint /.well-known/oauth-protected-resource/mcp on the application server.
  2. Host the fallback endpoint /.well-known/oauth-protected-resource on the application server.
  3. Configure the endpoints to return a JSON response containing the resource metadata.

 

Review the following JSON example to understand the required structure for the endpoint response.

{
"authorization_servers": ["https://auth.yourcompany.com"],
"scopes_supported": ["files:read", "files:write"],
"resource_documentation": "https://yourcompany.com/docs/mcp"
}

 

Review the full list of possible parameters used by RFC 9728 §3.3 in the RFC 9728 §3.3: Protected Resource Metadata documentation.

 

Related References

Recommended content

No recommended content found...