MCPcopy Index your code
hub / github.com/modelcontextprotocol/python-sdk / MetadataHandler

Class MetadataHandler

src/mcp/server/auth/handlers/metadata.py:11–18  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9
10@dataclass
11class MetadataHandler:
12 metadata: OAuthMetadata
13
14 async def handle(self, request: Request) -> Response:
15 return PydanticJSONResponse(
16 content=self.metadata,
17 headers={"Cache-Control": "public, max-age=3600"}, # Cache for 1 hour
18 )
19
20
21@dataclass

Callers 1

create_auth_routesFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected