by shigechika
Keycloak MCP is an MCP server for the Keycloak Admin REST API. It lets an assistant look up users, sessions, login events and security status in a realm.
PluginContact for pricing
Step 1: Install with pip install keycloak-mcp or uv pip install keycloak-mcp.
Step 2: Create a service account client in Keycloak and note its client ID and secret.
Step 3: Set KEYCLOAK_URL, KEYCLOAK_CLIENT_ID and KEYCLOAK_CLIENT_SECRET, plus KEYCLOAK_REALM if not master.
Step 4: Register the server in your MCP client.
Step 5: Run health_check to confirm the backend is reachable, then try daily_brief or search_users.
It uses a service account with the client credentials grant, so no human password or TOTP is involved.
KEYCLOAK_URL, KEYCLOAK_CLIENT_ID and KEYCLOAK_CLIENT_SECRET are required. The realm defaults to master.
Only if you set KEYCLOAK_GROUP_WRITE_ROOT. Without it, the group-change tools are not registered.
Requirements