Skip to main content
Glama
HaithamOumerzoug

Keycloak MCP Server

Keycloak MCP Server

npm version License: MIT Downloads Node version

A Model Context Protocol (MCP) server implementation for Keycloak, providing a standardized interface for managing Keycloak users and realms.

Description

This project implements an MCP server that integrates with Keycloak, allowing you to manage Keycloak users and realms through a standardized protocol. It uses the official Keycloak Admin Client to interact with Keycloak's API.

Related MCP server: keycloak-mcp

Feature Demo

https://github.com/user-attachments/assets/4b02a049-b8d6-4cc5-a7b4-564a0e758dd8

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

list-clients

Lists all clients in a specified realm.

Inputs:

  • realm: The realm name

list-groups

Lists all groups in a specified realm.

Inputs:

  • realm: The realm name

list-client-roles

Lists all roles for a specific client in a realm.

Inputs:

  • realm: The realm name

  • clientUniqueId: The unique ID of the client

assign-client-role-to-user

Assigns a client role to a specific user.

Inputs:

  • realm: The realm name

  • userId: The ID of the user

  • clientUniqueId: The unique ID of the client

  • roleName: The name of the role to assign

add-user-to-group

Adds a user to a specific group.

Inputs:

  • realm: The realm name

  • userId: The ID of the user

  • groupId: The ID of the group

Prerequisites

  • Node.js (Latest LTS version recommended)

  • npm

  • A running Keycloak instance

Installation

Installing via Smithery

To install keycloak-mcp for Claude Desktop automatically via Smithery:

$ npx -y @smithery/cli install @HaithamOumerzoug/keycloak-mcp --client claude

Installing via NPM

Configure environment:

  • You can set configuration options using command-line arguments or environment variables:

    • --keycloak-url <Keycloak Instance URL>

    • --keycloak-admin <Admin Username>

    • --keycloak-admin-password <Admin Password>

  • These arguments override environment variables if both are set.

Start the server:

The server is available as an NPM package:

# Direct usage with npx
$ npx -y keycloak-mcp --keycloak-url <Keycloak Instance URL> --keycloak-admin <Admin Username> --keycloak-admin-password <Admin Password>

# Or global installation
$ npm install -g keycloak-mcp@latest
$ keycloak-mcp --keycloak-url <Keycloak Instance URL> --keycloak-admin <Admin Username> --keycloak-admin-password <Admin Password>

Configuration

Using NPM Package

Configure the server in your Cursor IDE, Cline or Claude Desktop MCP configuration file:

{
  "mcpServers": {
    "keycloak": {
      "command": "npx",
      "args": ["-y", "keycloak-mcp"],
      "env": {
        "KEYCLOAK_URL": "http://localhost:8080",
        "KEYCLOAK_ADMIN": "admin",
        "KEYCLOAK_ADMIN_PASSWORD": "admin"
      }
    }
  }
}

For Local Development

{
  "mcpServers": {
    "keycloak": {
      "command": "node",
      "args": ["path/to/dist/server.js"],
      "env": {
        "KEYCLOAK_URL": "http://localhost:8080",
        "KEYCLOAK_ADMIN": "admin",
        "KEYCLOAK_ADMIN_PASSWORD": "admin"
      }
    }
  }
}

Development

To set up the development environment:

  1. Clone the repository

  2. Install dependencies:

    npm install
  3. Set env vars

    cp .env.template .env
    # Edit the .env file and set all variables with the appropriate values
  4. Start the project:

    npm run dev

Available Scripts

  • npm run build - Builds the project and makes the CLI executable

  • npm run prepare - Runs the build script (used during package installation)

  • npm run dev - Watches for changes and rebuilds automatically

  • npm start - Starts the server (for production)

Dependencies

Main Dependencies

  • @keycloak/keycloak-admin-client - Official Keycloak Admin Client

  • @modelcontextprotocol/sdk - MCP SDK for standardized protocol implementation

  • zod - TypeScript-first schema validation

  • chalk - Terminal string styling

  • yargs - Parsing command-line arguments

Dev Dependencies

  • typescript - For TypeScript support

  • @types/node - TypeScript definitions for Node.js

  • shx - Cross-platform shell commands

  • ts-node - TypeScript execution and REPL for Node.js

  • rimraf - A cross-platform tool to remove directories

  • @types/yargs - TypeScript definitions for yargs

License

MIT

Author

OUMERZOUG Haitham

Available Tools

9 tools
add-user-to-groupC

Add a user to a group

