Skip to content
ReviewRamble

The weekly brief

AI, reviewed, in your inbox.

  • New reviews of tools, models, MCP servers and repos, with the verdict up front
  • Re-checked prices and ratings when something changes
  • New analysis pieces as they are published

Models, agents, MCP servers and the tools actually worth your time.

One email a week. Unsubscribe with the link in any brief. How we use your email

Keycloak

CNCF identity server for login, SSO and OAuth that now documents how to act as the authorisation server for MCP clients.

Reviewed by ReviewRamble editors · Updated

View on GitHub Open source

Share this page:XLinkedInFacebookRedditWhatsAppEmail

Our rating

4.3/5

Keycloak is the sensible self-hosted answer to who an agent is acting for, provided you treat its newest MCP and agent features as previews and never ship dev mode.

What is Keycloak?

Keycloak is an open-source identity and access management server. It handles login, single sign-on, social and enterprise identity providers, LDAP and Active Directory federation, two-factor authentication and fine-grained authorisation over OpenID Connect, OAuth 2.0 and SAML 2.0, with an admin console for operators and an account console for users. It is written in Java, licensed Apache-2.0 and a Cloud Native Computing Foundation incubation project; 26.8.2 shipped on 5 November 2026.

Its AI relevance is recent and mostly about MCP. Keycloak 26.5.0, released on 6 January 2026, added a guide to using Keycloak as the authorisation server for MCP servers, with client notes for VS Code, Claude Code, Claude Desktop and MCP Inspector, and introduced JWT Authorization Grant (RFC 7523) as a preview. A separate experimental feature, Identity Assertion JWT Authorization Grant, lets an MCP client exchange a user's identity assertion for a token scoped to one tool server, without asking the user to log in again.

Is Keycloak worth it?

Keycloak already gives an MCP server most of what the protocol's authorisation rules expect from an identity provider, at no licence cost. Its MCP guide marks OAuth 2.1, authorisation server metadata (RFC 8414), issuer identification (RFC 9207) and dynamic client registration (RFC 7591) as supported, which together let Claude Code or VS Code discover Keycloak, register themselves and get a user-scoped token without an administrator creating a client per developer. That is a long way ahead of the shared API keys many internal MCP servers still use.

The fine print matters. Full conformance is claimed only for the 2025-03-26 MCP spec; 2025-06-18, 2025-11-25 and 2026-07-28 are experimental, as are resource indicators (RFC 8707), which bind a token to one MCP server, and client ID metadata documents, both behind feature flags the docs say may break in later versions. Without resource indicators you bind the audience through a client scope instead. ChatGPT's client metadata is not supported, and Claude Code and Claude Desktop reject each other unless they share one client policy. The agent-delegation pieces are young too: the Identity Assertion JWT Authorization Grant is experimental and its docs say not to use it in production.

The catch: the quick start is a trap if it reaches production. bin/kc.sh start-dev turns on plain HTTP, disables strict hostname checks, uses a local cache and stores data in the dev-file database, which the docs say is not suitable for production and must be replaced. Under WSL, dev mode binds to 0.0.0.0, so other machines on your network may reach it. Production mode refuses to start without HTTPS and a hostname, and needs a supported database such as PostgreSQL, MariaDB, MySQL, SQL Server or Oracle. Keycloak also holds every credential and signing key, so upgrades and patching are not optional, and the project offers no hosted service to take that off your hands.

Our take: when agents must act on behalf of real employees across several internal tools, Keycloak is the free, standards-first identity layer to build on; a gateway such as agentgateway or ToolHive can sit in front of the MCP servers, while Keycloak decides who the user is.

Where it earns its place

  • A platform team at a 300-person company running internal MCP servers

    Make Claude Code users sign in with company SSO before an MCP server will answer

    Register Keycloak as the MCP authorisation server, enable dynamic client registration and add a client scope whose audience matches each MCP server's URL. Keycloak is free; the cost is a production cluster and its database.

  • A security engineer reviewing an AI assistant that calls internal tools

    Stop one leaked token from working against every tool server

    Bind each token to a single MCP server with resource indicators, an experimental flag, or with a per-server audience scope, and keep tokens short-lived. Retest after each upgrade, since experimental flags may change.

  • A developer prototyping an agent on a laptop

    Get OAuth working locally in an afternoon

    docker run quay.io/keycloak/keycloak start-dev gives a working server in minutes. Keep it on localhost and rebuild in production mode with HTTPS, a hostname and PostgreSQL before anyone else connects.

Before you commit

Setup
Unzip the distribution and run bin/kc.sh start-dev, or docker run quay.io/keycloak/keycloak start-dev, for a test server. Production uses bin/kc.sh start with HTTPS, a configured hostname and an external database.
Integrations
OpenID Connect, OAuth 2.0 and SAML 2.0 applications; LDAP and Active Directory; social and OpenID Connect or SAML identity providers; MCP clients including VS Code, Claude Code, Claude Desktop and MCP Inspector.
Data and privacy
Self-hosted: user records, sessions and keys stay in your database. Keycloak holds credentials and signing keys, so it is a high-value target; vulnerabilities are reported through the project's GitHub security policy.
Cost at scale
No licence fee under Apache-2.0. The cost is servers, a supported database and staff time for clustering, upgrades and security patches.
Limits
MCP spec versions after 2025-03-26, resource indicators, client ID metadata documents and ID-JAG are experimental; ChatGPT's client metadata is unsupported; the dev-file database is not for production.

What’s good

  • Supports OAuth 2.1, RFC 8414, RFC 9207 and dynamic client registration for MCP
  • Documented setup for Claude Code, Claude Desktop and VS Code
  • Mature SSO, LDAP and Active Directory federation, and two-factor login
  • Apache-2.0 and a CNCF project, with no paid tier

What’s not

  • Only MCP spec 2025-03-26 fully supported; later versions experimental
  • Agent delegation through ID-JAG is experimental, not for production
  • Dev mode runs plain HTTP on a non-production database
  • No support for ChatGPT's client metadata

Best for

Platform and security teams that self-host identity and want MCP servers and AI agents to act with each user's own permissions.

Keycloak alternatives

Keycloak: common questions

Is Keycloak worth it?
Keycloak is the sensible self-hosted answer to who an agent is acting for, provided you treat its newest MCP and agent features as previews and never ship dev mode. We rate it 4.3 out of 5.
How much does Keycloak cost?
Free and open source under Apache-2.0. The project sells no paid tier; you pay for hosting, a database and the people who run it.
What are the downsides of Keycloak?
Only MCP spec 2025-03-26 fully supported; later versions experimental; agent delegation through ID-JAG is experimental, not for production; dev mode runs plain HTTP on a non-production database; no support for ChatGPT's client metadata.
Who is Keycloak best for?
Platform and security teams that self-host identity and want MCP servers and AI agents to act with each user's own permissions.
How much does Keycloak cost for a team or in production?
No licence fee under Apache-2.0. The cost is servers, a supported database and staff time for clustering, upgrades and security patches.
Is Keycloak safe for company data?
Self-hosted: user records, sessions and keys stay in your database. Keycloak holds credentials and signing keys, so it is a high-value target; vulnerabilities are reported through the project's GitHub security policy.
What are the best Keycloak alternatives?
The closest alternatives we have reviewed are agentgateway and ToolHive.

Answers checked Nov 18, 2026.

Make Keycloak? Show this rating on your siteKeycloak rated 4.3 out of 5 on ReviewRamble