Keycloak MCP Server (TypeScript)
Enables interaction with and management of a Keycloak instance, including searching, listing, and creating users in a configured realm using a dedicated service account.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Keycloak MCP Server (TypeScript)
A Model Context Protocol (MCP) server that enables AI assistants to interact with and manage a Keycloak instance using natural language.
Built on the official @modelcontextprotocol/server SDK and @keycloak/keycloak-admin-client.
β¨ Features
User Management: Search, list, and create users in your target realm.
Least-Privilege Security: Authenticates via OAuth2
client_credentialsusing a dedicated Keycloak service account rather than master admin credentials.Type-Safe Validation: Strict input validation powered by
zod.
Related MCP server: PingOne Advanced Identity Cloud MCP Server
π Prerequisites
Node.js v20 or higher
A running Keycloak server
A dedicated Keycloak Service Account Client with
realm-managementroles (e.g.,view-users,manage-users)
π Installation
Clone the repository:
git clone https://github.com cd keycloak-mcpInstall dependencies and build:
npm install npm run build
βοΈ Configuration
1. Keycloak Client Setup
Open the Keycloak Admin Console and select your target realm.
Navigate to Clients > Create client (e.g.,
mcp-admin-bot).Enable Client authentication and Service accounts roles, then save.
Copy the secret from the Credentials tab.
Assign the required roles under the Service accounts roles tab (
Filter by clients->realm-management).
2. MCP Client Configuration
Add the server to your MCP client configuration (e.g., claude_desktop_config.json or .cursor/mcp.json):
{
"mcpServers": {
"keycloak": {
"command": "node",
"args": ["/absolute/path/to/keycloak-mcp/build/index.js"],
"env": {
"KEYCLOAK_URL": "http://localhost:8080",
"KEYCLOAK_REALM": "your-realm",
"KEYCLOAK_CLIENT_ID": "mcp-admin-bot",
"KEYCLOAK_CLIENT_SECRET": "your-client-secret"
}
}
}
}π οΈ Available Tools
Tool Name | Description |
| Search and list users by username, email, or name. |
| Create a new user in the configured Keycloak realm. |
π License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
Related MCP Connectors
Keycloak identity management expert with semantic search, protocol guides, and config analysis
Managed Keycloak from any MCP client: clusters, realms, apps, SSO, users, domains, audit events.
AI phone receptionist for small businesses: calls, transcripts, recordings, contacts, appointments, texts and outbound AI calls. OAuth 2.1 with PKCE and dynamic client registration; the account owner picks what the assistant may do.
Connect an AI assistant to a Capacities space (objects, daily notes, search).
Related MCP Servers
AlicenseAqualityBmaintenanceScalekit is the MCP gateway for AI agents. It connects agents to 500+ connectors and 20,000+ actions through one endpoint, works with any agent framework, and makes every call as the user, with OAuth, credentials, and permissions handled. Cloud or self-hosted355Apache 2.0- AlicenseBqualityBmaintenanceEnables AI assistants to interact with PingOne Advanced Identity Cloud environments through natural language, supporting user management, authentication theme customization, log analysis, and identity data queries with secure OAuth 2.0 authentication.5745 npm2Apache 2.0
- AlicenseCqualityDmaintenanceEnables management of Keycloak identity and access management through the Keycloak Admin REST API, providing 299 tools for operations like user management, client configuration, and realm administration via natural language.1003MIT
- AlicenseNot gradedqualityCmaintenanceExposes Keycloak admin operations as tools via the Model Context Protocol, allowing management of users, clients, groups, roles, and more through natural language.ISC