In this lecture, using a practical Keycloak example, we assemble OAuth/OIDC authentication for an MCP scenario: we will unpack the roles of
ChatGPT / MCP Jam (public client), your MCP server (resource server), and Keycloak (auth server), set up a separate
realm for the application, create a
public client with Authorization Code +
PKCE (
S256), carefully configure the
redirect URI, minimal
scopes (for example,
openid and
mcp:tools), and also discuss tokens, claims, JWKS, and common integration pitfalls.