New advertisers: 50% off your first month with code FIRSTMONTHSee slots
nerzal avatar

GoCloak MCP

nerzal/gocloak-mcp

Read-only Keycloak access for users, clients, roles, groups, realms, events, and identity providers.

tools
32
auth
Secret needed
transport
STDIO
env vars
5
last updated
Nov 21, 2026
View on GitHub

What it does

  • Reads users, clients, and roles with list_users, get_user_roles, list_clients, and get_client, filterable by realm and paginated to 100 results
  • Reads groups, realms, login and admin events, auth flows, and identity providers with list_groups, get_realm_info, list_events, and list_identity_providers
  • Requires a dedicated Keycloak service-account client secret and runs locally over stdio, with an optional HTTP mode guarded by a bearer token
  • Designed for auditing and inspecting Keycloak realms without any write or admin capability

Tools

32 tools

Public tool metadata for what this MCP can expose to an agent.

list_usersRead-only tool; see the README's Read-Only Tools section.

Read-only tool; see the README's Read-Only Tools section.

No parameter schema in public metadata yet.

get_userRead-only tool; see the README's Read-Only Tools section.

Read-only tool; see the README's Read-Only Tools section.

No parameter schema in public metadata yet.

count_usersRead-only tool; see the README's Read-Only Tools section.

Read-only tool; see the README's Read-Only Tools section.

No parameter schema in public metadata yet.

get_user_sessionsRead-only tool; see the README's Read-Only Tools section.

Read-only tool; see the README's Read-Only Tools section.

No parameter schema in public metadata yet.

get_user_groupsRead-only tool; see the README's Read-Only Tools section.

Read-only tool; see the README's Read-Only Tools section.

No parameter schema in public metadata yet.

get_user_rolesRead-only tool; see the README's Read-Only Tools section.

Read-only tool; see the README's Read-Only Tools section.

No parameter schema in public metadata yet.

list_clientsRead-only tool; see the README's Read-Only Tools section.

Read-only tool; see the README's Read-Only Tools section.

No parameter schema in public metadata yet.

get_clientRead-only tool; see the README's Read-Only Tools section.

Read-only tool; see the README's Read-Only Tools section.

No parameter schema in public metadata yet.

get_client_service_accountRead-only tool; see the README's Read-Only Tools section.

Read-only tool; see the README's Read-Only Tools section.

No parameter schema in public metadata yet.

list_client_rolesRead-only tool; see the README's Read-Only Tools section.

Read-only tool; see the README's Read-Only Tools section.

No parameter schema in public metadata yet.

list_client_scopesRead-only tool; see the README's Read-Only Tools section.

Read-only tool; see the README's Read-Only Tools section.

No parameter schema in public metadata yet.

get_client_scopeRead-only tool; see the README's Read-Only Tools section.

Read-only tool; see the README's Read-Only Tools section.

No parameter schema in public metadata yet.

list_realm_rolesRead-only tool; see the README's Read-Only Tools section.

Read-only tool; see the README's Read-Only Tools section.

No parameter schema in public metadata yet.

get_realm_roleRead-only tool; see the README's Read-Only Tools section.

Read-only tool; see the README's Read-Only Tools section.

No parameter schema in public metadata yet.

get_users_in_roleRead-only tool; see the README's Read-Only Tools section.

Read-only tool; see the README's Read-Only Tools section.

No parameter schema in public metadata yet.

get_users_in_client_roleRead-only tool; see the README's Read-Only Tools section.

Read-only tool; see the README's Read-Only Tools section.

No parameter schema in public metadata yet.

list_groupsRead-only tool; see the README's Read-Only Tools section.

Read-only tool; see the README's Read-Only Tools section.

No parameter schema in public metadata yet.

count_groupsRead-only tool; see the README's Read-Only Tools section.

Read-only tool; see the README's Read-Only Tools section.

No parameter schema in public metadata yet.

get_groupRead-only tool; see the README's Read-Only Tools section.

Read-only tool; see the README's Read-Only Tools section.

No parameter schema in public metadata yet.

get_group_membersRead-only tool; see the README's Read-Only Tools section.

Read-only tool; see the README's Read-Only Tools section.

No parameter schema in public metadata yet.

get_group_rolesRead-only tool; see the README's Read-Only Tools section.

Read-only tool; see the README's Read-Only Tools section.

No parameter schema in public metadata yet.

list_realmsRead-only tool; see the README's Read-Only Tools section.

Read-only tool; see the README's Read-Only Tools section.

No parameter schema in public metadata yet.

get_realm_infoRead-only tool; see the README's Read-Only Tools section.

Read-only tool; see the README's Read-Only Tools section.

No parameter schema in public metadata yet.

list_eventsRead-only tool; see the README's Read-Only Tools section.

Read-only tool; see the README's Read-Only Tools section.

No parameter schema in public metadata yet.

list_admin_eventsRead-only tool; see the README's Read-Only Tools section.

Read-only tool; see the README's Read-Only Tools section.

No parameter schema in public metadata yet.

list_authentication_flowsRead-only tool; see the README's Read-Only Tools section.

Read-only tool; see the README's Read-Only Tools section.

No parameter schema in public metadata yet.

get_flow_executionsRead-only tool; see the README's Read-Only Tools section.

Read-only tool; see the README's Read-Only Tools section.

No parameter schema in public metadata yet.

list_required_actionsRead-only tool; see the README's Read-Only Tools section.

Read-only tool; see the README's Read-Only Tools section.

No parameter schema in public metadata yet.

list_identity_providersRead-only tool; see the README's Read-Only Tools section.

Read-only tool; see the README's Read-Only Tools section.

No parameter schema in public metadata yet.

get_identity_providerRead-only tool; see the README's Read-Only Tools section.

Read-only tool; see the README's Read-Only Tools section.

No parameter schema in public metadata yet.

list_organizationsRead-only tool; see the README's Read-Only Tools section.

Read-only tool; see the README's Read-Only Tools section.

No parameter schema in public metadata yet.

get_organization_membersRead-only tool; see the README's Read-Only Tools section.

Read-only tool; see the README's Read-Only Tools section.

No parameter schema in public metadata yet.

Configuration

KEYCLOAK_URL*

HTTPS Keycloak base URL (loopback HTTP allowed for local development)

KEYCLOAK_REALM*

Default target realm and token-issuing realm

KEYCLOAK_CLIENT_ID*

Confidential service-account client ID

KEYCLOAK_CLIENT_SECRET*secret

Service-account client secret

KEYCLOAK_ALLOWED_REALMS

Optional comma-separated allowlist of queryable realms

Readme

gocloak-mcp

CI Release Go GHCR License

A security-first, read-only Keycloak MCP server built in Go with the official MCP Go SDK and GoCloak v15. Supports Stdio (default) and Streamable HTTP transports, multi-realm allowlisting, and full read-only parity across Users, Clients, Client Scopes, Roles, Groups, Realms, Events, Authentication Flows, Required Actions, Identity Providers, and Keycloak 26+ Organizations.

In Stdio mode, standard output is strictly reserved for JSON-RPC frames and all structured JSON logs are written to standard error with automatic redaction.


View the full README on GitHub

Details

Repository
github.com/nerzal/gocloak-mcp
Categories
Security, DevOps & Cloud, Developer Tools
Package
ghcr.io/nerzal/gocloak-mcp:0.3.0
Transport
STDIO
Auth
Required
Registry
MCP registry, active

Similar to GoCloak MCP

More Security