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 operations.
Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"keycloak": {
"env": {
"KEYCLOAK_URL": "http://localhost:8080",
"KEYCLOAK_ADMIN": "admin",
"KEYCLOAK_ADMIN_PASSWORD": "admin"
},
"args": [
"-y",
"keycloak-model-context-protocol"
],
"command": "npx"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
A Model Context Protocol server for Keycloak administration, providing tools to manage users and realms.
Run this in your terminal to verify the server starts. Then let us know if it worked — your result helps other developers.
npx -y 'keycloak-model-context-protocol' 2>&1 | head -1 && echo "✓ Server started successfully"
After testing, let us know if it worked:
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
Checked keycloak-model-context-protocol against OSV.dev.
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in security / devops
MCP server for using the GitLab API
An evil MCP server used for redteam testing
Yunxiao MCP Server provides AI assistants with the ability to interact with the Yunxiao platform. It provides a set of tools that interact with Yunxiao's API, allowing AI assistants to manage Codeup repository, Project, Pipeline, Packages etc.
Enhanced MCP server for GitLab: group projects listing and activity tracking
MCP Security Weekly
Get CVE alerts and security updates for Keycloak Model Context Protocol and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
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