Keycloak model context protocol
MCP server by ChristophEnglisch Verified · gh:christophenglisch
Keycloak MCP server lets an AI assistant manage Keycloak users, groups, roles and sessions through the Keycloak Admin REST API. It is aimed at administrators who want least-privilege, guarded access to their realms.
Install Keycloak model context protocol
Built from the published package, never by AI.
claude mcp add keycloak-model-context-protocol -- npx -y keycloak-model-context-protocolRun in your terminal. Add --scope user to use it in every project.
Step-by-step: install Keycloak model context protocol in Claude Code
{
"mcpServers": {
"keycloak-model-context-protocol": {
"args": [
"-y",
"keycloak-model-context-protocol"
],
"command": "npx"
}
}
}Settings, Developer, Edit config. Paste into claude_desktop_config.json and restart.
Step-by-step: install Keycloak model context protocol in Claude Desktop
{
"mcpServers": {
"keycloak-model-context-protocol": {
"args": [
"-y",
"keycloak-model-context-protocol"
],
"command": "npx"
}
}
}Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (this project).
Step-by-step: install Keycloak model context protocol in Cursor
{
"servers": {
"keycloak-model-context-protocol": {
"args": [
"-y",
"keycloak-model-context-protocol"
],
"command": "npx"
}
}
}Add to .vscode/mcp.json. VS Code uses "servers", not "mcpServers".
Step-by-step: install Keycloak model context protocol in VS Code
codex mcp add keycloak-model-context-protocol -- npx -y keycloak-model-context-protocolStep-by-step: install Keycloak model context protocol in Codex
{
"mcpServers": {
"keycloak-model-context-protocol": {
"args": [
"-y",
"keycloak-model-context-protocol"
],
"command": "npx"
}
}
}Add to ~/.gemini/config/mcp_config.json (all projects) or .agents/mcp_config.json (this project).
Step-by-step: install Keycloak model context protocol in Antigravity CLI
gemini mcp add keycloak-model-context-protocol npx -y keycloak-model-context-protocolGemini CLI was replaced by Antigravity CLI in June 2026 and remains only for enterprise licences and paid API keys.
Step-by-step: install Keycloak model context protocol in Gemini CLI
MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the keycloak-model-context-protocol block.
About
This MCP server lets an AI assistant such as Claude administer a Keycloak server. It covers users, groups, roles and sessions, and can inspect clients, events and the security posture of realms. It talks to the Keycloak Admin REST API and runs as a local stdio child process started by the MCP client.
Tools are grouped into toolsets, and only the core, groups and roles toolsets are enabled by default. Every tool that changes data returns a preview unless the assistant repeats the call with confirm set to true. A read-only mode, a realm allowlist and write protection for the master realm are available. The source recommends a dedicated service-account client with only the roles needed. It is for administrators who manage Keycloak realms and users.
Written from the project's README and checked against it.
Tools it gives your assistant
realm_listLists the realms the account can access.user_searchSearches users in a realm.user_getReturns the details of one user.user_createCreates a user. Sensitive, so it needs confirmation by default.user_updateChanges a user's profile. Sensitive, so it needs confirmation by default.user_deleteDeletes a user. Destructive, so it needs confirmation by default.group_listLists groups in a realm.user_role_assignAssigns a role to a user. Sensitive, so it needs confirmation by default.user_logoutEnds a user's sessions. Destructive, so it needs confirmation by default.audit_realm_securityRead-only security review prompt with prioritized findings.
What you need
- Node.js 22 or newer
- A Keycloak server the machine can reach (tested with Keycloak 24.0 to 26.8)
- An MCP client such as Claude Desktop, Claude Code, VS Code or Cursor
- A Keycloak client with service account roles from realm-management
Try asking
- List the realms I can access, then show the first 10 users of realm demo.
- Find users in realm demo whose names match Smith and show their groups.
- Run a read-only security audit of realm demo with prioritized findings.
Good to know
- Acts with the permissions of the Keycloak account it is given, so use a dedicated least-privilege client.
- Write tools need confirmation by default, and the confirmation cannot be turned off for administrative rights changes.
- Write tools in the master realm are off by default.
- Tested with Keycloak 24.0 to 26.8 only.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: README.md, package.json. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to Keycloak model context protocol
All alternatives →Agentmesh MCP Proxy is a security proxy for MCP servers, described by its publisher as a firewall for the Model Context Protocol. It is aimed at teams that run AI agents which call tools and other agents.
Hardens client-side artifacts such as binaries, Electron apps, JS bundles, Python and WebAssembly against AI reverse-engineering agents. Built for developers who ship proprietary logic to user-controlled devices.
Bla Agents is an MCP server and CLI that adds seeded, format-specific decoys to shipped binaries, JavaScript, WebAssembly and other artifacts. It is for developers who ship proprietary logic to user-controlled devices and want to make AI reverse-engineering slower.
A shared OAuth server for the MCP route of an app, built on better-auth, with passkey sign-in for the owner
Agent Governance Toolkit adds policy enforcement, identity, sandboxing and audit logging to autonomous AI agents. It is aimed at teams shipping agents to production. The source does not confirm the Claude Desktop MCP server named in the listing.
Convex MCP Gateway is a Convex component that exposes selected Convex functions as MCP tools. It checks each call with your own authorize callback and writes an audit log. It is for developers who run Convex apps and want AI assistants to call parts of them.
Compare with Agentmesh MCP Proxy, Bla or Bla Agents
Keycloak model context protocol: common questions
Does the Keycloak MCP server change data without asking?
No. By default every tool that deletes, revokes, or changes identity, credentials or rights returns a preview first. It only applies the change when the call is repeated with confirm set to true.
Can I run the Keycloak MCP server in read-only mode?
Yes. The source says a read-only mode is available, and in that mode only read tools are registered.
Which authentication method does the Keycloak MCP server use?
The source recommends the client_credentials grant with a service account. The password grant is also supported.
How do I install Keycloak model context protocol?
In Claude Code run claude mcp add keycloak-model-context-protocol -- npx -y keycloak-model-context-protocol. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.
Is Keycloak model context protocol the official server?
Keycloak model context protocol is published by gh:christophenglisch from its verified domain in the official MCP Registry.
Is Keycloak model context protocol free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is Keycloak model context protocol safe to use?
It scores 70 of 100. Grades: maintenance B, licence A, quality C. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to Keycloak model context protocol?
Similar MCP servers: Agentmesh MCP Proxy, Bla, Bla Agents, MCP Auth.
Does Keycloak model context protocol work with ChatGPT?
Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.
