keycloak-mcp MCP Server

A powerful Model Context Protocol server for Keycloak administration, providing a comprehensive set of tools to manage users, realms, roles, and other Keycloak resources through LLM interfaces.

Local serverstdioMIT

What is the keycloak-mcp Server?

keycloak-mcp source profile. From the maintainer documentation: “A powerful Model Context Protocol server for Keycloak administration, providing a comprehensive set of tools to manage users, realms, roles, and other Keycloak resources through LLM interfaces.”

Installation

The documented npm package is @octodet/keycloak-mcp. The configuration below comes from the maintainer’s example; adapt its paths and account values to your environment.

Configuration values

The example declares KEYCLOAK_URL, KEYCLOAK_ADMIN, KEYCLOAK_ADMIN_PASSWORD. Secret-looking values have been replaced with placeholders. Required and optional labels are shown only when the documentation states them.

Source

Project documentation · Repository · Discovery listing. This profile records the public documentation checked on 2026-10-08.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
Nonexistent roles are skipped with warnings
create-userUser Management
delete-userUser Management
list-usersUser Management
list-realmsRealm Management
list-rolesRole Management
update-user-rolesRole Management

How to install the keycloak-mcp Server

{
  "mcpServers": {
    "keycloak": {
      "command": "npx",
      "args": [
        "-y",
        "@octodet/keycloak-mcp"
      ],
      "env": {
        "KEYCLOAK_URL": "YOUR_KEYCLOAK_URL",
        "KEYCLOAK_ADMIN": "YOUR_KEYCLOAK_ADMIN",
        "KEYCLOAK_ADMIN_PASSWORD": "YOUR_KEYCLOAK_ADMIN_PASSWORD"
      }
    }
  }
}

From the project documentation. Replace placeholders and example paths before connecting.

Configuration

VariableDescriptionRequired
KEYCLOAK_URLDeclared in the maintainer’s client configuration.Check documentation
KEYCLOAK_ADMINDeclared in the maintainer’s client configuration.Check documentation
KEYCLOAK_ADMIN_PASSWORDDeclared in the maintainer’s client configuration.Check documentation