Keycloak Identity Manager

v1.2.5Securitystable

MCP server implementation for Keycloak user management. Enables AI-powered administration of Keycloak users and realms through the Model Context Protocol (MCP). Seamlessly integrates with Claude Desktop and other MCP clients for automated user operat

ai-toolsauthenticationclaude-desktopidentity-managementkeycloak
Share:
42
Stars
0
Downloads
0
Weekly
0/5

What is Keycloak Identity Manager?

Keycloak Identity Manager is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to mcp server implementation for keycloak user management. enables ai-powered administration of keycloak users and realms through the model context protocol (mcp). seamlessly integrates with claude deskt...

MCP server implementation for Keycloak user management. Enables AI-powered administration of Keycloak users and realms through the Model Context Protocol (MCP). Seamlessly integrates with Claude Desktop and other MCP clients for automated user operat

This server falls under the Security category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • MCP server implementation for Keycloak user management. Enab

Use Cases

User and realm administration
Identity management automation
Access control setup
LicenseMIT License
Languagetypescript
Versionv1.2.5
UpdatedMay 18, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

NPM

npx -y keycloak-mcp

Manual Installation

npx -y keycloak-mcp

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Keycloak Identity Manager

Keycloak MCP Server is a TypeScript MCP server that connects AI assistants to a Keycloak identity and access management instance, enabling natural language administration of users and realms through the Keycloak Admin REST API. It exposes tools to list realms, list users within a realm, create new users with full profile details, and delete users by ID — covering the most common user lifecycle operations. DevOps engineers and platform teams use it to automate Keycloak user provisioning, audit access, and manage multi-realm identity infrastructure through Claude Desktop or other MCP clients without writing custom scripts.

Prerequisites

  • A running Keycloak instance (version 21 or later recommended) accessible from the machine running the MCP server
  • Keycloak admin credentials with realm management permissions
  • Node.js 18 or later installed
  • An MCP client such as Claude Desktop or Claude Code
1

Confirm Keycloak is running and accessible

Verify your Keycloak server is reachable and your admin credentials are working before configuring the MCP server.

curl http://localhost:8080/realms/master
2

Run the server via npx to test it

Start the keycloak-mcp server with your credentials passed as environment variables to confirm it connects successfully.

KEYCLOAK_URL=http://localhost:8080 KEYCLOAK_ADMIN=admin KEYCLOAK_ADMIN_PASSWORD=admin123 npx -y keycloak-mcp
3

Configure Claude Desktop

Add keycloak-mcp to your claude_desktop_config.json with your Keycloak server URL and admin credentials.

{
  "mcpServers": {
    "keycloak": {
      "command": "npx",
      "args": ["-y", "keycloak-mcp"],
      "env": {
        "KEYCLOAK_URL": "http://localhost:8080",
        "KEYCLOAK_ADMIN": "admin",
        "KEYCLOAK_ADMIN_PASSWORD": "your_admin_password"
      }
    }
  }
}
4

Verify with MCP Inspector

Use MCP Inspector to test all four tools interactively before connecting your production AI client.

npx -y @modelcontextprotocol/inspector npx -y keycloak-mcp
5

Test by listing realms

Ask Claude to list all realms in your Keycloak instance to confirm the connection is working.

Keycloak Identity Manager Examples

Client configuration

Claude Desktop config for keycloak-mcp with all required environment variables.

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

Prompts to try

Sample prompts using the list-realms, list-users, create-user, and delete-user tools.

- "List all realms in my Keycloak instance"
- "Show me all users in the 'production' realm"
- "Create a new user in the 'staging' realm with username 'jane.doe', email '[email protected]', first name 'Jane', and last name 'Doe'"
- "Delete the user with ID 'abc123' from the 'development' realm"
- "How many users are in each of my Keycloak realms?"

Troubleshooting Keycloak Identity Manager

Server fails with 'ECONNREFUSED' when trying to reach Keycloak

Confirm KEYCLOAK_URL is set to the correct hostname and port where Keycloak is listening (e.g. http://localhost:8080). If running Keycloak in Docker, make sure the port is published and the container is healthy.

Admin API returns 401 Unauthorized

Verify KEYCLOAK_ADMIN and KEYCLOAK_ADMIN_PASSWORD match the credentials of a user with the 'admin' role in the master realm. Log in to the Keycloak admin console at /admin to confirm the credentials work.

create-user succeeds but the user does not appear in the Keycloak console

Make sure you specified the correct realm name in your request. Users are created per-realm — check both the realm name in your prompt and the realm list to confirm the target realm exists.

Frequently Asked Questions about Keycloak Identity Manager

What is Keycloak Identity Manager?

Keycloak Identity Manager is a Model Context Protocol (MCP) server that mcp server implementation for keycloak user management. enables ai-powered administration of keycloak users and realms through the model context protocol (mcp). seamlessly integrates with claude desktop and other mcp clients for automated user operat It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Keycloak Identity Manager?

Install via npm with the command: npx -y keycloak-mcp. Then add the server configuration to your AI client's JSON config file (e.g., claude_desktop_config.json or .cursor/mcp.json).

Which AI clients work with Keycloak Identity Manager?

Keycloak Identity Manager works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Keycloak Identity Manager free to use?

Yes, Keycloak Identity Manager is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.

Keycloak Identity Manager Alternatives — Similar Security Servers

Looking for alternatives to Keycloak Identity Manager? Here are other popular security servers you can use with Claude, Cursor, and VS Code.

Casdoor

13.6k

An open-source Agent-first Identity and Access Management (IAM) /LLM MCP & agent gateway and auth server with web UI supporting OpenClaw, MCP, OAuth, OIDC, SAML, CAS, LDAP, SCIM, WebAuthn, TOTP, MFA, Face ID, Google Workspace, Azure AD

ghidraMCP

9.0k

An Model Context Protocol server that enables LLMs to autonomously reverse engineer applications by exposing Ghidra's decompilation and analysis tools. It allows AI agents to list code structures, rename methods, and analyze binaries directly through

HexStrike AI

8.9k

HexStrike AI MCP Agents is an advanced MCP server that lets AI agents (Claude, GPT, Copilot, etc.) autonomously run 150+ cybersecurity tools for automated pentesting, vulnerability discovery, bug bounty automation, and security research. Seamlessly b

IDA Pro MCP

8.7k

Enables AI-assisted reverse engineering in IDA Pro by providing tools to analyze binaries, decompile functions, manage comments, search patterns, and interact with the IDA database through natural language.

Anthropic Cybersecurity Skills

6.6k

754 structured cybersecurity skills for AI agents · Mapped to 5 frameworks: MITRE ATT&CK, NIST CSF 2.0, MITRE ATLAS, D3FEND & NIST AI RMF · agentskills.io standard · Works with Claude Code, GitHub Copilot, Codex CLI, Cursor, Gemini CLI & 20+ platform

Hooker

5.1k

🔥🔥 hooker is a Frida-based reverse engineering toolkit for Android. It offers a user-friendly CLI, universal scripts, auto hook generation, memory roaming to detect activities/services, one-click SOCKS5 proxy setup, Frida JustTrustMe, and BoringSSL u

Browse More Security MCP Servers

Explore all security servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "keycloak-mcp-server": { "command": "npx", "args": ["-y", "keycloak-mcp"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Keycloak Identity Manager?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides