Keycloak admin for AI agents — realms, users, clients, roles; safe-by-default governance.
MCPpedia last refreshed this data
io.github.dockndevai/mcp-keycloak is an MCP server that keycloak admin for AI agents — realms, users, clients, roles; safe-by-default governance. Its tool list has not been published yet over stdio and http, requires no API key, and scores 89/100 on MCPpedia's security, maintenance and efficiency rubric.
Config is the same across clients - only the file and path differ.
{
"mcpServers": {
"keycloak": {
"env": {
"KEYCLOAK_URL": "https://keycloak.example.com",
"KEYCLOAK_MODE": "read-only",
"KEYCLOAK_CLIENT_ID": "admin-cli",
"KEYCLOAK_CLIENT_SECRET": "your-secret"
},
"args": [
"-y",
"@dockndevai/mcp-keycloak"
],
"command": "npx"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
Keycloak admin for AI agents — realms, users, clients, roles; safe-by-default governance.
Run this in your terminal to verify the server starts. Then let us know if it worked - your result helps other developers.
npx -y '@dockndevai/mcp-keycloak' 2>&1 | head -1 && echo "✓ Server started successfully"
After testing, let us know if it worked:
Five weighted categories - click any category to see the underlying evidence.
No known CVEs.
Checked @dockndevai/mcp-keycloak against OSV.dev.
Be the first to review
Have you used this server?
Share your experience - it helps other developers decide.
Sign in to write a review.
Others in ai-ml
🛡️ BLA (Blind LLM Agents) — Adversarial defense shield that protects binaries, Electron apps, JS bundles, Python, and WebAssembly against AI reverse-engineering agents like REA. Poison -> Exhaust -> Hallucinate.
The official MCP server implementation for the Perplexity API Platform
Unified real-time search engine skill for AI agents.
Study screens, flows and paywalls from top-earning iOS apps, then build from what wins.
MCP Security Weekly
Get CVE alerts and security updates for io.github.dockndevai/mcp-keycloak and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
A Model Context Protocol server for Keycloak. It lets an MCP-capable client (Claude Desktop, Claude Code, etc.) inspect and manage Keycloak realms, users, clients, roles, and groups — with security controlled entirely by flags.
The design goal is safe by default: it starts read-only, scopes to an allowlist of realms, protects sensitive realms from mutation, and gates destructive operations behind an explicit opt-in.
realm argument; scope it with an allowlist.read-only → read-write → admin, layered so a mode never exposes tools above its level.| Concern | Flag | Default | Effect |
|---|---|---|---|
| What can the server do at all? | KEYCLOAK_MODE | read-only | read-only exposes only read tools; read-write adds mutations; admin adds destructive tools. Tools above the mode are never registered. |
| Which realms are in scope? | KEYCLOAK_REALM_ALLOWLIST | (all) | Comma-separated. When set, any operation on a realm outside the list is refused. |
| Which realms are read-only forever? | KEYCLOAK_PROTECTED_REALMS | master | Protected realms can be read but never mutated or deleted, regardless of mode. |
| Can it delete? | KEYCLOAK_ALLOW_DELETE | false | delete_* tools require this and admin mode. |
| Preview without touching Keycloak | KEYCLOAK_DRY_RUN | false | Write/admin tools validate + log intent, then return without calling Keycloak. |
| Audit trail | KEYCLOAK_AUDIT_LOG | true | Emits a JSON line to stderr per guarded operation (ALLOW / DENY / DRY_RUN). |
| Interactive confirmation | (automatic) | — | Destructive & high-impact actions prompt the human to approve via MCP elicitation before running. The prompt shows the tool, the exact arguments (secrets redacted) and a fingerprint; the target user's version is pinned across the prompt and the action is refused if it changed; a prompt nobody answers is a refusal. |
| Self-signed Keycloak certificate | KEYCLOAK_TLS_REJECT_UNAUTHORIZED | true | Set false only for a throwaway lab: certificate verification is then disabled for requests to Keycloak only (not process-wide) and a warning is printed. |
| Require a human | KEYCLOAK_REQUIRE_HUMAN_APPROVAL | false | When true, destructive ops are refused if the client cannot elicit (instead of falling back to the *_ALLOW_* gate alone). |
These layers are independent — for example admin mode with KEYCLOAK_ALLOW_DELETE=false can create and update users but cannot delete them.
Read (read-only+): list_realms, get_realm, list_users, get_user, count_users, list_clients, list_realm_roles, list_groups
Write (read-write+): create_user, update_user, reset_password, logout_user
Admin (admin): delete_user
Published on npm as @dockndevai/mcp-keycloak. No clone or build needed — your MCP client runs it on demand with npx. Start in read-only mode; see .env.example for every variable and docs/CLIENTS.md for the full per-client guide.
Claude Code (CLI)