Creates a provider that verifies Keycloak access tokens and maps their claims.
Keycloak server URL, realm, and resource-server settings.
A provider that rejects tokens not issued for the resolved MCP resource.
A TypeError if serverUrl or realm is invalid.
TypeError
serverUrl
realm
import { oauthKeycloakProvider } from "mcp-use/oauth/keycloak";const oauth = oauthKeycloakProvider({ serverUrl: "https://keycloak.example.com", realm: "production",}); Copy
import { oauthKeycloakProvider } from "mcp-use/oauth/keycloak";const oauth = oauthKeycloakProvider({ serverUrl: "https://keycloak.example.com", realm: "production",});
Creates a provider that verifies Keycloak access tokens and maps their claims.