Creates a new user in a specified Keycloak realm with the provided details
Deletes a user from a specified Keycloak realm using their user ID
Lists all available realms in the Keycloak instance
Lists all users in a specified Keycloak 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.
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.
The easiest way to install Keycloak Administration for Claude Desktop is via Smithery:
npx -y @smithery/cli install keycloak-model-context-protocol --client claude
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
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 serverKEYCLOAK_ADMIN
: Your Keycloak admin usernameKEYCLOAK_ADMIN_PASSWORD
: Your Keycloak admin passwordOnce configured, you can use natural language to manage your Keycloak instance through Claude Desktop or other MCP clients. Here are some example commands:
The MCP server will translate these natural language requests into the appropriate Keycloak API calls.
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.