Skip to content
Grok

Keycloak Admin API for Grok

io.github.sferarc/keycloak-api-mcp

Unofficial: one tool per Keycloak admin operation on a realm, read-only unless writes are enabled

client:Grok transport:stdio runtime:npm

Install Keycloak Admin API in Grok

.mcp.json (in your project root)

Held in this page only — never stored, logged, or sent anywhere but back to your screen.

{
  "mcpServers": {
    "keycloak-api-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "keycloak-api"
      ],
      "env": {
        "KEYCLOAK_URL": "<KEYCLOAK_URL>",
        "KEYCLOAK_REALM": "<KEYCLOAK_REALM>",
        "KEYCLOAK_TOKEN": "<KEYCLOAK_TOKEN>",
        "KEYCLOAK_CLIENT_ID": "<KEYCLOAK_CLIENT_ID>",
        "KEYCLOAK_CLIENT_SECRET": "<KEYCLOAK_CLIENT_SECRET>",
        "KEYCLOAK_TOKEN_REALM": "<KEYCLOAK_TOKEN_REALM>",
        "KEYCLOAK_MCP_ALLOW_WRITES": "<KEYCLOAK_MCP_ALLOW_WRITES>",
        "KEYCLOAK_MCP_RESOURCES": "<KEYCLOAK_MCP_RESOURCES>"
      }
    }
  }
}

Grok Build reads Claude Code's .mcp.json and Claude Desktop's config unchanged, so a server you have already set up there needs nothing new. The Grok web app and X integration do not take custom servers. Grok docs

Keycloak Admin API in other clients