Skip to main content
Glama
mgcrea

@mgcrea/mcp-keycloak

by mgcrea

keycloak_request

Read-only

Call any Keycloak Admin REST endpoint directly, covering operations no curated tool handles. Read-only by default; enable writes via configuration.

Instructions

Escape hatch: call any Keycloak Admin REST endpoint directly. Use it when no curated tool fits — user federation components, authorization policies, organizations, partial import/export, credentials. path is relative to the realm (users/123/credentials resolves under /admin/realms/{realm}/), or pass an absolute admin path starting with /admin/ (e.g. /admin/serverinfo). Writes are DISABLED: only GET is permitted. Set KEYCLOAK_ALLOW_WRITES=1 to allow mutations.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyNoJSON request body, for POST/PUT/DELETE.
pathYesRealm-relative path (e.g. `users/8f3c.../credentials`, `components`) or an absolute admin path (e.g. `/admin/serverinfo`).
queryNoQuery string parameters.
realmNoRealm to operate on. Defaults to the server's configured realm (KEYCLOAK_REALM).
methodNoGET
Install Server

TDQS

A4.9/5.0
Behavior5/5

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

The annotations already mark the tool as read-only, but the description adds valuable behavioral detail: only GET is permitted, writes are disabled, and enabling mutations requires KEYCLOAK_ALLOW_WRITES=1. It also explains how paths are resolved relative to the realm or as absolute /admin paths, which is not inferable from annotations.

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?

Four sentences with no filler. The opening label 'Escape hatch' immediately conveys purpose, and the path rules, method restriction, and env-var override are each expressed in one compact clause.

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

Completeness5/5

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

For a generic raw-endpoint tool with arbitrary output, the description supplies the critical decision rule, path semantics, and method constraint. The remaining body/query/realm details are adequately documented in the input schema, and no output schema means there is no promised return-shape to disclose.

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 schema already covers most parameters (80% coverage), and the description adds crucial path-construction semantics: realm-relative vs absolute /admin paths. It does not explain body or query serialization beyond the schema, but the high schema coverage makes that acceptable.

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

Purpose5/5

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

The description clearly states this is an escape hatch for calling any Keycloak Admin REST endpoint directly, and it names concrete use cases that the curated siblings do not cover (user federation components, authorization policies, organizations, partial import/export, credentials). It distinguishes itself from the large sibling list by emphasizing 'when no curated tool fits.'

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

Usage Guidelines5/5

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

It explicitly instructs the agent to use this tool when no curated tool fits, and gives concrete examples of such cases. It also specifies the current write limitation, so an agent will not try to use it for mutations unless the environment variable override is present.

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

Other Tools

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/mgcrea/mcp-keycloak'

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