Keycloak Model Context Protocol MCP Server

MCP server for Keycloak administration

Local serverstdioGo

What is the Keycloak Model Context Protocol MCP server?

MCP server for Keycloak administration. That is what the keycloak model context protocol mcp server brings to an AI assistant: the same capability, reachable through the Model Context Protocol rather than a separate app or dashboard.

The short version

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

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

Getting it running

Installation goes through your MCP client rather than a global install: point it at @smithery/cli on npm and it is fetched when the client starts. The copy-paste blocks for Claude Desktop, Claude Code and Cursor are further down this page.

What it needs from you

Configuration is passed through the environment: KEYCLOAK_URL, KEYCLOAK_ADMIN, KEYCLOAK_ADMIN_PASSWORD. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.

  • Node.js 18 or higher - Running Keycloak instance

How it compares

Plenty of developer tooling servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. It is maintained by ChristophEnglisch; worth a glance at recent repository activity before you build anything load-bearing on it.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Things to watch

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

How to install the Keycloak Model Context Protocol MCP server

### 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"
      }
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

  • Node.js 18 or higher - Running Keycloak instance
VariableDescriptionRequired
KEYCLOAK_URLCredential the server authenticates with.Yes
KEYCLOAK_ADMINCredential the server authenticates with.Yes
KEYCLOAK_ADMIN_PASSWORDCredential the server authenticates with.Yes

Frequently asked questions

It connects Keycloak Model Context Protocol to MCP-compatible AI assistants such as Claude and Cursor. Instead of copying data back and forth by hand, the assistant works with Keycloak Model Context Protocol directly.