Interface McpOperationScopeResolver

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

Resolves the set of scopes required to invoke a specific MCP operation (SEP-2350 per-operation step-up enforcement).

The 2026-07-28 resource server enforces per-operation scopes at the POST-parse dispatch point (where the JSON-RPC method is known); a resolver returning a non-empty set that the caller's granted scopes do not satisfy causes a 403 insufficient_scope step-up challenge naming the required scopes.

The default resolver is a static per-operation map populated via McpResourceServerConfig.addOperationScope(String, String, String...) — sufficient for 10.0. This interface is the seam a future dynamic resolver (e.g. one inspecting params) could plug into via McpResourceServerConfig.setOperationScopeResolver(McpOperationScopeResolver); that dynamic capability is deliberately not built for 10.0.

Since:
10.0.0
  • Method Details

    • requiredScopesFor

      Returns the scopes required to invoke the given operation.
      Parameters:
      ctx - The resolved operation (method, name, raw JSON-RPC params). Never null.
      Returns:
      The required scopes. An empty or null return means "no per-operation requirement beyond the endpoint-wide baseline".