Version: v0.18.0 (operator + vmcp)
Summary: The scopes field in incomingAuth.oidcConfig.inline and incomingAuth.oidcConfigRef is accepted by the CRD and operator but ignored by the vmcp binary. The /.well-known/oauth-protected-resource endpoint always returns scopes_supported: ["openid"] regardless of configuration.
Impact: MCP clients (Claude Code, VS Code) read scopes_supported from the protected resource metadata to build their DCR registration request. When offline_access is not advertised, clients register without it → Keycloak creates the DCR client without offline_access as a valid scope → client auth fails with invalid_scope when requesting openid offline_access.
Steps to reproduce:
- Create a VirtualMCPServer with scopes configured:
incomingAuth:
type: oidc
oidcConfigRef:
name: my-oidc-config
audience: "mcp-gateway"
scopes:
- openid
- offline_access
- Check the CR confirms the scopes:
$ kubectl get virtualmcpserver vmcp -n mcp -o json | jq '.spec.incomingAuth.oidcConfigRef.scopes'
["openid", "offline_access"]
- Check the discovery endpoint:
$ curl -s https://mcp-gateway.domain/.well-known/oauth-protected-resource | jq .
{
"resource": "https://mcp-gateway.domain/mcp",
"authorization_servers": ["https://keycloak.domain/realms/mcp"],
"bearer_methods_supported": ["header"],
"scopes_supported": ["openid"] ← offline_access missing
}
- Also tested with
incomingAuth.oidcConfig.type: inline and scopes inside the inline block — same result.
CRD documentation confirms the field should work:
scopes:
description: |-
Scopes is the list of OAuth scopes to advertise in the well-known endpoint (RFC 9728).
If empty, defaults to ["openid"].
Expected: scopes_supported: ["openid", "offline_access"]
Actual: scopes_supported: ["openid"]
Environment: Operator v0.18.0, vmcp v0.18.0, Keycloak 26.3.3, Kubernetes 1.31
Version: v0.18.0 (operator + vmcp)
Summary: The
scopesfield inincomingAuth.oidcConfig.inlineandincomingAuth.oidcConfigRefis accepted by the CRD and operator but ignored by the vmcp binary. The/.well-known/oauth-protected-resourceendpoint always returnsscopes_supported: ["openid"]regardless of configuration.Impact: MCP clients (Claude Code, VS Code) read
scopes_supportedfrom the protected resource metadata to build their DCR registration request. Whenoffline_accessis not advertised, clients register without it → Keycloak creates the DCR client withoutoffline_accessas a valid scope → client auth fails withinvalid_scopewhen requestingopenid offline_access.Steps to reproduce:
incomingAuth.oidcConfig.type: inlineandscopesinside theinlineblock — same result.CRD documentation confirms the field should work:
Expected:
scopes_supported: ["openid", "offline_access"]Actual:
scopes_supported: ["openid"]Environment: Operator v0.18.0, vmcp v0.18.0, Keycloak 26.3.3, Kubernetes 1.31