list_realms
List realms
List all realms visible to the configured credentials. Realms outside the allowlist are filtered out.
Takes no parameters.

io.github.dockndevaiPublished by GitHub account dockndevaiv0.3.3Updated Oct 26, 2026
Keycloak admin for AI agents — realms, users, clients, roles; safe-by-default governance.
Keycloak admin MCP server that lets an assistant inspect realms, users, clients, roles and groups, with read-only defaults and layered security flags.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Follow the launch instructions in the repository.
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.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)
Claude Desktop · Cursor · Windsurf — same block in claude_desktop_config.json, .cursor/mcp.json, or ~/.codeium/windsurf/mcp_config.json:
OpenAI Codex CLI — in ~/.codex/config.toml:
VS Code (GitHub Copilot, Agent mode) — in .vscode/mcp.json:
Copy .env.example and fill it in, or set the variables directly in your MCP client config. A confidential client with the realm-management roles you need is the recommended credential.
Prefer the published package above. To run from a clone:
This server ships a server.json for the official MCP registry and an mcpName for npm ownership validation. See PUBLISHING.md for publishing to npm and listing on the MCP registry, Smithery, Glama, Cursor, and PulseMCP.
MIT
Source: README.md at commit c2481a2
List realms
List all realms visible to the configured credentials. Realms outside the allowlist are filtered out.
Takes no parameters.
Get realm settings
Fetch the configuration of a single realm.
realmrequiredList / search users
List users in a realm. Supports free-text search and pagination. Passwords and secrets are never returned by Keycloak.
maxfirstrealmrequiredsearchGet user by id
Fetch a single user representation by their Keycloak id.
realmrequireduserIdrequiredCount users
Return the number of users in a realm, optionally matching a search term.
realmrequiredsearchList clients
List OAuth/OIDC clients configured in a realm. Client secrets are not included.
realmrequiredclientIdList realm roles
List the realm-level roles defined in a realm.
realmrequiredList groups
List groups in a realm.
realmrequiredsearch90% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
claude mcp add keycloak -e KEYCLOAK_URL="https://keycloak.example.com" -e KEYCLOAK_CLIENT_ID="admin-cli" -e KEYCLOAK_CLIENT_SECRET="your-secret" -e KEYCLOAK_MODE="read-only" -- npx -y @dockndevai/mcp-keycloak{ "mcpServers": { "keycloak": { "command": "npx", "args": [ "-y", "@dockndevai/mcp-keycloak" ], "env": { "KEYCLOAK_URL": "https://keycloak.example.com", "KEYCLOAK_CLIENT_ID": "admin-cli", "KEYCLOAK_CLIENT_SECRET": "your-secret", "KEYCLOAK_MODE": "read-only" } } }}[mcp_servers.keycloak]command = "npx"args = ["-y", "@dockndevai/mcp-keycloak"]env = { KEYCLOAK_URL = "https://keycloak.example.com", KEYCLOAK_CLIENT_ID = "admin-cli", KEYCLOAK_CLIENT_SECRET = "your-secret", KEYCLOAK_MODE = "read-only" }{ "servers": { "keycloak": { "type": "stdio", "command": "npx", "args": [ "-y", "@dockndevai/mcp-keycloak" ], "env": { "KEYCLOAK_URL": "https://keycloak.example.com", "KEYCLOAK_CLIENT_ID": "admin-cli", "KEYCLOAK_CLIENT_SECRET": "your-secret", "KEYCLOAK_MODE": "read-only" } } }}npm installnpm run buildnode dist/index.js # with the environment variables setnpm run dev # watch modenpm test # unit tests for the security policynpm run typecheck