Keycloak MCP Server

Keycloak MCP Server

MCP server for streamlined Keycloak administration and user management

33
Stars
9
Forks
33
Watchers
3
Issues
Keycloak MCP Server provides a Model Context Protocol (MCP) interface for managing Keycloak users and realms. It enables easy creation, deletion, and listing of users and realms through standardized tools. Designed for integration with platforms like Claude Desktop and tools like Smithery, it automates repeated Keycloak admin tasks and supports both NPM and local development setups.

Key Features

MCP-compliant interface for Keycloak administration
Create users in specific realms
Delete users from realms
List available Keycloak realms
List users within specified realms
Integration with Smithery and Claude Desktop
Environment configuration options for flexible deployment
NPM package distribution and easy CLI usage
Supports both automated and local development setup
Testing support via MCP Inspector

Use Cases

Automate user management tasks in Keycloak environments
Integrate Keycloak admin operations with AI-driven workflows
Effortlessly create or remove users at scale in different realms
Retrieve lists of users or realms for auditing or reporting
Develop and test custom Keycloak workflows using MCP Inspector
Seamless setup for dev environments using NPM or local builds
Provision or deprovision users in cloud-native identity setups
Enable non-technical admins to manage identities via MCP tools
Collaborate on Keycloak configuration in team-based environments
Standardize admin protocols for identity management solutions

README

Keycloak MCP Server

smithery badge

A Model Context Protocol server for Keycloak administration, providing tools to manage users and realms.

Features

  • Create new users in specific realms
  • Delete users from realms
  • List available realms
  • List users in specific realms

Installation

Installing via Smithery

To install Keycloak for Claude Desktop automatically via Smithery:

bash
npx -y @smithery/cli install keycloak-model-context-protocol --client claude

Via NPM (Recommended)

The server is available as an NPM package:

bash
# Direct usage with npx
npx -y keycloak-model-context-protocol

# Or global installation
npm install -g keycloak-model-context-protocol

Local Development Setup

If you want to develop or modify the server:

bash
git clone <repository-url>
cd keycloak-model-context-protocol
npm install
npm run build

Configuration

Using NPM Package (Recommended)

Configure the server in your Claude Desktop configuration file:

json
{
  "mcpServers": {
    "keycloak": {
      "command": "npx",
      "args": ["-y", "keycloak-model-context-protocol"],
      "env": {
        "KEYCLOAK_URL": "http://localhost:8080",
        "KEYCLOAK_ADMIN": "admin",
        "KEYCLOAK_ADMIN_PASSWORD": "admin"
      }
    }
  }
}

For Local Development

json
{
  "mcpServers": {
    "keycloak": {
      "command": "node",
      "args": ["path/to/dist/index.js"],
      "env": {
        "KEYCLOAK_URL": "http://localhost:8080",
        "KEYCLOAK_ADMIN": "admin",
        "KEYCLOAK_ADMIN_PASSWORD": "admin"
      }
    }
  }
}

Available Tools

create-user

Creates a new user in a specified realm.

Inputs:

  • realm: The realm name
  • username: Username for the new user
  • email: Email address for the user
  • firstName: User's first name
  • lastName: User's last name

delete-user

Deletes a user from a specified realm.

Inputs:

  • realm: The realm name
  • userId: The ID of the user to delete

list-realms

Lists all available realms.

list-users

Lists all users in a specified realm.

Inputs:

  • realm: The realm name

Development

bash
npm run watch

Testing

To test the server using MCP Inspector:

bash
npx -y @modelcontextprotocol/inspector npx -y keycloak-model-context-protocol

Deployment

NPM Package

This project is automatically published to NPM via GitHub Actions when a new release is published on GitHub.

Setup Requirements for Deployment

  1. Create NPM account and get access token
  2. Add NPM_TOKEN secret to GitHub repository
    • Go to repository Settings > Secrets
    • Add new secret named NPM_TOKEN
    • Paste your NPM access token as the value

Prerequisites

  • Node.js 18 or higher
  • Running Keycloak instance

Star History

Star History Chart

Repository Owner

Repository Details

