The authorization filters added by #733 looks up policies for IMcpServerPrimitives every request. This used to also be done by the authorization middleware, but .NET 7 introduced IAuthorizationPolicyProvider.AllowsCachingPolicies
which makes it possible to cache at least some authorization policy. We could add an Items dictionary to IMcpServerPrimitives to track the cached policy similar to the Items dictionary #733 adds to the RequestContext<TParams>
, or we could use a ConditionalWeakTable<IMcpServerPrimitive, AuthorizationPolicy?>
.