ParametersJSON Schema
NameRequiredDescriptionDefault
groupIdYes
realmYes
userIdYes

TDQS

C2.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('Add') but doesn't explain what this entails—whether it requires admin permissions, if it's idempotent (e.g., adding an already-member user), what happens on success/failure, or any rate limits. For a mutation tool with zero annotation coverage, this leaves critical behavioral traits unspecified.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, direct sentence with zero wasted words. It's front-loaded with the core action and resources, making it easy to parse quickly. Every word earns its place by conveying the essential purpose without redundancy or fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (a mutation with 3 required parameters), lack of annotations, and no output schema, the description is incomplete. It doesn't address behavioral aspects like permissions or idempotency, parameter meanings, or expected outcomes. For a tool that modifies group membership, this minimal description fails to provide sufficient context for safe and effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the schema provides no parameter details. The description adds no information about the three required parameters (groupId, realm, userId), such as their formats, examples, or relationships. It doesn't compensate for the schema's lack of documentation, leaving parameters semantically unclear beyond their names.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Add') and the target resources ('a user to a group'), making the purpose immediately understandable. It distinguishes from siblings like 'create-user' or 'list-groups' by focusing on membership modification rather than creation or listing. However, it doesn't specify the system context (e.g., identity management) or differentiate from similar tools like 'assign-client-role-to-user', keeping it from a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., existing user and group), exclusions, or comparisons to siblings like 'assign-client-role-to-user' for role-based assignments. Without such context, an agent might struggle to choose between this and other user-group management tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

assign-client-role-to-userC

Assign a client role to a user

ParametersJSON Schema
NameRequiredDescriptionDefault
clientUniqueIdYes
realmYes
roleNameYes
userIdYes

TDQS

C2.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It implies a mutation ('assign') but doesn't specify permissions required, whether the operation is idempotent, error handling, or what happens if the role or user doesn't exist. This leaves significant gaps for a tool that modifies user permissions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with no wasted words, making it highly concise and front-loaded. It efficiently communicates the core action without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (a mutation with 4 parameters), lack of annotations, and no output schema, the description is incomplete. It doesn't cover behavioral aspects, parameter meanings, or expected outcomes, leaving the agent with insufficient information to use the tool effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate for all four parameters. It only mentions 'client role' and 'user' generically, without explaining what 'clientUniqueId', 'realm', 'roleName', or 'userId' represent or how to obtain them, failing to add meaningful context beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('assign') and the target ('client role to a user'), making the purpose understandable. However, it doesn't differentiate this tool from potential siblings like 'add-user-to-group' or specify what distinguishes a 'client role' from other role types, keeping it from a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like 'add-user-to-group' or 'create-user', nor are prerequisites or context for role assignment mentioned. The description merely states what it does without indicating appropriate scenarios.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

create-userC

Create a new user in a specific realm

ParametersJSON Schema
NameRequiredDescriptionDefault
emailYes
firstNameYes
lastNameYes
realmYes
usernameYes

TDQS

C2.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states 'Create' which implies a write/mutation operation, but doesn't mention permissions required, whether the operation is idempotent, what happens on duplicate entries, or any rate limits. This leaves significant gaps for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero wasted words. It's appropriately sized and front-loaded with the core purpose, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with 5 parameters, 0% schema coverage, no annotations, and no output schema, the description is inadequate. It doesn't explain what happens after creation (e.g., returns user ID), error conditions, or behavioral nuances, leaving too many unknowns for effective tool use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 5 parameters with 0% description coverage, so the description must compensate. However, it only mentions 'realm' implicitly ('in a specific realm') and doesn't explain any parameters like email format requirements, username constraints, or the relationship between fields. This fails to add meaningful semantic context beyond the bare schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Create') and resource ('new user in a specific realm'), providing a specific verb+resource combination. However, it doesn't differentiate from sibling tools like 'add-user-to-group' or 'list-users', which would require explicit comparison to achieve a score of 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'add-user-to-group' or 'delete-user'. It mentions 'in a specific realm' which implies a context but doesn't specify prerequisites, exclusions, or when-not-to-use scenarios.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

delete-userC

Delete a user from a specific realm

ParametersJSON Schema
NameRequiredDescriptionDefault
realmYes
userIdYes

TDQS

