Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

mcp-keycloak

MCP server by dockndevai Community

Lets AI assistants inspect and manage Keycloak realms, users, clients, roles and groups. It starts read-only and uses flags to limit realms, block deletes and log changes. Aimed at teams running Keycloak with MCP clients.

  • Score 78
  • 1 stars
  • 327 a week
  • MIT
  • Updated

Install mcp-keycloak

Built from the published package, never by AI.

claude mcp add mcp-keycloak -e KEYCLOAK_URL=YOUR_KEYCLOAK_URL -- npx -y @dockndevai/mcp-keycloak

Run in your terminal. Add --scope user to use it in every project.

Step-by-step: install mcp-keycloak in Claude Code

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 mcp-keycloak block.

About

mcp-keycloak is a Model Context Protocol server for Keycloak. It lets an MCP-capable client, such as Claude Desktop or Claude Code, inspect and manage Keycloak realms, users, clients, roles, and groups. Every tool takes a realm argument, and access is controlled by flags.

The server is built around safe defaults. It starts in read-only mode, can be limited to an allowlist of realms, and keeps the master realm protected from changes. Delete tools need both admin mode and an explicit opt-in. Dry-run and JSON audit logging are also available. It suits administrators who want an AI agent to work with Keycloak under strict controls.

Written from the project's README and checked against it.

Tools it gives your assistant

  • list_realmsLists the Keycloak realms available to the server.
  • get_realmReturns details for a single realm.
  • list_usersLists users in a realm.
  • get_userReturns details for a single user.
  • count_usersCounts the users in a realm.
  • list_clientsLists clients in a realm.
  • list_realm_rolesLists realm roles in a realm.
  • list_groupsLists groups in a realm.
  • create_userCreates a user. Requires read-write mode or higher.
  • update_userUpdates an existing user. Requires read-write mode or higher.

What you need

  • A running Keycloak server reachable at KEYCLOAK_URL
  • Keycloak client credentials or an admin username and password
  • An MCP-capable client such as Claude Desktop, Claude Code, Cursor or VS Code
  • npm and npx to run the published package
SettingNeededWhat it is
KEYCLOAK_URLEnvironment variableRequiredBase URL of the Keycloak server (no trailing slash).
KEYCLOAK_CLIENT_IDEnvironment variableOptionalClient id used to authenticate (default admin-cli).
KEYCLOAK_CLIENT_SECRETEnvironment variable, secretOptionalService-account client secret (or use KEYCLOAK_USERNAME/PASSWORD).
KEYCLOAK_MODEEnvironment variableOptionalAccess mode: read-only | read-write | admin.

From the publisher's entry in the official MCP Registry. Required settings are already in the install config below as placeholders.

Try asking

  • List all users in the staging realm
  • How many users are in the demo realm?
  • Show the realm roles defined in the staging realm

Good to know

  • Starts in read-only mode by default.
  • Delete users requires admin mode and KEYCLOAK_ALLOW_DELETE set to true.
  • Protected realms, master by default, can be read but never changed.
  • Clients without elicitation support fall back to the *_ALLOW_* gate flags.

Security check

A

No 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 mcp-keycloak

All alternatives →
Azure MCP Server microsoft
100

Azure MCP Server bundles all Azure MCP tools into one local MCP server. It connects AI agents to Azure services and can be used alone or with the GitHub Copilot for Azure extension in VS Code.

AAA Local 261k/wk
openstatus openstatusHQ
98

Manages monitors, status pages, incidents and maintenances in an openstatus workspace from Claude, ChatGPT, or Cursor. It suits teams that run uptime monitoring and status pages and want their AI assistant to update them.

ACA Remote 9.3k
SmartBear MCP SmartBear
97

SmartBear MCP gives AI assistants access to SmartBear's testing and monitoring tools, including BugSnag, Reflect, Swagger, PactFlow and QTM4J. It is aimed at teams that already use these products. Products are reached through remote servers or a local npm package.

AAC Local and remote 17k/wk
Fettle fettlesh
97

Lets AI assistants manage Fettle uptime monitoring, including monitors, incidents, heartbeats, maintenance windows and status page incidents. Built for developers and operations teams who use Fettle and want to work from Claude, Cursor or Codex.

AAC Local and remote 22k/wk
Superlog superloglabs
95

Superlog is an open-source agentic telemetry system that ingests traces, logs and metrics and groups noisy signals into incidents. It is aimed at teams debugging production systems with OpenTelemetry data.

AAA Remote 1.5k
Microsoft Learn MCP MicrosoftDocs
94

Microsoft Learn MCP gives AI assistants direct access to official Microsoft documentation and code samples through a remote MCP endpoint. It is for developers who use MCP-compatible clients and want answers based on current Microsoft docs.

ACA Remote 2k

Compare with Azure MCP Server, openstatus or SmartBear MCP

mcp-keycloak: common questions

Is it safe to let an AI change Keycloak settings?

The server starts read-only, and write or admin tools are only registered when the mode allows them. Destructive actions prompt for human approval through MCP elicitation when the client supports it.

Can the server delete users?

delete_user is only available in admin mode and also requires KEYCLOAK_ALLOW_DELETE to be true. Admin mode alone does not enable deletion.

Can I preview changes without applying them?

With KEYCLOAK_DRY_RUN enabled, write and admin tools validate and log their intent, then return without calling Keycloak.

How do I install mcp-keycloak?

In Claude Code run claude mcp add mcp-keycloak -e KEYCLOAK_URL=YOUR_KEYCLOAK_URL -- npx -y @dockndevai/mcp-keycloak. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.

Is mcp-keycloak the official server?

mcp-keycloak is a community project by dockndevai, not verified by a company domain.

Is mcp-keycloak free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is mcp-keycloak safe to use?

It scores 78 of 100. Grades: maintenance A, 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 mcp-keycloak?

Similar MCP servers: Azure MCP Server, openstatus, SmartBear MCP, Fettle.

Does mcp-keycloak 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.

mcp-keycloak Install

Add to stack

Loading.