delete_client
Remove a client from a Keycloak realm by specifying its database ID to manage identity and access control.
Instructions
Delete a client.
Args:
id: The client's database ID
realm: Target realm (uses default if not specified)
Returns:
Status message
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| realm | No |
Implementation Reference
- src/tools/client_tools.py:219-232 (handler)The handler function for the 'delete_client' tool. It deletes a Keycloak client by its database ID using a DELETE request via the KeycloakClient instance. The @mcp.tool() decorator registers it as an MCP tool.@mcp.tool() async def delete_client(id: str, realm: Optional[str] = None) -> Dict[str, str]: """ Delete a client. Args: id: The client's database ID realm: Target realm (uses default if not specified) Returns: Status message """ await client._make_request("DELETE", f"/clients/{id}", realm=realm) return {"status": "deleted", "message": f"Client {id} deleted successfully"}