Skip to main content
Glama
mcp-keycloak

mcp-keycloak

by idoyudha

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
PASSWORDYesThe admin password for Keycloak authentication
USERNAMEYesThe admin username for Keycloak authentication
CLIENT_IDNoOptional OAuth2 client ID for authentication
REALM_NAMEYesThe name of the Keycloak realm to manage
SERVER_URLYesThe URL of your Keycloak server (e.g., https://your-keycloak-server.com)
CLIENT_SECRETNoOptional OAuth2 client secret for authentication

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_clientsB
List clients in the realm.

Args:
    client_id: Filter by client ID (partial match)
    viewable_only: Only return viewable clients
    first: Pagination offset
    max: Maximum results size
    realm: Target realm (uses default if not specified)

Returns:
    List of client objects
get_clientA
Get a specific client by database ID.

Args:
    id: The client's database ID (not client_id)
    realm: Target realm (uses default if not specified)

Returns:
    Client object
get_client_by_clientidC
Get a specific client by client ID.

Args:
    client_id: The client's client_id
    realm: Target realm (uses default if not specified)

Returns:
    Client object
create_clientC
Create a new client.

Args:
    client_id: Client ID (unique identifier)
    name: Display name
    description: Client description
    enabled: Whether the client is enabled
    always_display_in_console: Always display in account console
    root_url: Root URL for relative URLs
    redirect_uris: Valid redirect URIs
    web_origins: Allowed CORS origins
    protocol: Protocol (openid-connect or saml)
    public_client: Public client (no secret)
    bearer_only: Bearer-only client
    service_accounts_enabled: Enable service accounts
    authorization_services_enabled: Enable authorization services
    direct_access_grants_enabled: Enable direct access grants (password flow)
    implicit_flow_enabled: Enable implicit flow
    standard_flow_enabled: Enable standard flow (authorization code)
    realm: Target realm (uses default if not specified)

Returns:
    Status message
update_clientC
Update an existing client.

Args:
    id: The client's database ID
    client_id: New client ID
    name: New display name
    description: New description
    enabled: Whether the client is enabled
    redirect_uris: New redirect URIs
    web_origins: New CORS origins
    public_client: Whether client is public
    service_accounts_enabled: Enable service accounts
    direct_access_grants_enabled: Enable direct access grants
    realm: Target realm (uses default if not specified)

Returns:
    Status message
delete_clientC
Delete a client.

Args:
    id: The client's database ID
    realm: Target realm (uses default if not specified)

Returns:
    Status message
get_client_secretC
Get the client secret.

Args:
    id: The client's database ID
    realm: Target realm (uses default if not specified)

Returns:
    Client secret object
regenerate_client_secretC
Regenerate the client secret.

Args:
    id: The client's database ID
    realm: Target realm (uses default if not specified)

Returns:
    New client secret object
get_client_service_accountB
Get service account user for a client.

Args:
    id: The client's database ID
    realm: Target realm (uses default if not specified)

Returns:
    Service account user object
list_groupsA
List all groups in the realm.

Args:
    first: Pagination offset
    max: Maximum results size
    search: Search string
    realm: Target realm (uses default if not specified)

Returns:
    List of groups
get_groupC
Get a specific group by ID.

Args:
    group_id: Group ID
    realm: Target realm (uses default if not specified)

Returns:
    Group object
create_groupC
Create a new group.

Args:
    name: Group name
    path: Group path
    attributes: Group attributes
    realm: Target realm (uses default if not specified)

Returns:
    Status message
update_groupC
Update a group.

Args:
    group_id: Group ID
    name: New group name
    path: New group path
    attributes: New group attributes
    realm: Target realm (uses default if not specified)

Returns:
    Status message
delete_groupC
Delete a group.

Args:
    group_id: Group ID
    realm: Target realm (uses default if not specified)

Returns:
    Status message
get_group_membersA
Get members of a group.

Args:
    group_id: Group ID
    first: Pagination offset
    max: Maximum results size
    realm: Target realm (uses default if not specified)

Returns:
    List of group members
add_user_to_groupC
Add a user to a group.

Args:
    user_id: User ID
    group_id: Group ID
    realm: Target realm (uses default if not specified)

Returns:
    Status message
remove_user_from_groupC
Remove a user from a group.

Args:
    user_id: User ID
    group_id: Group ID
    realm: Target realm (uses default if not specified)

Returns:
    Status message
get_user_groupsA
Get all groups for a user.

Args:
    user_id: User ID
    realm: Target realm (uses default if not specified)

Returns:
    List of groups the user belongs to
get_accessible_realmsA
Get accessible realms.

Returns:
    List of accessible realms
get_realm_infoC
Get information about the current realm.

Args:
    realm: Target realm (uses default if not specified)

Returns:
    Realm configuration object
update_realm_settingsC
Update realm settings.

Args:
    display_name: Display name for the realm
    display_name_html: HTML display name
    login_theme: Login theme name
    account_theme: Account management theme
    admin_theme: Admin console theme
    email_theme: Email theme
    enabled: Whether realm is enabled
    registration_allowed: Allow user registration
    registration_email_as_username: Use email as username
    reset_password_allowed: Allow password reset
    remember_me: Enable remember me
    verify_email: Require email verification
    login_with_email_allowed: Allow login with email
    duplicate_emails_allowed: Allow duplicate emails
    ssl_required: SSL requirement (none, external, all)
    brute_force_protected: Enable brute force protection
    permanent_lockout: Permanent lockout on max failures
    max_failure_wait_seconds: Max wait after failures
    minimum_quick_login_wait_seconds: Min wait between quick logins
    wait_increment_seconds: Wait increment
    quick_login_check_milli_seconds: Quick login check interval
    max_delta_time_seconds: Max time between failures
    failure_factor: Failure factor
    default_locale: Default locale
    realm: Target realm (uses default if not specified)

Returns:
    Status message
get_realm_events_configC
Get realm events configuration.

Args:
    realm: Target realm (uses default if not specified)

Returns:
    Events configuration object
update_realm_events_configC
Update realm events configuration.

Args:
    events_enabled: Enable events
    events_listeners: Event listener implementations
    enabled_event_types: Types of events to record
    admin_events_enabled: Enable admin events
    admin_events_details_enabled: Include details in admin events
    realm: Target realm (uses default if not specified)

Returns:
    Status message
get_realm_default_groupsA
Get default groups for the realm.

Args:
    realm: Target realm (uses default if not specified)

Returns:
    List of default groups
add_realm_default_groupC
Add a default group to the realm.

Args:
    group_id: Group ID to add as default
    realm: Target realm (uses default if not specified)

Returns:
    Status message
remove_realm_default_groupC
Remove a default group from the realm.

Args:
    group_id: Group ID to remove from defaults
    realm: Target realm (uses default if not specified)

Returns:
    Status message
remove_all_user_sessionsB
Remove all sessions for all users in the realm.

Args:
    realm: Target realm (uses default if not specified)

Returns:
    Status message
list_realm_rolesA
List all realm roles.

Args:
    first: Pagination offset
    max: Maximum results size
    search: Search string
    realm: Target realm (uses default if not specified)

Returns:
    List of realm roles
get_realm_roleC
Get a specific realm role by name.

Args:
    role_name: Role name
    realm: Target realm (uses default if not specified)

Returns:
    Role object
create_realm_roleC
Create a new realm role.

Args:
    name: Role name
    description: Role description
    composite: Whether this is a composite role
    client_role: Whether this is a client role
    realm: Target realm (uses default if not specified)

Returns:
    Status message
update_realm_roleC
Update a realm role.

Args:
    role_name: Current role name
    description: New description
    composite: Whether this is a composite role
    realm: Target realm (uses default if not specified)

Returns:
    Status message
delete_realm_roleC
Delete a realm role.

Args:
    role_name: Role name to delete
    realm: Target realm (uses default if not specified)

Returns:
    Status message
list_client_rolesB
List roles for a specific client.

Args:
    client_id: Client database ID
    first: Pagination offset
    max: Maximum results size
    search: Search string
    realm: Target realm (uses default if not specified)

Returns:
    List of client roles
create_client_roleC
Create a new client role.

Args:
    client_id: Client database ID
    name: Role name
    description: Role description
    composite: Whether this is a composite role
    realm: Target realm (uses default if not specified)

Returns:
    Status message
assign_realm_role_to_userC
Assign realm roles to a user.

Args:
    user_id: User ID
    role_names: List of role names to assign
    realm: Target realm (uses default if not specified)

Returns:
    Status message
remove_realm_role_from_userC
Remove realm roles from a user.

Args:
    user_id: User ID
    role_names: List of role names to remove
    realm: Target realm (uses default if not specified)

Returns:
    Status message
get_user_realm_rolesA
Get realm roles for a user.

Args:
    user_id: User ID
    effective: Get effective roles (including composite roles)
    realm: Target realm (uses default if not specified)

Returns:
    List of realm roles
assign_client_role_to_userC
Assign client roles to a user.

Args:
    user_id: User ID
    client_id: Client database ID
    role_names: List of role names to assign
    realm: Target realm (uses default if not specified)

Returns:
    Status message
list_usersA
List users in the realm.

Args:
    first: Pagination offset
    max: Maximum results size (defaults to 100)
    search: Search string for username, first/last name, or email
    username: Username filter
    email: Email filter
    enabled: Filter by enabled/disabled users
    realm: Target realm (uses default if not specified)

Returns:
    List of user objects
get_userC
Get a specific user by ID.

Args:
    user_id: The user's ID
    realm: Target realm (uses default if not specified)

Returns:
    User object
create_userC
Create a new user.

Args:
    username: Username for the new user
    email: Email address
    first_name: First name
    last_name: Last name
    enabled: Whether the user is enabled
    email_verified: Whether the email is verified
    temporary_password: Initial password (user will be required to change it)
    attributes: Additional user attributes
    realm: Target realm (uses default if not specified)

Returns:
    Dict with status and location of created user
update_userB
Update an existing user.

Args:
    user_id: The user's ID
    username: New username
    email: New email address
    first_name: New first name
    last_name: New last name
    enabled: Whether the user is enabled
    email_verified: Whether the email is verified
    attributes: Updated user attributes
    realm: Target realm (uses default if not specified)

Returns:
    Status message
delete_userC
Delete a user.

Args:
    user_id: The user's ID
    realm: Target realm (uses default if not specified)

Returns:
    Status message
reset_user_passwordC
Reset a user's password.

Args:
    user_id: The user's ID
    password: New password
    temporary: Whether the password is temporary (user must change on next login)
    realm: Target realm (uses default if not specified)

Returns:
    Status message
get_user_sessionsB
Get active sessions for a user.

Args:
    user_id: The user's ID
    realm: Target realm (uses default if not specified)

Returns:
    List of active sessions
logout_userB
Logout all sessions for a user.

Args:
    user_id: The user's ID
    realm: Target realm (uses default if not specified)

Returns:
    Status message
count_usersA
Count all users.

Args:
    realm: Target realm (uses default if not specified)

Returns:
    Number of users

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

B3/5.0

Scored across 47 tools

Disambiguation4/5

Most tools target a clearly distinct resource and action, with role/user/group/client boundaries generally easy to infer. A few pairs could still be confused at a glance, notably get_client vs get_client_by_clientid and logout_user vs remove_all_user_sessions, though their descriptions clarify the differences.

Naming Consistency5/5

Tool names follow a predictable snake_case verb_noun pattern throughout, such as list_users, create_group, update_realm_role, and assign_client_role_to_user. Minor naming quirks like get_client_by_clientid do not break the overall consistency.

Tool Count2/5

The server exposes 47 tools, which is well above the typical well-scoped range and makes the surface feel heavy even for Keycloak administration. While the domain is broad, many tools are highly granular and could be consolidated or grouped.

Completeness3/5

Core CRUD and lifecycle operations are covered for users, groups, clients, and realm roles, along with sessions, secrets, and realm settings. However, there are notable role-management gaps: client roles can be listed and created but not updated/deleted, and there is no remove_client_role_from_user counterpart to assign_client_role_to_user.

Maintenance

ActivityNo data
ResponsivenessOutdated data