Forward nested token claims as upstream headersv3.14+

Use upstream_headers to extract values from nested objects in a validated JWT and forward them as HTTP headers to the upstream MCP server.

Each entry specifies the target header name and a path array that describes how to traverse the token payload. For example, ["realm_access", "roles"] maps the value at token.realm_access.roles.

upstream_headers and claim_to_header are mutually exclusive. Use upstream_headers when the claims you need are inside nested objects. Use claim_to_header for top-level claims only.

Environment variables

  • MCP_RESOURCE_URL: The resource identifier for the MCP server (for example, https://api.example.com/mcp).

  • AUTHORIZATION_SERVER_URL: The authorization server URL (for example, https://auth.example.com).

  • JWKS_ENDPOINT_URL: The JWKS endpoint URL for fetching the authorization server’s public keys. If not provided, the plugin attempts to discover it from the authorization server metadata.

Set up the plugin

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!