io.github.ChristophEnglisch/keycloak-model-context-protocol

io.github.ChristophEnglisch/keycloak-model-context-protocol

Manage Keycloak users, groups, roles and realms through the Keycloak Admin REST API.

Connect this server

Add this to your MCP client config — claude_desktop_config.json (Claude Desktop) or .cursor/mcp.json (Cursor).Suits: Claude Desktop · Cursor.

{
  "mcpServers": {
    "keycloak-model-context-protocol": {
      "command": "npx",
      "args": [
        "-y",
        "keycloak-model-context-protocol@1.1.0"
      ],
      "env": {
        "KEYCLOAK_URL": "<your KEYCLOAK_URL>",
        "KEYCLOAK_AUTH_REALM": "master",
        "KEYCLOAK_CLIENT_SECRET": "<your KEYCLOAK_CLIENT_SECRET>",
        "KEYCLOAK_PASSWORD": "<your KEYCLOAK_PASSWORD>",
        "KEYCLOAK_MCP_READ_ONLY": "false",
        "KEYCLOAK_MCP_ALLOW_MASTER_WRITE": "false",
        "KEYCLOAK_MCP_TOOLSETS": "core,groups,roles",
        "KEYCLOAK_MCP_REQUIRE_CONFIRMATION": "true",
        "KEYCLOAK_MCP_TIMEOUT_MS": "30000",
        "KEYCLOAK_MCP_LOG_LEVEL": "info"
      }
    }
  }
}
Environment variables
  • KEYCLOAK_URLrequiredBase URL of the Keycloak server, e.g. https://keycloak.example.com
  • KEYCLOAK_AUTH_REALMRealm used to obtain the admin token
  • KEYCLOAK_CLIENT_SECRETsecretClient secret for the client_credentials grant (recommended: a dedicated service account)
  • KEYCLOAK_PASSWORDsecretPassword for the password grant
  • KEYCLOAK_MCP_READ_ONLYIf true, only read-only tools are registered
  • KEYCLOAK_MCP_ALLOW_MASTER_WRITEIf true, write tools may modify the master realm
  • KEYCLOAK_MCP_TOOLSETSComma-separated enabled toolsets (core, groups, roles, clients, sessions, events, security) or all
  • KEYCLOAK_MCP_REQUIRE_CONFIRMATIONIf true, destructive tools require confirm=true
  • KEYCLOAK_MCP_TIMEOUT_MSHTTP timeout for Keycloak requests in milliseconds
  • KEYCLOAK_MCP_LOG_LEVELLog level written to stderr

A starting point — check the repository for exact arguments and setup. Restart your client after editing the config.

Category
Developer Tools
Version
1.1.0
Registry
active
Published
10/26/2026
Browse all Developer Tools →

Add the badge to your site

Show visitors that io.github.ChristophEnglisch/keycloak-model-context-protocol is listed here — it’s also the link we check for a free listing.

io.github.ChristophEnglisch/keycloak-model-context-protocol — listed on Serverdex

HTML — for your website

<a href="https://serverdex.io/server/io-github-christophenglisch-keycloak-model-context-protocol?utm_source=badge"><img src="https://serverdex.io/brand/badge.svg" alt="io.github.ChristophEnglisch/keycloak-model-context-protocol — listed on Serverdex" width="123" height="40" loading="lazy"></a>

Recommended. A dofollow link from your own domain is the one that counts for search engines, and it's the link we check for a free listing.

Markdown — for your README

[![io.github.ChristophEnglisch/keycloak-model-context-protocol — listed on Serverdex](https://serverdex.io/brand/badge.svg)](https://serverdex.io/server/io-github-christophenglisch-keycloak-model-context-protocol?utm_source=badge)

Nice for visibility, but GitHub marks README links nofollow, so it doesn't pass authority. Use the HTML badge on your site as well.