The Keycloak MCP Server is a tool for managing users and realms in Keycloak.
It allows you to:
- Create Users: Add new users to a specified realm with details like username, email, first name, and last name.
- Delete Users: Remove users from a realm using their user ID.
- List Realms: Retrieve all available realms in the Keycloak instance.
- List Users: View all users within a specified realm.
Provides tools for Keycloak administration, allowing management of users and realms including creating and deleting users, listing available realms, and viewing users within specific realms.
Keycloak MCP Server
A Model Context Protocol server for Keycloak administration, providing tools to manage users and realms.
Features
- Create new users in specific realms
- Delete users from realms
- List available realms
- List users in specific realms
Installation
Installing via Smithery
To install Keycloak for Claude Desktop automatically via Smithery:
Via NPM (Recommended)
The server is available as an NPM package:
Local Development Setup
If you want to develop or modify the server:
Configuration
Using NPM Package (Recommended)
Configure the server in your Claude Desktop configuration file:
For Local Development
Available Tools
create-user
Creates a new user in a specified realm.
Inputs:
realm
: The realm nameusername
: Username for the new useremail
: Email address for the userfirstName
: User's first namelastName
: User's last name
delete-user
Deletes a user from a specified realm.
Inputs:
realm
: The realm nameuserId
: The ID of the user to delete
list-realms
Lists all available realms.
list-users
Lists all users in a specified realm.
Inputs:
realm
: The realm name
Development
Testing
To test the server using MCP Inspector:
Deployment
NPM Package
This project is automatically published to NPM via GitHub Actions when a new release is published on GitHub.
Setup Requirements for Deployment
- Create NPM account and get access token
- Add NPM_TOKEN secret to GitHub repository
- Go to repository Settings > Secrets
- Add new secret named
NPM_TOKEN
- Paste your NPM access token as the value
Prerequisites
- Node.js 18 or higher
- Running Keycloak instance
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
A Model Context Protocol server that provides tools to manage Keycloak users and realms, allowing you to create and delete users, list available realms, and view users in specific realms.
Related Resources
Related MCP Servers
- AsecurityFlicenseAqualityA Model Context Protocol server implementation that provides endpoints for wallet-based authentication, cluster management, and name registration services.Last updated -TypeScript
- AsecurityAlicenseAqualityA Model Context Protocol server that allows LLMs to interact with blockchain through MetaMask, keeping private keys securely in your crypto wallet while enabling transactions and blockchain operations.Last updated -2824TypeScriptMIT License
- AsecurityAlicenseAqualityA Model Context Protocol server that enables management of Keycloak users and realms through a standardized interface, providing tools for user creation, deletion, role assignment, and group management.Last updated -94192TypeScriptMIT License
- -securityFlicense-qualityA Model Context Protocol server that integrates with Slack API, allowing users to send messages, view channel history, manage channels, send direct messages, and retrieve user lists from Slack workspaces.Last updated -Python