Language TypeScript
Default Branch main
Size 13 KB
Contributors 2
MCP Verified Nov 12, 2025

Programming Languages

TypeScript
100%

Tags

Topics

ai-tools authentication claude-desktop identity-management keycloak keycloak-admin mcp model-context-protocol node typescript user-management

Join Our Newsletter

Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.

We respect your privacy. Unsubscribe at any time.

Related MCPs

Discover similar Model Context Protocol servers

  • CipherTrust Manager MCP Server

    CipherTrust Manager MCP Server

    Enables AI assistants to access CipherTrust Manager securely via the Model Context Protocol.

    CipherTrust Manager MCP Server provides an implementation of the Model Context Protocol (MCP), offering AI assistants such as Claude and Cursor a unified interface to interact with CipherTrust Manager resources. Communication is facilitated through JSON-RPC over stdin/stdout, enabling key management, CTE client management, user management, and connection management functionalities. The tool is configurable via environment variables and integrates with existing CipherTrust Manager instances using the ksctl CLI for secure resource access.

    • 7
    • MCP
    • sanyambassi/ciphertrust-manager-mcp-server
  • Confluence Communication Server MCP Server

    Confluence Communication Server MCP Server

    Seamlessly interact with Confluence using standardized MCP tools.

    Confluence Communication Server MCP Server is a TypeScript-based implementation that enables seamless interaction with Confluence through the Model Context Protocol. It provides tools for running CQL queries, retrieving, and updating Confluence page content, thus showcasing and adhering to core MCP concepts. The server is compatible with Claude Desktop and supports installation via Smithery, emphasizing ease of integration and automation for Confluence management tasks.

    • 13
    • MCP
    • KS-GEN-AI/confluence-mcp-server
  • MCP Manager for Claude Desktop

    MCP Manager for Claude Desktop

    A desktop app to manage Model Context Protocol (MCP) servers for Claude Desktop on MacOS.

    MCP Manager for Claude Desktop provides a user-friendly interface to manage Model Context Protocol (MCP) servers, enabling Claude to access private data, APIs, and local or remote services securely from a MacOS desktop. It facilitates rapid configuration and integration with a wide variety of MCP servers, including productivity tools, databases, and web APIs. The app runs locally to ensure data privacy and streamlines connecting Claude to new sources through simple environment and server settings management.

    • 270
    • MCP
    • zueai/mcp-manager
  • mcp-cli

    mcp-cli

    A command-line inspector and client for the Model Context Protocol

    mcp-cli is a command-line interface tool designed to interact with Model Context Protocol (MCP) servers. It allows users to run and connect to MCP servers from various sources, inspect available tools, resources, and prompts, and execute commands non-interactively or interactively. The tool supports OAuth for various server types, making integration and automation seamless for developers working with MCP-compliant servers.

    • 391
    • MCP
    • wong2/mcp-cli
  • searchcraft-mcp-server

    searchcraft-mcp-server

    An MCP Server for managing Searchcraft clusters and powering AI-driven search administration.

    searchcraft-mcp-server is a TypeScript/Node.js server that implements the Model Context Protocol (MCP) for Searchcraft clusters. It provides a suite of programmable tools for managing indexes, documents, federations, access keys, and analytics using plain English prompts via AI model clients. The server enables seamless interaction between AI interfaces like Claude Desktop and Searchcraft's administrative functions by exposing these operations as protocol-driven actions.

    • 6
    • MCP
    • searchcraft-inc/searchcraft-mcp-server
  • Stape MCP Server

    Stape MCP Server

    An MCP server implementation for integrating Stape with AI model context protocols.

    Stape MCP Server provides an implementation of the Model Context Protocol server tailored for the Stape platform. It enables secure and standardized access to model context capabilities, allowing integration with tools such as Claude Desktop and Cursor AI. Users can easily configure and authenticate MCP connections using provided configuration samples, while managing context and credentials securely. The server is open source and maintained by the Stape Team under the Apache 2.0 license.

    • 4
    • MCP
    • stape-io/stape-mcp-server
  • Didn't find tool you were looking for?

    Be as detailed as possible for better results