MA

m0-ar/keycloak-mcp-server

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

6 stars 4 forks Качество 67 Тренд 14MIT

A comprehensive Model Context Protocol (MCP) server for Keycloak administration, providing to manage users, realms, clients, roles, groups, sessions, events, organizations, protocol mappers, user...

Обзор

A comprehensive Model Context Protocol (MCP) server for Keycloak administration, providing to manage users, realms, clients, roles, groups, sessions, events, organizations, protocol mappers, user attributes, client scopes, and identity providers directly from AI assistants like Claude Desktop or Cursor AI. - ✅ Create, update, and delete users - ✅ List, search, and get user details - ✅ Reset user passwords - ✅ Logout user sessions - ✅ Manage user roles and groups - ✅ User attributes management (critical for organization data) - ✅ List, create, update, and delete realms - ✅ Get detailed realm settings and configurations - ✅ Manage realm-level security policies - ✅ Register, update, and delete clients/applications - ✅ List all clients in realms - ✅ Configure client settings and redirect URIs - ✅ Protocol mappers management (critical for JWT claims) - ✅ Create, update, and delete roles (realm and client-level) - ✅ Assign and remove roles from users and groups - ✅ List all roles and...

README

Показан фрагмент оригинального README. Открыть оригинал.

Keycloak Model Context Protocol Server

A comprehensive Model Context Protocol (MCP) server for Keycloak administration, providing 80+ tools to manage users, realms, clients, roles, groups, sessions, events, organizations, protocol mappers, user attributes, client scopes, and identity providers directly from AI assistants like Claude Desktop or Cursor AI.

🚀 Features

👤 User Management

  • ✅ Create, update, and delete users
  • ✅ List, search, and get user details
  • ✅ Reset user passwords
  • ✅ Logout user sessions
  • ✅ Manage user roles and groups
  • ✅ NEW: User attributes management (critical for organization data)

🏛️ Realm Management

  • ✅ List, create, update, and delete realms
  • ✅ Get detailed realm settings and configurations
  • ✅ Manage realm-level security policies

🔧 Client Management

  • ✅ Register, update, and delete clients/applications
  • ✅ List all clients in realms
  • ✅ Configure client settings and redirect URIs
  • ✅ NEW: Protocol mappers management (critical for JWT claims)

🎭 Role Management

  • ✅ Create, update, and delete roles (realm and client-level)
  • ✅ Assign and remove roles from users and groups
  • ✅ List all roles and user role assignments
  • ✅ NEW: Composite roles and role hierarchies
  • ✅ NEW: Advanced role operations by ID
  • ✅ NEW: Find users with specific roles

👥 Group Management

  • ✅ Create, update, and delete user groups
  • ✅ Add and remove users from groups
  • ✅ Manage hierarchical group structures
  • ✅ NEW: Group attributes management
  • ✅ NEW: Child groups and subgroup management
  • ✅ NEW: Group member listing and management

🏢 Organization Management ⭐ NEW

  • ✅ Create, update, and delete organizations
  • ✅ Add and remove organization members
  • ✅ List organizations and members
  • ✅ Organization attributes management

🔗 Identity Provider Management ⭐ NEW

  • ✅ Create, update, and delete identity providers (SSO)
  • ✅ Identity provider mapper management
  • ✅ SAML and OIDC provider configuration
  • ✅ External user attribute mapping

🎯 Client Scopes Management ⭐ NEW

  • ✅ Create, update, and delete client scopes
  • ✅ Protocol mappers for client scopes
  • ✅ Token scope management

📊 Session & Event Management

  • ✅ List active user sessions
  • ✅ Monitor authentication and admin events
  • ✅ Clear event logs and manage session lifecycles

🛡️ Advanced Features

  • ✅ Bulletproof authentication with fresh client instances
  • ✅ Comprehensive error handling with detailed logging
  • ✅ Cross-platform support (Windows, macOS, Linux)
  • ✅ Production-ready with TypeScript and robust architecture
  • ✅ Organization JWT Claims - Solve organization visibility in tokens
  • ✅ 80+ Tools - Complete Keycloak administration coverage

📋 Prerequisites

  • Node.js 18 or higher
  • Running Keycloak instance (local or remote)
  • Keycloak admin credentials with appropriate permissions
Открыть полный README на GitHub

Установка

npx keycloak-mcp-server
Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

{ "mcpServers": { "keycloak": { "command": "npx", "args": ["keycloak-mcp-server"], "env": { "KEYCLOAK_URL": "https://your-keycloak-instance.com", "KEYCLOAK_ADMIN": "your-admin-username", "KEYCLOAK_ADMIN_PASSWORD": "your-admin-password" } } } }