mcp-keycloak
v0.3.3Keycloak admin for AI agents — realms, users, clients, roles; safe-by-default governance.
Values you need
| Variable | What it is | |
|---|---|---|
KEYCLOAK_URL | required | Base URL of the Keycloak server (no trailing slash). |
KEYCLOAK_CLIENT_ID | optional | Client id used to authenticate (default admin-cli). |
KEYCLOAK_CLIENT_SECRET | optional secret | Service-account client secret (or use KEYCLOAK_USERNAME/PASSWORD). |
KEYCLOAK_MODE | optional | Access mode: read-only | read-write | admin. |
npm (npx) discovery passed
Requires Node.js 18+
Run in a terminal
claude mcp add mcp-keycloak -e 'KEYCLOAK_URL=<KEYCLOAK_URL>' -- npx -y @dockndevai/mcp-keycloak@0.3.3Add to
claude_desktop_config.json{
"mcpServers": {
"mcp-keycloak": {
"args": [
"-y",
"@dockndevai/mcp-keycloak@0.3.3"
],
"command": "npx",
"env": {
"KEYCLOAK_URL": "<KEYCLOAK_URL>"
}
}
}
}Add to
~/.cursor/mcp.json{
"mcpServers": {
"mcp-keycloak": {
"args": [
"-y",
"@dockndevai/mcp-keycloak@0.3.3"
],
"command": "npx",
"env": {
"KEYCLOAK_URL": "<KEYCLOAK_URL>"
}
}
}
}Add to
.vscode/mcp.json{
"inputs": [
{
"description": "KEYCLOAK_URL",
"id": "keycloak-url",
"password": true,
"type": "promptString"
}
],
"servers": {
"mcp-keycloak": {
"args": [
"-y",
"@dockndevai/mcp-keycloak@0.3.3"
],
"command": "npx",
"env": {
"KEYCLOAK_URL": "${input:keycloak-url}"
},
"type": "stdio"
}
}
}Add to
~/.codex/config.toml[mcp_servers.mcp-keycloak]
command = "npx"
args = ["-y", "@dockndevai/mcp-keycloak@0.3.3"]
env = { "KEYCLOAK_URL" = "<KEYCLOAK_URL>" }For AI agents
- Ask the user for: KEYCLOAK_URL. Never invent or guess these values; secrets go into the client config, not into chat logs.
- Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
- Restart or reload the client so it starts the server.
- Verify: the server should expose these tools: list_realms, get_realm, list_users, get_user, count_users, list_clients, list_realm_roles, list_groups.
- If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.
Machine-readable: install.md · manifest.json