keycloak-model-context-protocol
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.
Documentation
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:
npx -y @smithery/cli install keycloak-model-context-protocol --client claudeVia 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-protocolLocal Development Setup
If you want to develop or modify the server:
git clone
cd keycloak-model-context-protocol
npm install
npm run buildConfiguration
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 name
- `username`: Username for the new user
- `email`: Email address for the user
- `firstName`: User's first name
- `lastName`: User's last name
delete-user
Deletes a user from a specified realm.
Inputs:
- `realm`: The realm name
- `userId`: 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
npm run watchTesting
To test the server using MCP Inspector:
npx -y @modelcontextprotocol/inspector npx -y keycloak-model-context-protocolDeployment
NPM Package
This project is automatically published to NPM via GitHub Actions when a new release is published on GitHub.
Setup Requirements for Deployment
1. Create NPM account and get access token
2. Add NPM_TOKEN secret to GitHub repository
Prerequisites
- Node.js 18 or higher
- Running Keycloak instance
Frequently asked questions
What is keycloak-model-context-protocol?
keycloak-model-context-protocol is 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.
How do I install keycloak-model-context-protocol?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is keycloak-model-context-protocol open source?
Yes — it is hosted on GitHub at https://github.com/ChristophEnglisch/keycloak-model-context-protocol and has 33 stars.
Related MCP tools
Composio equips your AI agents & LLMs with 100+ high-quality integrations via function calling for the Model Context Protocol. Enhance AI assistants with powerf
📦 Repomix is a powerful tool that packs your entire repository into a single, AI-friendly file. Perfect for when you need to feed your codebase to Large Lan...
The TypeScript AI agent framework. ⚡ Assistants, RAG, observability. Supports any LLM: GPT-4, Claude, Gemini, Llama. Built for the Model Context Protocol to enh
Rich-text editor with AI, MCP, and shadcn/ui TypeScript-based implementation. Trusted by 15300+ developers. Trusted by 15300+ developers.
MCP server to provide Figma layout information to AI coding agents like Cursor TypeScript-based implementation. Trusted by 11600+ developers.
Mcp-use is the easiest way to interact with mcp servers with custom agents TypeScript-based implementation. Trusted by 8100+ developers.
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP