Skip to main content
Glama
idoyudha

mcp-keycloak

by idoyudha

get_client_secret

Retrieve the client secret for authentication in Keycloak by specifying the client ID and optional realm.

Instructions

Get the client secret.

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

Returns:
    Client secret object

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
realmNo

Implementation Reference

  • The async handler function for the 'get_client_secret' MCP tool. It is decorated with @mcp.tool(), which handles registration and schema inference. The function retrieves the client secret from the Keycloak API using the KeycloakClient instance.
    @mcp.tool()
    async def get_client_secret(id: str, realm: Optional[str] = None) -> Dict[str, str]:
        """
        Get the client secret.
    
        Args:
            id: The client's database ID
            realm: Target realm (uses default if not specified)
    
        Returns:
            Client secret object
        """
        return await client._make_request(
            "GET", f"/clients/{id}/client-secret", 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