You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
vMCP: optionally refuse JWT access tokens whose typ is not at+jwt (RFC 9068) #7345
The vMCP's incoming OIDC authentication accepts a JWT access token whose JOSE typ header is JWT, or has no typ, as long as its issuer, audience, signature and expiry are valid. It refuses only an ID-JAG's typ (oauth-id-jag+jwt).
RFC 9068 section 4 says a resource server MUST reject a JWT access token unless its typ is at+jwt or application/at+jwt. Requiring that type stops the vMCP from accepting another JWT that the same issuer signed for the same audience, but that isn't an access token.
The embedded authorization server issues typ: JWT by default. An embedder can choose at+jwt with runner.WithAccessTokenType("at+jwt") (#6941). So the vMCP can't require at+jwt for every issuer without breaking deployments that keep the default, and many external IdPs also issue typ: JWT.
Expected
The vMCP can be told to require at+jwt (or application/at+jwt) from an issuer, for example as a Go option an embedder sets alongside WithAccessTokenType("at+jwt"). With it on, the vMCP answers 401 with WWW-Authenticate: Bearer error="invalid_token" when a token's typ is anything else, including when it is missing. With it off, nothing changes.
Done when
With the requirement on, a token with typJWT or no typ gets 401 invalid_token at the vMCP, and a token with typat+jwt is accepted.
With it off, behaviour is unchanged.
Context
Mecatl's embedded gateway (stacklok/mecatl#2533) sets at+jwt on the access tokens of the authorization server in front of its vMCP, and would turn this requirement on. Its tests pin the vMCP accepting typJWT and a missing typ as a tracked shortcut.
changed the title [-]vMCP: refuse JWT access tokens whose typ is not at+jwt (RFC 9068)[/-][+]vMCP: optionally refuse JWT access tokens whose typ is not at+jwt (RFC 9068)[/+]on Nov 26, 2026
Mecatl's embedded AS-2 now issues at+jwt gateway tokens in production (stacklok/mecatl#3015, #3018), and its tests pin the vMCP accepting typJWT or no typ as a tracked shortcut. This is low priority for Mecatl, but it's unassigned. Is anyone able to take it?
Activity
test(identitybroker): pin the typ shortcut to toolhive#7345 and test …
feat(mcpbroker): type AS-2's access tokens at+jwt
[-]vMCP: refuse JWT access tokens whose typ is not at+jwt (RFC 9068)[/-][+]vMCP: optionally refuse JWT access tokens whose typ is not at+jwt (RFC 9068)[/+]test(mcpbroker): check the cause of each AS-2 refusal
ChrisJBurns commentedon Nov 28, 2026
Mecatl's embedded AS-2 now issues
at+jwtgateway tokens in production (stacklok/mecatl#3015, #3018), and its tests pin the vMCP acceptingtypJWTor notypas a tracked shortcut. This is low priority for Mecatl, but it's unassigned. Is anyone able to take it?