C2.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool performs a 'delete' operation, implying it's destructive and non-read-only, which is helpful. However, it lacks critical details: whether deletion is permanent or reversible, what permissions are required, if there are rate limits, what happens to associated data, or what the response looks like. For a destructive tool with zero annotation coverage, this is insufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence that efficiently conveys the core action without unnecessary words. It's front-loaded with the verb 'Delete' and avoids redundancy. Every word earns its place, making it easy for an agent to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (a destructive operation with 2 parameters), lack of annotations, 0% schema description coverage, and no output schema, the description is incomplete. It doesn't address critical aspects like error conditions, return values, side effects, or security implications. The agent is left with significant gaps in understanding how to use this tool safely and effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0% description coverage, so parameters 'realm' and 'userId' are undocumented in the schema. The description adds minimal value by implying 'realm' specifies where the user exists and 'userId' identifies the user, but doesn't explain what these parameters represent (e.g., realm as an organizational boundary, userId as a unique identifier), their formats, or examples. It fails to compensate for the schema's lack of documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Delete') and target resource ('a user from a specific realm'), making the purpose immediately understandable. It distinguishes this tool from sibling tools like 'create-user' or 'list-users' by specifying a destructive operation. However, it doesn't explicitly mention what 'delete' entails (e.g., permanent removal vs. deactivation), which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., user must exist), consequences of deletion, or relationships with sibling tools like 'create-user' or 'list-users'. The agent receives no help in deciding when this tool is appropriate versus other user management operations.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list-client-rolesC

List roles in a specific client

ParametersJSON Schema
NameRequiredDescriptionDefault
clientUniqueIdYes
realmYes

TDQS

C2.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states it's a list operation, implying read-only behavior, but doesn't clarify if it's safe, paginated, or has rate limits. For a tool with zero annotation coverage, this minimal description fails to provide adequate behavioral context beyond the basic action.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero wasted words. It's front-loaded with the core action and resource, making it easy to parse quickly. Every word earns its place, achieving optimal conciseness for such a straightforward tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (2 required parameters, no output schema, no annotations), the description is incomplete. It lacks parameter explanations, usage context, behavioral details, and output information. While concise, it doesn't provide enough information for an agent to use the tool effectively without additional guessing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the schema provides no parameter details. The description mentions 'in a specific client' but doesn't explain the two required parameters (realm, clientUniqueId) or their semantics (e.g., what a realm is, how to obtain clientUniqueId). It adds minimal value beyond the schema, insufficient for the coverage gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('List') and resource ('roles in a specific client'), making the purpose immediately understandable. It distinguishes itself from siblings like 'list-clients' or 'list-users' by focusing on client roles. However, it doesn't specify whether this lists all roles or filtered ones, keeping it from a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing realm and client IDs), compare to siblings like 'assign-client-role-to-user', or specify use cases (e.g., for auditing or role assignment). This leaves the agent without contextual usage cues.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list-clientsC

List clients in a specific realm

ParametersJSON Schema
NameRequiredDescriptionDefault
realmYes

TDQS

C2.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It states it's a list operation, implying read-only behavior, but doesn't disclose any behavioral traits like pagination, sorting, filtering beyond realm, rate limits, authentication needs, or what the output looks like. For a tool with zero annotation coverage, this is inadequate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste—it directly states the tool's purpose. It's appropriately sized and front-loaded, making it easy to parse quickly without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, no output schema, and low schema coverage (0%), the description is incomplete. It covers the basic purpose but lacks critical context: no details on behavior, parameters, or return values. For a tool with such sparse structured data, the description should do more to compensate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It mentions 'realm' as the parameter context but adds no meaning beyond what the schema name implies—no explanation of what a realm is, format examples, or constraints. With 1 undocumented parameter, the description fails to provide necessary semantic details.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('List') and resource ('clients'), and specifies the scope ('in a specific realm'). It distinguishes from siblings like list-users or list-groups by focusing on clients. However, it doesn't explicitly differentiate from list-client-roles, which is a similar but distinct operation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides minimal guidance by implying the tool is used when you need to list clients in a realm. It offers no explicit when-to-use advice, no alternatives (e.g., vs. list-client-roles), and no prerequisites or exclusions. The context is clear but lacks actionable usage instructions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list-groupsC

List groups in a specific realm

