Skip to main content
Glama

get_client_by_clientid

Retrieve a specific client object by providing the client ID and optional realm in the mcp-keycloak server for identity and access management.

Instructions

Get a specific client by client ID. Args: client_id: The client's client_id realm: Target realm (uses default if not specified) Returns: Client object

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
client_idYes
realmNo

Implementation Reference

  • The handler function for the 'get_client_by_clientid' tool, decorated with @mcp.tool() for registration. It retrieves clients filtered by client_id and returns the exact match, or raises an exception if not found.
    @mcp.tool() async def get_client_by_clientid( client_id: str, realm: Optional[str] = None ) -> Dict[str, Any]: """ Get a specific client by client ID. Args: client_id: The client's client_id realm: Target realm (uses default if not specified) Returns: Client object """ clients = await client._make_request( "GET", "/clients", params={"clientId": client_id}, realm=realm ) if clients and len(clients) > 0: # Find exact match for c in clients: if c.get("clientId") == client_id: return c raise Exception(f"Client with client_id '{client_id}' not found")

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

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