Back to MCP Catalog

Keycloak Administration MCP Server

SecurityTypeScript
Manage Keycloak users and realms through AI-powered administration
Available Tools

create-user

Creates a new user in a specified Keycloak realm with the provided details

realmusernameemailfirstNamelastName

delete-user

Deletes a user from a specified Keycloak realm using their user ID

realmuserId

list-realms

Lists all available realms in the Keycloak instance

list-users

Lists all users in a specified Keycloak realm

realm

Keycloak Administration provides a seamless interface for managing Keycloak identity and access management through the Model Context Protocol. This integration enables AI assistants to create users, delete users, list realms, and manage user accounts within your Keycloak instance. With this tool, you can automate common Keycloak administration tasks directly through conversational AI interfaces like Claude Desktop. It simplifies user management workflows and provides a natural language approach to identity administration tasks that would otherwise require manual interaction with the Keycloak admin console.

Overview

Keycloak Administration is an MCP server that connects to your Keycloak instance, allowing AI assistants to perform user management operations. This tool bridges the gap between conversational AI and identity management, enabling you to administer your Keycloak instance through natural language commands.

Installation

Option 1: Using Smithery (Recommended)

The easiest way to install Keycloak Administration for Claude Desktop is via Smithery:

npx -y @smithery/cli install keycloak-model-context-protocol --client claude

Option 2: Using NPM

You can install the package globally:

npm install -g keycloak-model-context-protocol

Or run it directly with npx:

npx -y keycloak-model-context-protocol

Configuration

To use Keycloak Administration, you need to configure it with your Keycloak server details. Add the following configuration to your Claude Desktop configuration file:

{
  "mcpServers": {
    "keycloak": {
      "command": "npx",
      "args": ["-y", "keycloak-model-context-protocol"],
      "env": {
        "KEYCLOAK_URL": "http://localhost:8080",
        "KEYCLOAK_ADMIN": "admin",
        "KEYCLOAK_ADMIN_PASSWORD": "admin"
      }
    }
  }
}

Replace the environment variables with your actual Keycloak server details:

  • KEYCLOAK_URL: The URL of your Keycloak server
  • KEYCLOAK_ADMIN: Your Keycloak admin username
  • KEYCLOAK_ADMIN_PASSWORD: Your Keycloak admin password

Usage

Once configured, you can use natural language to manage your Keycloak instance through Claude Desktop or other MCP clients. Here are some example commands:

  • "Create a new user named 'john.doe' in the 'master' realm"
  • "List all available realms in my Keycloak instance"
  • "Show me all users in the 'customers' realm"
  • "Delete the user with ID '1234-5678' from the 'employees' realm"

The MCP server will translate these natural language requests into the appropriate Keycloak API calls.

Prerequisites

  • Node.js 18 or higher
  • A running Keycloak instance
  • Admin credentials for your Keycloak server

Testing

To verify your installation and test the server using MCP Inspector:

npx -y @modelcontextprotocol/inspector npx -y keycloak-model-context-protocol

This will allow you to test the available tools and ensure your configuration is working correctly.

Related MCPs

Netskope NPA
SecurityTypeScript

Manage Netskope Network Private Access infrastructure through natural language

DNStwist
SecurityJavaScript

Detect typosquatting, phishing, and domain impersonation with DNS fuzzing

Maigret OSINT Tool
SecurityJavaScript

Search for usernames across social networks and analyze URLs for OSINT research

About Model Context Protocol

Model Context Protocol (MCP) allows AI models to access external tools and services, extending their capabilities beyond their training data.

Generate Cursor Documentation

Save time on coding by generating custom documentation and prompts for Cursor IDE.