Keycloak MCP Server
MCP ServerFree** - designed to work with Keycloak for identity and access management, with about 40+ tools covering, Users, Realms, Clients, Roles, Groups, IDPs, Authentication. Native builds available.
Capabilities12 decomposed
jwt-authenticated mcp protocol bridging to keycloak admin api
Medium confidenceImplements the Model Context Protocol (MCP) specification over Server-Sent Events (SSE) transport, accepting HTTP requests at /mcp/sse endpoint with JWT bearer tokens. The server validates each JWT against the Keycloak instance, extracts user identity and permissions, then proxies authenticated requests to Keycloak's Admin API using the user's own token rather than a shared service account. This zero-authorization proxy design delegates all permission enforcement to Keycloak itself, eliminating authorization bypass vulnerabilities.
Uses per-request JWT validation with request-scoped authenticated context instead of shared service accounts, combined with zero-authorization proxy pattern that delegates all permission checks to Keycloak itself. Quarkus-based implementation provides native binary compilation for minimal startup time and memory footprint.
Eliminates service account credential management and provides true per-user audit trails compared to traditional proxy approaches that use shared credentials, while native Quarkus builds offer 10-50x faster startup than JVM-based alternatives.
user management operations via keycloak admin api proxy
Medium confidenceExposes 40+ Keycloak Admin API operations through MCP tools, with dedicated service layer for user management including create, read, update, delete, and search operations. The UserService class implements domain-specific user operations that are marshaled through KeycloakTool and exposed as callable MCP tools. Each operation constructs authenticated Keycloak client instances via KeycloakClientFactory using the request's JWT token, ensuring operations execute with the user's actual Keycloak permissions.
Implements domain-specific UserService class that abstracts Keycloak Admin API complexity, with request-scoped client factory pattern ensuring each operation uses the authenticated user's JWT token. Exposes user operations as discrete MCP tools callable by AI assistants without requiring knowledge of Keycloak REST API structure.
Provides higher-level user management abstractions compared to raw Keycloak Admin API calls, while maintaining per-user permission enforcement that prevents privilege escalation compared to service account-based approaches.
native binary compilation and containerized deployment
Medium confidenceProvides Quarkus-based native binary compilation enabling deployment as standalone executables without JVM, with Docker container images and Kubernetes/OpenShift manifests for orchestrated deployment. The build system generates native binaries with GraalVM, producing executables with sub-second startup time and minimal memory footprint (~50-100MB vs 300-500MB for JVM). Includes pre-built container images and deployment configurations for Docker, Kubernetes, and OpenShift environments.
Leverages Quarkus framework for native binary compilation with GraalVM, producing sub-second startup executables with minimal memory footprint. Includes pre-built container images and Kubernetes/OpenShift deployment manifests for production-ready deployment.
Provides 10-50x faster startup time and 50-80% lower memory consumption compared to traditional JVM-based Java applications, while maintaining full Keycloak Admin API compatibility.
stateless request processing with request-scoped dependency injection
Medium confidenceImplements stateless architecture using Quarkus request-scoped dependency injection, where each HTTP request receives isolated service instances and authenticated Keycloak client. The architecture eliminates shared state across requests, preventing credential leakage and ensuring request isolation. Request-scoped beans are instantiated per request and garbage collected after response, providing automatic resource cleanup and preventing memory leaks from accumulated client connections.
Implements strict request-scoped architecture using Quarkus DI, ensuring each request receives isolated service instances and authenticated client with automatic garbage collection. Eliminates shared state and credential leakage vulnerabilities.
Provides stronger request isolation compared to singleton-scoped services, while enabling horizontal scaling without shared state synchronization or connection pooling complexity.
realm configuration and management through mcp tools
Medium confidenceExposes Keycloak realm-level operations through dedicated RealmService class, enabling creation, configuration, and management of realms as isolated security domains. The service layer abstracts realm operations including realm creation with default settings, theme configuration, security policy updates, and realm deletion. Each realm operation is authenticated using the request's JWT token and executed against the Keycloak Admin API with the user's actual permissions.
Implements RealmService abstraction layer that encapsulates realm lifecycle operations, with request-scoped JWT authentication ensuring realm operations respect the authenticated user's actual Keycloak permissions. Enables AI assistants to manage realm configuration without exposing raw Keycloak Admin API complexity.
Provides realm management through MCP protocol compared to manual Keycloak Admin Console or raw REST API calls, while maintaining per-user audit trails and permission enforcement that prevents unauthorized realm modifications.
client application registration and configuration
Medium confidenceExposes Keycloak client (OAuth2/OIDC application) management through dedicated ClientService, enabling creation, configuration, and lifecycle management of client applications. The service handles client creation with protocol-specific settings (OpenID Connect, SAML, etc.), credential generation, redirect URI configuration, and scope/role assignment. Each client operation uses the request's JWT token to authenticate against Keycloak Admin API, ensuring operations respect the user's actual permissions.
Implements ClientService abstraction that handles protocol-specific client configuration (OpenID Connect, SAML) through unified MCP interface, with request-scoped JWT authentication ensuring client operations respect user permissions. Supports both public and confidential client types with automatic credential generation.
Provides application registration through MCP protocol compared to manual Keycloak Admin Console, while supporting multiple OAuth2/OIDC protocols and maintaining per-user audit trails for compliance requirements.
role-based access control (rbac) definition and assignment
Medium confidenceExposes Keycloak role management through dedicated RoleService, enabling creation of realm-level and client-level roles, role hierarchy definition, and role assignment to users and groups. The service abstracts role operations including role creation with descriptions, composite role definition (roles containing other roles), and role-to-user/group mappings. Each role operation uses the request's JWT token to authenticate against Keycloak Admin API with the user's actual permissions.
Implements RoleService abstraction supporting both realm-level and client-level roles with composite role hierarchies, exposed through MCP interface. Request-scoped JWT authentication ensures role operations respect user permissions while enabling AI assistants to design and manage complex RBAC structures.
Provides role management through MCP protocol compared to manual Keycloak Admin Console, while supporting composite role hierarchies and maintaining per-user audit trails for compliance.
group-based user organization and permission inheritance
Medium confidenceExposes Keycloak group management through dedicated GroupService, enabling creation of hierarchical user groups, group membership management, and group-level role assignment. The service handles group creation with parent-child relationships, user membership operations, and role inheritance through group membership. Each group operation uses the request's JWT token to authenticate against Keycloak Admin API with the user's actual permissions.
Implements GroupService supporting hierarchical group structures with parent-child relationships and group-level role assignment, exposed through MCP interface. Request-scoped JWT authentication ensures group operations respect user permissions while enabling organizational structure management.
Provides group management through MCP protocol compared to manual Keycloak Admin Console, while supporting hierarchical organization structures and group-level role inheritance for simplified permission management.
identity provider (idp) federation and social login configuration
Medium confidenceExposes Keycloak identity provider management through dedicated IDPService, enabling configuration of external identity providers (SAML, OpenID Connect, social providers) for user federation and social login. The service handles IDP creation with protocol-specific settings, mapper configuration for attribute transformation, and IDP-to-realm linking. Each IDP operation uses the request's JWT token to authenticate against Keycloak Admin API with the user's actual permissions.
Implements IDPService supporting multiple identity provider protocols (SAML, OpenID Connect, social providers) with protocol-specific attribute mappers, exposed through MCP interface. Request-scoped JWT authentication ensures IDP operations respect user permissions while enabling federated identity configuration.
Provides IDP management through MCP protocol compared to manual Keycloak Admin Console, while supporting multiple federation protocols and attribute transformation for complex identity scenarios.
authentication flow and policy configuration
Medium confidenceExposes Keycloak authentication flow management through dedicated AuthenticationService, enabling creation and configuration of custom authentication flows, execution policies, and authentication requirements. The service handles flow creation with execution steps (password, OTP, WebAuthn, etc.), conditional execution policies, and flow binding to realms or clients. Each authentication operation uses the request's JWT token to authenticate against Keycloak Admin API with the user's actual permissions.
Implements AuthenticationService supporting complex authentication flows with conditional execution policies and multiple authentication methods, exposed through MCP interface. Request-scoped JWT authentication ensures authentication operations respect user permissions while enabling advanced security policy configuration.
Provides authentication flow management through MCP protocol compared to manual Keycloak Admin Console, while supporting conditional execution and multi-factor authentication policies for advanced security scenarios.
keycloak admin api operation marshaling and error handling
Medium confidenceImplements KeycloakTool class that marshals 40+ Keycloak Admin API operations into discrete MCP tool definitions with standardized input/output schemas, error handling, and response transformation. The tool layer accepts MCP tool invocation requests, validates parameters against operation schemas, invokes corresponding service methods, and transforms responses into MCP-compatible format. Implements comprehensive error handling that catches Keycloak API errors and transforms them into human-readable MCP error responses.
Implements KeycloakTool marshaling layer that abstracts 40+ Keycloak Admin API operations into standardized MCP tool definitions with schema validation and error transformation. Provides single point of integration between MCP protocol and Keycloak Admin API with comprehensive error handling.
Provides standardized tool marshaling compared to direct Keycloak Admin API calls, while abstracting protocol differences and providing consistent error handling across 40+ operations.
request-scoped jwt validation and authenticated keycloak client instantiation
Medium confidenceImplements KeycloakClientFactory that creates request-scoped authenticated Keycloak client instances using JWT tokens from HTTP Authorization headers. The factory validates JWT tokens against the Keycloak instance, extracts user identity and realm information, and instantiates Keycloak Admin API clients with the user's credentials. Each request receives its own client instance ensuring isolation and preventing credential leakage across requests. The authentication system delegates all permission enforcement to Keycloak itself — the proxy contains zero authorization logic.
Implements request-scoped client factory pattern with per-request JWT validation and zero authorization logic, delegating all permission enforcement to Keycloak itself. Eliminates service account credential management while maintaining complete per-user audit trails.
Provides per-user authentication compared to shared service account approaches, while eliminating authorization bypass vulnerabilities through zero-authorization proxy design that delegates all permission checks to Keycloak.
Capabilities are decomposed by AI analysis. Each maps to specific user intents and improves with match feedback.
Related Artifactssharing capabilities
Artifacts that share capabilities with Keycloak MCP Server, ranked by overlap. Discovered automatically through the match graph.
mcp-auth
Plug and play auth for Model Context Protocol (MCP) servers
mcp-remote
Remote proxy for Model Context Protocol, allowing local-only clients to connect to remote servers using oAuth
mcp-auth
Plug and play auth for Model Context Protocol (MCP) servers
MCPVerse
** - A portal for creating & hosting authenticated MCP servers and connecting to them securely.
mcp-use
The fullstack MCP framework to develop MCP Apps for ChatGPT / Claude & MCP Servers for AI Agents.
1mcpserver
** - MCP of MCPs. Automatic discovery and configure MCP servers on your local machine. Fully REMOTE! Just use [https://mcp.1mcpserver.com/mcp/](https://mcp.1mcpserver.com/mcp/)
Best For
- ✓Teams integrating AI assistants (Claude Desktop, Cursor IDE) with Keycloak
- ✓Organizations requiring per-user audit trails for identity management operations
- ✓DevOps teams automating Keycloak administration through MCP-compatible tools
- ✓Identity administrators automating user lifecycle management
- ✓AI agents handling user onboarding/offboarding workflows
- ✓Teams building self-service user management interfaces
- ✓Teams deploying to resource-constrained environments (edge, embedded)
- ✓Kubernetes/OpenShift operators requiring minimal container footprint
Known Limitations
- ⚠SSE transport adds request-response latency compared to direct REST API calls
- ⚠Requires valid JWT token from Keycloak for every request — no token caching across requests
- ⚠MCP protocol overhead adds ~50-100ms per operation compared to raw HTTP
- ⚠No built-in request batching — each operation requires separate HTTP request
- ⚠No built-in pagination — large user searches may timeout if result sets exceed 1000 users
- ⚠Password operations limited to admin-initiated resets; users cannot self-serve password changes through this interface
Requirements
Input / Output
UnfragileRank
UnfragileRank is computed from adoption signals, documentation quality, ecosystem connectivity, match graph feedback, and freshness. No artifact can pay for a higher rank.
About
** - designed to work with Keycloak for identity and access management, with about 40+ tools covering, Users, Realms, Clients, Roles, Groups, IDPs, Authentication. Native builds available.
Categories
Alternatives to Keycloak MCP Server
Are you the builder of Keycloak MCP Server?
Claim this artifact to get a verified badge, access match analytics, see which intents users search for, and manage your listing.
Get the weekly brief
New tools, rising stars, and what's actually worth your time. No spam.
Data Sources
Looking for something else?
Search →