Manage Keycloak users, groups, roles and realms through the Keycloak Admin REST API.
MCPpedia last refreshed this data
Keycloak Model Context Protocol is an MCP server that manage Keycloak users, groups, roles and realms through the Keycloak Admin REST API. Its tool list has not been published yet over stdio, requires no API key, and scores 85/100 on MCPpedia's security, maintenance and efficiency rubric.
Config is the same across clients - only the file and path differ.
{
"mcpServers": {
"keycloak": {
"env": {
"KEYCLOAK_URL": "http://localhost:8080",
"KEYCLOAK_ADMIN": "admin",
"KEYCLOAK_ADMIN_PASSWORD": "admin"
},
"args": [
"-y",
"keycloak-model-context-protocol"
],
"command": "npx"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
Manage Keycloak users, groups, roles and realms through the Keycloak Admin REST API.
Run this in your terminal to verify the server starts. Then let us know if it worked - your result helps other developers.
npx -y 'keycloak-model-context-protocol' 2>&1 | head -1 && echo "✓ Server started successfully"
After testing, let us know if it worked:
Five weighted categories - click any category to see the underlying evidence.
No known CVEs.
Checked keycloak-model-context-protocol against OSV.dev.
Be the first to review
Have you used this server?
Share your experience - it helps other developers decide.
Sign in to write a review.
Others in security / devops
MCP server for using the GitLab API
Search-first MCP server for JavaScript reverse engineering: 736 tools across 36 domains.
Publish HTML, Markdown, PDF, or images as instant shareable links with expiry and passwords.
MCP server for discovering, reading, and changing ZenML resources with compact generic tools
MCP Security Weekly
Get CVE alerts and security updates for Keycloak Model Context Protocol and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
A Model Context Protocol (MCP) server for Keycloak administration. It lets an AI assistant such as Claude manage users, groups, roles and sessions, and inspect clients, events and the security posture of your realms, through the Keycloak Admin REST API, with least-privilege authentication and guardrails around every write.
[!WARNING] This server acts with the permissions of the Keycloak account you give it. Use a dedicated service-account client with only the roles you need, never the bootstrap admin. Every tool that changes data asks for confirmation by default, and a read-only mode is available. See Security.
core, groups, roles) is small; everything else is opt-in.client_credentials with a service account is the recommended grant; the password grant stays available. No credential defaults, so a missing setting fails fast.master realm, and a preview-then-confirm: true flow for every change. Grants of administrative rights are detected through composite roles and parent groups.Your MCP client starts the server as a local child process and talks to it over stdio. Every tool call passes the guards, then goes through a single gateway that owns the Keycloak login and caches the access token.
Every tool that changes data is destructive (it deletes or revokes) or sensitive (it changes identity, credentials, rights or protection mechanisms, for example user_update or user_role_assign). Called without confirm: true, such a tool only returns a preview of what would happen and changes nothing. After you approve, the assistant repeats the call with confirm: true.
The model can set confirm: true itself, even on its first call. The server then still computes the preview and returns it with the result, but only your client's approval prompt proves that a human agreed. All these tools carry destructiveHint, so clients that ask before destructive calls ask here too.
Requirements: Node.js 22 or newer, a Keycloak server your machine can reach (tested with Keycloak 24.0 to 26.8), and an MCP client.
In the realm you want to administer (here demo):
mcp-admin with Client authentication on and only Service accounts roles enabled (turn off _Standa