# Keycloak — card for AI agents

Self-hosted open-source identity and access management with SSO, OIDC/SAML and user federation.

Maker: Keycloak (CNCF project) · category: Auth and user accounts

## Price (official page)
- Free tier: none listed
- Free tier terms: open source (read from the wording above and the pricing page; empty = not stated)
- Note: Self-hosted only; no vendor-hosted paid plan. CNCF incubation project; latest release 26.8.0.

## Connect
- npm: `npm install keycloak-js`
- Repository: https://github.com/keycloak/keycloak

## For AI agents on Keycloak (CNCF project)'s own site (AgentGid check 2026-11-13: 2 of 6)
- llms.txt: none found
- OpenAPI description: none found at the usual places
- Official MCP server: no · official SDK: yes · status page: no
- robots.txt lets AI assistants (ChatGPT-User, Claude-User) read the site: yes

## Price history in AgentGid's catalog (since 2026-10-10)
- Changes recorded: 0 (a vendor price change or an editor's correction; the evidence archive keeps the pricing page of each date)

## Other APIs in this category
- hCaptcha: https://agentgid.com/apis/hcaptcha/agent.md
- Clerk: https://agentgid.com/apis/clerk/agent.md
- Descope: https://agentgid.com/apis/descope/agent.md
- Auth0: https://agentgid.com/apis/auth0/agent.md
- Privy: https://agentgid.com/apis/privy/agent.md

## Links
- AgentGid page: https://agentgid.com/apis/keycloak/


## Keycloak: your own login server for all apps

Keycloak is free, open-source software that you run on your own server to handle sign-in for your apps. Users log in once on a Keycloak page instead of each app keeping its own passwords, and you get social login, two-step login and user management from an admin screen. There is no hosted service from the Keycloak project; you install and run it yourself.

### Where to use it
- One login for several apps: Let people sign in once and use your shop, help desk and dashboard without logging in again; one logout ends them all.
- Sign in with Google or GitHub: Add social login buttons from the admin screen, without changing your app's code.
- Company accounts for staff tools: Let employees use their existing company directory accounts to sign in to your internal tools.
- Users manage their own accounts: Give users a ready page to change their password, turn on two-step login and see their active sessions.
- Protect your server routes: Let only signed-in users, or users with a certain role, call your app's server routes.
- Sign-in for your AI tool servers: Use your own Keycloak as the login server that the tool servers of AI assistants check before letting a client in.

### How to start
- Start Keycloak locally with Docker; it runs on port 8080 with the admin user you set.

```
docker run -p 127.0.0.1:8080:8080 -e KC_BOOTSTRAP_ADMIN_USERNAME=admin -e KC_BOOTSTRAP_ADMIN_PASSWORD=admin quay.io/keycloak/keycloak:26.8.2 start-dev
```

- In the Admin Console create a realm for your app (not master), a user, and a client with your app's redirect address.
- Add the browser library to your web app and point it at your realm and client.

```
npm install keycloak-js
```


### License
Keycloak is open source under the Apache 2.0 license, free to use in paid products and to change. You run and secure it yourself, so there is no bill but also no vendor support unless you buy it elsewhere.

### Good to know
- You run Keycloak yourself, so you look after the server, updates, backups and its database.
- The quick start mode is for trying it out only. Real use needs a proper hostname and HTTPS.
- Change the admin password from the example one before anyone else can reach the server.
- The admin screens should not be open to the public internet; put them on a separate address.
- Set the allowed return addresses for each app exactly; loose settings can let attackers misuse logins.

Checked 2026-11-10 against: https://www.keycloak.org/, https://www.keycloak.org/guides, https://www.keycloak.org/documentation, https://www.keycloak.org/getting-started/getting-started-docker, https://www.keycloak.org/getting-started/getting-started-zip, https://www.keycloak.org/server/configuration, https://www.keycloak.org/server/configuration-production, https://www.keycloak.org/securing-apps/overview, https://www.keycloak.org/securing-apps/javascript-adapter, https://www.keycloak.org/securing-apps/nodejs-adapter, https://www.keycloak.org/securing-apps/oidc-layers, https://www.keycloak.org/securing-apps/admin-client, https://www.keycloak.org/securing-apps/token-exchange, https://www.keycloak.org/securing-apps/mcp-authz-server, https://www.keycloak.org/admin-api/admin-api-v2, https://www.keycloak.org/observability/telemetry, https://www.keycloak.org/server/bootstrap-admin-recovery, https://github.com/keycloak/keycloak/blob/main/LICENSE.txt, https://registry.npmjs.org/keycloak-js/26.2.5, https://registry.npmjs.org/keycloak-connect/26.1.1, https://registry.npmjs.org/@keycloak/keycloak-admin-client/26.8.2

### Mistakes to avoid
- Don't: Adding your apps and users to the master realm. → Do: Create a separate realm for your apps and keep master for managing Keycloak. (The docs reserve master for administration.)
- Don't: Giving a browser app a client secret. → Do: Make the browser app's client public (Client authentication Off) with exact redirect URIs. (A browser cannot keep a secret.)
- Don't: Starting the router of a single-page app before keycloak.init(). → Do: Initialize keycloak-js first, then the router. (init() can change the page address after login, which the router would otherwise mishandle.)
- Don't: Using the password grant (sending the user's password to the token address) for a new app. → Do: Use the authorization code flow, or device authorization for devices without a browser. (Current OAuth security advice forbids that flow and it skips social login and two-step login.)
- Don't: Running start-dev in production. → Do: Use kc.sh start with a hostname, HTTPS and a production database such as PostgreSQL. (Development mode turns on plain HTTP and local-only caches.)

### Questions
- Is there a hosted Keycloak I can sign up for? Not from the Keycloak project. You download it or run its container image on your own server.
- Which login standards does it support? OpenID Connect, OAuth 2.0 and SAML 2.0.
- What is a realm? A separate space with its own users and apps, like one tenant. The built-in master realm is only for managing Keycloak.
- Can I put a client secret in my React or Vue app? No. Browser apps use a public client without a secret; secrets stay on your server.
- Does Keycloak send data to its makers? Not by default in its docs. Monitoring data goes only to the collector address you configure, localhost by default.

---
AgentGid's catalog is curated: every entry was checked against the maker's official pages (registry, repository, license and pricing pages) on the date shown; a license value shows the quote it stands on wherever AgentGid has one. Usage numbers come from AgentGid's own scan of public repositories set up for AI coding agents. Claims by makers are reported, not tested by AgentGid.
