Keycloak Model ContextSAFE
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.
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
[](https://smithery.ai/server/keycloak-model-context-protocol)
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:
npx -y @smithery/cli install keycloak-model-context-protocol --client claude
Via NPM (Recommended)
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
Local Development Setup
If you want to develop or modify the server:
git clone cd keycloak-model-context-protocol npm install npm run build
Configuration
Using NPM Package (Recommended)
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"
}
}
}
}For Local Development
{
"mcpServers": {
"keycloak": {
"command": "node",
"args": ["path/to/dist/index.js"],
"env": {
"KEYCLOAK_URL": "http://localhost:8080",
"KEYCLOAK_ADMIN": "admin",
"KEYCLOAK_ADMIN_PASSWORD": "admin"
}
}
}
}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 f
067bf27f4d9eOBSERVED · 2026-10-08Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add keycloak-model-context-protocol --env KEYCLOAK_ADMIN=${KEYCLOAK_ADMIN} --env KEYCLOAK_ADMIN_PASSWORD=${KEYCLOAK_ADMIN_PASSWORD} --env KEYCLOAK_URL=${KEYCLOAK_URL} -- npx -y [email protected]{
"mcpServers": {
"keycloak-model-context-protocol": {
"command": "npx",
"args": [
"-y",
"[email protected]"
],
"env": {
"KEYCLOAK_ADMIN": "${KEYCLOAK_ADMIN}",
"KEYCLOAK_ADMIN_PASSWORD": "${KEYCLOAK_ADMIN_PASSWORD}",
"KEYCLOAK_URL": "${KEYCLOAK_URL}"
}
}
}
}Exposed tools (4)
2 read · 1 write · 1 destructive. Blast radius: 1 tool can delete or overwrite — an agent that can be talked into calling a tool can be talked into calling this one.
| Tool | Risk | Description |
|---|---|---|
create-user | write | Create a new user in a specific realm |
delete-user | destructive | Delete a user from a specific realm |
list-realms | read | List all available realms |
list-users | read | List users in a specific realm |
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | WARN |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- declared (1 observation(s))
- Network
- none-observed
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (3)
delete-user
@keycloak/keycloak-admin-client, zod, @types/node, shx, typescript
Gates applied: no_behavioural_pass, no_license.
067bf27f4d9efull audit observations/trust-audit/mcp-server/christophenglisch__keycloak-model-context.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-08 | 067bf27f4d9e | SAFE | B | 89 | first audit |
Questions
What is the Keycloak Model Context MCP server?
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.
What tools does Keycloak Model Context expose?
4 in total: 2 read-only, 1 that write, and 1 that can delete or overwrite (delete-user). Every one is listed on this page with its risk.
Is Keycloak Model Context safe to connect to an agent?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B. Separately from the audit: 1 of its tools can destroy data, so scope the token you give it to what you actually need.
What credentials does Keycloak Model Context need?
It reads KEYCLOAK_ADMIN, KEYCLOAK_ADMIN_PASSWORD and KEYCLOAK_URL from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How does Keycloak Model Context run?
It speaks stdio, so it runs as a local process your client starts. It is published on npm as keycloak-model-context-protocol at 0.0.2.
How current is this page?
The grade is for one exact copy of the source (067bf27f4d9e), read on 2026-10-08. The repository is watched and re-audited when it changes.