ParametersJSON Schema
NameRequiredDescriptionDefault
realmYes

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It implies a read operation but doesn't disclose pagination, sorting, filtering, permissions needed, rate limits, or what the output contains. 'List' suggests non-destructive behavior, but this isn't explicitly stated.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with no wasted words. It's front-loaded with the core action and scope, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with no annotations, no output schema, and minimal parameter documentation, the description is insufficient. It doesn't cover what the output looks like, error conditions, or how it differs from sibling list tools, leaving the agent with significant uncertainty.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, but there's only one parameter ('realm'). The description adds context by specifying 'in a specific realm', which helps interpret the parameter. However, it doesn't explain what a 'realm' is, its format, or provide examples, leaving gaps.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('List') and resource ('groups'), and specifies the scope ('in a specific realm'). It doesn't differentiate from sibling tools like 'list-users' or 'list-realms', but the purpose is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like 'list-users' or 'list-client-roles'. The description mentions 'in a specific realm' but doesn't explain if this is required for all list operations or unique to this tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list-realmsB

List all available realms

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions listing realms but doesn't specify whether this is a read-only operation, if it requires authentication, what format the output takes, or any pagination/rate limiting considerations. This leaves significant gaps for an agent to understand how to use it effectively.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with zero wasted words. It's front-loaded with the core action and resource, making it immediately understandable without any unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete for a tool that presumably returns a list of realms. It doesn't explain what a 'realm' is in this context, what data is returned, or any behavioral aspects like error handling. For a tool with zero structured metadata, this minimal description leaves too many questions unanswered.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters with 100% schema description coverage, so the schema fully documents the absence of inputs. The description adds no parameter information, which is appropriate here since there are no parameters to explain. A baseline of 4 is justified as the description doesn't need to compensate for any parameter gaps.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('List') and resource ('realms'), making the purpose immediately understandable. However, it doesn't differentiate this tool from sibling tools like 'list-users' or 'list-groups' beyond the resource type, which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'list-clients' or 'list-users', nor does it mention any prerequisites or context for usage. It simply states what the tool does without indicating appropriate scenarios.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list-usersC

List users in a specific realm

ParametersJSON Schema
NameRequiredDescriptionDefault
realmYes

TDQS

C2.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It states 'list users' which implies a read-only operation, but does not disclose behavioral traits such as pagination, sorting, filtering beyond realm, authentication requirements, rate limits, or what the output format looks like. This is a significant gap for a tool with no annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with zero waste. It is appropriately sized and front-loaded, directly stating the tool's purpose without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, 0% schema coverage, no output schema, and a simple parameter structure, the description is incomplete. It lacks details on behavior, output, parameter meaning, and usage context, making it inadequate for an agent to reliably invoke the tool without additional assumptions.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It mentions 'in a specific realm', which hints at the 'realm' parameter's purpose, but does not explain what a realm is, its format, valid values, or how it affects the listing. With 1 undocumented parameter, the description adds minimal semantic value beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'list' and the resource 'users in a specific realm', which is specific and unambiguous. However, it does not distinguish this tool from potential siblings like 'list-groups' or 'list-clients' beyond the resource name, as all share the same 'list' pattern without explicit differentiation in the description.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It mentions 'in a specific realm' but does not specify prerequisites, exclusions, or compare it to other user-related tools like 'create-user' or 'list-client-roles', leaving usage context implied at best.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

B3.4/5.0
Disambiguation5/5

Every tool has a clearly distinct purpose targeting specific resources and actions in Keycloak's identity management domain. The tools cover different entities (users, groups, clients, realms, roles) with specific operations, leaving no ambiguity about which tool to use for each task.

Naming Consistency5/5

All tools follow a consistent verb_noun pattern with snake_case naming throughout. The naming convention is perfectly predictable: action-target pairs like 'create-user', 'list-clients', 'add-user-to-group' make the tool purposes immediately understandable.

Tool Count5/5

With 9 tools, this server is well-scoped for Keycloak user and identity management operations. Each tool earns its place by covering essential CRUD operations for users and listing functions for other entities, providing a focused yet complete surface for the domain.

Completeness4/5

The toolset provides excellent coverage for user management (create, delete, list, group assignment, role assignment) and listing functions for realms, clients, groups, and roles. Minor gaps include missing update operations for users/groups/clients and role management beyond assignment, but core workflows are well-covered.

Maintenance

ActivityInactive
ResponsivenessUnresponsive

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    A
    maintenance
    An MCP server for Keycloak Admin REST API, enabling user, group, event, and security management through service account authentication.
    30
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol (MCP) server that provides a natural language interface for managing Keycloak identity and access management through its REST API.
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    An MCP server that lets an AI assistant inspect and modify Keycloak realm, client, and protocol-mapper configuration across multiple Keycloak hosts.
    7
    48
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/HaithamOumerzoug/keycloak-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server