by ChristophEnglisch
Provides AI‑powered administration of Keycloak users and realms through the Model Context Protocol, enabling automated creation, deletion, and listing of users and realms from MCP clients such as Claude Desktop.
The server exposes Model Context Protocol tools that interact with a running Keycloak instance, allowing AI assistants and other MCP clients to manage users and realms programmatically.
npx -y keycloak-model-context-protocol
{
"mcpServers": {
"keycloak": {
"command": "npx",
"args": ["-y", "keycloak-model-context-protocol"],
"env": {
"KEYCLOAK_URL": "http://localhost:8080",
"KEYCLOAK_ADMIN": "admin",
"KEYCLOAK_ADMIN_PASSWORD": "admin"
}
}
}
}
npx
.delete-user
tool to remove inactive accounts.Q: Which Node version is required? A: Node.js 18 or higher.
Q: Do I need a running Keycloak instance?
A: Yes, the server communicates with Keycloak via its admin REST API; configure KEYCLOAK_URL
accordingly.
Q: Can I run the server locally for development?
A: Clone the repository, run npm install && npm run build
, then start with node dist/index.js
or via the npx
command.
Q: How are credentials secured? A: Provide admin credentials through environment variables; avoid committing them to source control.
Q: Is there a testing tool?
A: Yes, use the Model Context Protocol Inspector: npx -y @modelcontextprotocol/inspector npx -y keycloak-model-context-protocol
.
A Model Context Protocol server for Keycloak administration, providing tools to manage users and realms.
To install Keycloak for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install keycloak-model-context-protocol --client claude
The server is available as an NPM package:
# Direct usage with npx
npx -y keycloak-model-context-protocol
# Or global installation
npm install -g keycloak-model-context-protocol
If you want to develop or modify the server:
git clone <repository-url>
cd keycloak-model-context-protocol
npm install
npm run build
Configure the server in 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"
}
}
}
}
{
"mcpServers": {
"keycloak": {
"command": "node",
"args": ["path/to/dist/index.js"],
"env": {
"KEYCLOAK_URL": "http://localhost:8080",
"KEYCLOAK_ADMIN": "admin",
"KEYCLOAK_ADMIN_PASSWORD": "admin"
}
}
}
}
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 nameDeletes a user from a specified realm.
Inputs:
realm
: The realm nameuserId
: The ID of the user to deleteLists all available realms.
Lists all users in a specified realm.
Inputs:
realm
: The realm namenpm run watch
To test the server using MCP Inspector:
npx -y @modelcontextprotocol/inspector npx -y keycloak-model-context-protocol
This project is automatically published to NPM via GitHub Actions when a new release is published on GitHub.
NPM_TOKEN
Please log in to share your review and rating for this MCP.
{ "mcpServers": { "keycloak": { "command": "npx", "args": [ "-y", "keycloak-model-context-protocol" ], "env": { "KEYCLOAK_URL": "http://localhost:8080", "KEYCLOAK_ADMIN": "admin", "KEYCLOAK_ADMIN_PASSWORD": "admin" } } } }
Explore related MCPs that share similar capabilities and solve comparable challenges
by chaitin
A self‑hosted web application firewall and reverse proxy that protects web applications from attacks and exploits by filtering, monitoring, and blocking malicious HTTP/S traffic.
by PortSwigger
Enables Burp Suite to communicate with AI clients via the Model Context Protocol, providing an MCP server and bundled stdio proxy.
by cycodehq
Boost security in the development lifecycle via SAST, SCA, secrets, and IaC scanning.
by Spathodea-Network
Provides a Model Context Protocol server that enables querying and retrieving threat intelligence data from OpenCTI through a standardized interface.
by firstorderai
Provides seamless access to two‑factor authentication codes and passwords for AI agents, enabling automated login while maintaining security.
by vespo92
Manage OPNsense firewalls through conversational AI, providing network configuration, device discovery, DNS filtering, HAProxy setup, and backup/restore via simple commands.
by mytechnotalent
Provides an AI-driven interface to Malware Bazaar, delivering real-time threat intelligence and sample metadata for authorized cybersecurity research workflows.
by co-browser
Verify that any MCP server is running the intended and untampered code via hardware attestation.
by Hexix23
Provides a powerful interface to the Shodan API, enabling advanced search, host intelligence, vulnerability discovery, and network mapping for security research.