mcp-keycloak-admin
An MCP server that allows agents to administer Keycloak instances via its Admin REST API. It supports managing users, roles, clients, groups, identity providers, and events. The server is safe-by-default with configurable guardrails, supports service account and password authentication modes, and is built with a clean, test-driven architecture compatible with Keycloak 26.x.
Package and access
Local package with source-attributed installation metadata. Koskamo does not execute packages during review.
What you can do with it
- Search and manage users in Keycloak realms
- Configure and manage OAuth clients and roles
- Read audit events and system logs
- Manage identity providers and groups
Source and maintenance
- Maintenance checked
Packages and installation
Source-provided package data. Koskamo has not executed or live-probed this package.
mcp-keycloak-admin 0.2.3
{
"version": "0.2.3",
"transport": "stdio",
"identifier": "mcp-keycloak-admin",
"registryType": "npm",
"registryBaseUrl": "https://registry.npmjs.org",
"environmentVariables": [
{
"name": "KEYCLOAK_BASE_URL",
"isRequired": true,
"description": "Base URL of the Keycloak server (no trailing slash)."
},
{
"name": "KEYCLOAK_REALM",
"isRequired": true,
"description": "Realm the server operates on."
},
{
"name": "AUTH_MODE",
"isRequired": true,
"description": "Authentication mode: service_account or password."
},
{
"name": "KC_CLIENT_ID",
"description": "Confidential client id (service_account mode)."
},
{
"name": "KC_CLIENT_SECRET",
"description": "Client secret (service_account mode)."
},
{
"name": "KC_ADMIN_USERNAME",
"description": "Admin username (password mode)."
},
{
"name": "KC_ADMIN_PASSWORD",
"description": "Admin password (password mode)."
},
{
"name": "KC_ADMIN_REALM",
"description": "Realm holding the admin user (password mode; default master)."
},
{
"name": "READ_ONLY",
"description": "When true, write and destructive tools are not registered."
},
{
"name": "ALLOWED_REALMS",
"description": "Comma-separated allow-list of realms the server may operate on."
}
]
}Tools
Reported by the attributed source; not independently observed by Koskamo.
Connect from your client
Each snippet configures the same source-provided package; replace placeholders before use.
Cursor
{
"mcpServers": {
"mcp-keycloak-admin": {
"command": "npx",
"args": [
"-y",
"mcp-keycloak-admin@0.2.3"
],
"env": {
"KEYCLOAK_BASE_URL": "<YOUR_KEYCLOAK_BASE_URL>",
"KEYCLOAK_REALM": "<YOUR_KEYCLOAK_REALM>",
"AUTH_MODE": "<YOUR_AUTH_MODE>",
"KC_CLIENT_ID": "<YOUR_KC_CLIENT_ID>",
"KC_CLIENT_SECRET": "<YOUR_KC_CLIENT_SECRET>",
"KC_ADMIN_USERNAME": "<YOUR_KC_ADMIN_USERNAME>",
"KC_ADMIN_PASSWORD": "<YOUR_KC_ADMIN_PASSWORD>",
"KC_ADMIN_REALM": "<YOUR_KC_ADMIN_REALM>",
"READ_ONLY": "<YOUR_READ_ONLY>",
"ALLOWED_REALMS": "<YOUR_ALLOWED_REALMS>"
}
}
}
}Cline
{
"mcpServers": {
"mcp-keycloak-admin": {
"command": "npx",
"args": [
"-y",
"mcp-keycloak-admin@0.2.3"
],
"env": {
"KEYCLOAK_BASE_URL": "<YOUR_KEYCLOAK_BASE_URL>",
"KEYCLOAK_REALM": "<YOUR_KEYCLOAK_REALM>",
"AUTH_MODE": "<YOUR_AUTH_MODE>",
"KC_CLIENT_ID": "<YOUR_KC_CLIENT_ID>",
"KC_CLIENT_SECRET": "<YOUR_KC_CLIENT_SECRET>",
"KC_ADMIN_USERNAME": "<YOUR_KC_ADMIN_USERNAME>",
"KC_ADMIN_PASSWORD": "<YOUR_KC_ADMIN_PASSWORD>",
"KC_ADMIN_REALM": "<YOUR_KC_ADMIN_REALM>",
"READ_ONLY": "<YOUR_READ_ONLY>",
"ALLOWED_REALMS": "<YOUR_ALLOWED_REALMS>"
}
}
}
}VS Code
{
"servers": {
"mcp-keycloak-admin": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"mcp-keycloak-admin@0.2.3"
],
"env": {
"KEYCLOAK_BASE_URL": "<YOUR_KEYCLOAK_BASE_URL>",
"KEYCLOAK_REALM": "<YOUR_KEYCLOAK_REALM>",
"AUTH_MODE": "<YOUR_AUTH_MODE>",
"KC_CLIENT_ID": "<YOUR_KC_CLIENT_ID>",
"KC_CLIENT_SECRET": "<YOUR_KC_CLIENT_SECRET>",
"KC_ADMIN_USERNAME": "<YOUR_KC_ADMIN_USERNAME>",
"KC_ADMIN_PASSWORD": "<YOUR_KC_ADMIN_PASSWORD>",
"KC_ADMIN_REALM": "<YOUR_KC_ADMIN_REALM>",
"READ_ONLY": "<YOUR_READ_ONLY>",
"ALLOWED_REALMS": "<YOUR_ALLOWED_REALMS>"
}
}
}
}Claude Desktop
{
"mcpServers": {
"mcp-keycloak-admin": {
"command": "npx",
"args": [
"-y",
"mcp-keycloak-admin@0.2.3"
],
"env": {
"KEYCLOAK_BASE_URL": "<YOUR_KEYCLOAK_BASE_URL>",
"KEYCLOAK_REALM": "<YOUR_KEYCLOAK_REALM>",
"AUTH_MODE": "<YOUR_AUTH_MODE>",
"KC_CLIENT_ID": "<YOUR_KC_CLIENT_ID>",
"KC_CLIENT_SECRET": "<YOUR_KC_CLIENT_SECRET>",
"KC_ADMIN_USERNAME": "<YOUR_KC_ADMIN_USERNAME>",
"KC_ADMIN_PASSWORD": "<YOUR_KC_ADMIN_PASSWORD>",
"KC_ADMIN_REALM": "<YOUR_KC_ADMIN_REALM>",
"READ_ONLY": "<YOUR_READ_ONLY>",
"ALLOWED_REALMS": "<YOUR_ALLOWED_REALMS>"
}
}
}
}Let your agent find its tools
Find servers like mcp-keycloak-admin from your agent. Add Koskamo once to search the index for endpoints, access requirements, and client setup. Public discovery needs no key.