Skip to main content
Glama
idoyudha

mcp-keycloak

by idoyudha

get_client_service_account

Retrieve the service account user for a Keycloak client by specifying its database ID and optional realm to manage identity and access.

Instructions

Get service account user for a client.

Args:
    id: The client's database ID
    realm: Target realm (uses default if not specified)

Returns:
    Service account user object

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
realmNo

Implementation Reference

  • The main async handler function for the 'get_client_service_account' MCP tool. It is decorated with @mcp.tool() for registration and executes the tool logic by calling KeycloakClient._make_request to fetch the service account user for the given client ID.
    async def get_client_service_account(
        id: str, realm: Optional[str] = None
    ) -> Dict[str, Any]:
        """
        Get service account user for a client.
    
        Args:
            id: The client's database ID
            realm: Target realm (uses default if not specified)
    
        Returns:
            Service account user object
        """
        return await client._make_request(
            "GET", f"/clients/{id}/service-account-user", realm=realm
        )

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