Backend: mcp 1.30, uv 0.13 and dnspython 2.9 for their advisories; MCP tokens checked against the resource URL

Claude-Session: https://claude.ai/code/session_01SSi5AvZ7pFmySK8zy3NPMh
This commit is contained in:
2026-10-28 08:42:07 +01:00
parent 1f610a70ed
commit 15308afc72
3 changed files with 34 additions and 30 deletions
+4
View File
@@ -71,6 +71,9 @@ class _JWTVerifier:
client_id=client_id,
scopes=[security.MCP_SCOPE],
subject=str(payload.get("sub", "")),
# `decode_oauth_token` has checked the audience; the SDK compares
# this against its own resource URL as well.
resource=settings.mcp_resource,
)
@@ -170,6 +173,7 @@ def build_http_app(app: object) -> ASGIApp:
issuer_url=AnyHttpUrl(settings.oauth_issuer),
resource_server_url=AnyHttpUrl(settings.mcp_resource),
required_scopes=None,
validate_token_resource=True,
)
server.mcp.settings.transport_security = _transport_security()
# The SDK only takes a verifier through its constructor, and the instance is