- Home
- MCP servers
- Keycloak
Keycloak
- typescript
39
GitHub Stars
typescript
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"christophenglisch-keycloak-model-context-protocol": {
"command": "npx",
"args": [
"-y",
"keycloak-model-context-protocol"
],
"env": {
"KEYCLOAK_URL": "http://localhost:8080",
"KEYCLOAK_ADMIN": "admin",
"KEYCLOAK_ADMIN_PASSWORD": "admin"
}
}
}
}You can manage Keycloak users and realms through a Model Context Protocol (MCP) server. This server exposes actions to create, delete, and list users and realms, enabling automation and integration with clients that depend on Keycloak administration tasks.
How to use
You interact with the MCP server from your MCP client to perform common administration tasks. The available operations are to create a user in a specific realm, delete a user from a realm, list all realms, and list users within a chosen realm. Use these actions to automate onboarding, user management, and realm maintenance without manual Keycloak console steps.
How to install
Prerequisites you need before installing: a running Node.js environment (Node.js 18 or higher) and a working Keycloak instance.
Option 1: Install via Smithery
npx -y @smithery/cli install keycloak-model-context-protocol --client claude
Option 2: Install via NPM (recommended for direct usage)
# Direct usage with npx
npx -y keycloak-model-context-protocol
# Or global installation
npm install -g keycloak-model-context-protocol
Option 3: Local development setup (for development or modification)
git clone <repository-url>
cd keycloak-model-context-protocol
npm install
npm run build
Configuration and runtime
Configure how you run the server in your MCP client configuration. The following examples show two common ways to start the MCP server when using the NPM package or for local development.
{
"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"
}
}
}
}
Available tools
create-user
Creates a new user in a specified realm using provided username, email, and name details.
delete-user
Deletes a user from a specified realm using the user’s ID.
list-realms
Retrieves a list of all available realms in the Keycloak instance.
list-users
Lists all users within a specified realm.