ต้นแบบ · รุ่นทดลอง: มีทุก server ในทะเบียนทางการ อัปเดตทุก 30 นาที รีวิวและบัญชีผู้ใช้จะมาในขั้นถัดไป
PopNx MCPที่รวม MCP สำหรับคนใช้ AI · อธิบายเป็นภาษาคน

Keycloak Model Context Protocol

โดย ChristophEnglischรุ่น 1.1.0i★ –iรันบนเครื่อง
ชื่อใน registryio.github.ChristophEnglisch/keycloak-model-context-protocol

ติดตั้ง

ภาพรวม

คำอธิบายจากผู้ทำ (ภาษาอังกฤษตามต้นฉบับ)

Manage Keycloak users, groups, roles and realms through the Keycloak Admin REST API.

สามเสาของ PopNx MCP

สามเรื่องนี้ไม่รวมเป็นคะแนนเดียว เพราะความเห็น การวัด และความนิยม เป็นคนละเรื่องกัน

ใช้ทำอะไรได้

ตัวนี้ยังไม่ได้เรียบเรียงเป็นภาษาไทย ด้านล่างคือข้อเท็จจริงที่เราอ่านจาก registry

  • การเชื่อมต่อ: รันบนเครื่อง
  • ช่องทาง (transport): stdio
  • หมวด: อื่น ๆ
  • ต้องใส่ค่าเหล่านี้: KEYCLOAK_URL, KEYCLOAK_CLIENT_SECRET, KEYCLOAK_PASSWORD

ติดตั้ง

เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง

ก่อนติดตั้ง

  • ผลตรวจเบื้องต้น: ผ่าน 1 จาก 1 ข้อ
  • รันในเครื่องคุณด้วยสิทธิ์ของผู้ใช้คุณ (ไฟล์ อินเทอร์เน็ต แอปต่าง ๆ)
  • ค่าที่คุณต้องใส่เอง: KEYCLOAK_URL, KEYCLOAK_AUTH_REALM, KEYCLOAK_CLIENT_ID, KEYCLOAK_CLIENT_SECRET, KEYCLOAK_USERNAME, KEYCLOAK_PASSWORD, KEYCLOAK_GRANT_TYPE, KEYCLOAK_MCP_READ_ONLY, KEYCLOAK_MCP_REALMS, KEYCLOAK_MCP_ALLOW_MASTER_WRITE, KEYCLOAK_MCP_TOOLSETS, KEYCLOAK_MCP_REQUIRE_CONFIRMATION, KEYCLOAK_MCP_TIMEOUT_MS, KEYCLOAK_MCP_LOG_LEVEL

ค่าที่ติดป้ายความลับคือกุญแจของบัญชีคุณ อย่าส่งให้ใคร และอย่าวางในแชต

ต้องเตรียมก่อน

  • npmติดตั้ง Node.js (มีคำสั่ง npx) ในเครื่อง

คุณใช้แอปไหน

เลือกแอปด้านบน เราจำไว้ให้ ครั้งหน้าปุ่มจะขึ้นว่า “ติดตั้งลง …”

เปิด Claude Desktop → Settings → Developer → Edit Config แล้ววางค่านี้ในไฟล์ claude_desktop_config.json

{
  "mcpServers": {
    "keycloak-model-context-protocol": {
      "command": "npx",
      "args": [
        "-y",
        "keycloak-model-context-protocol"
      ],
      "env": {
        "KEYCLOAK_URL": "ใส่ค่าของคุณ",
        "KEYCLOAK_AUTH_REALM": "ใส่ค่าของคุณ",
        "KEYCLOAK_CLIENT_ID": "ใส่ค่าของคุณ",
        "KEYCLOAK_CLIENT_SECRET": "ใส่ค่าของคุณ",
        "KEYCLOAK_USERNAME": "ใส่ค่าของคุณ",
        "KEYCLOAK_PASSWORD": "ใส่ค่าของคุณ",
        "KEYCLOAK_GRANT_TYPE": "ใส่ค่าของคุณ",
        "KEYCLOAK_MCP_READ_ONLY": "ใส่ค่าของคุณ",
        "KEYCLOAK_MCP_REALMS": "ใส่ค่าของคุณ",
        "KEYCLOAK_MCP_ALLOW_MASTER_WRITE": "ใส่ค่าของคุณ",
        "KEYCLOAK_MCP_TOOLSETS": "ใส่ค่าของคุณ",
        "KEYCLOAK_MCP_REQUIRE_CONFIRMATION": "ใส่ค่าของคุณ",
        "KEYCLOAK_MCP_TIMEOUT_MS": "ใส่ค่าของคุณ",
        "KEYCLOAK_MCP_LOG_LEVEL": "ใส่ค่าของคุณ"
      }
    }
  }
}

พิมพ์คำสั่งนี้ใน Terminal

claude mcp add keycloak-model-context-protocol --env KEYCLOAK_URL='ใส่ค่าของคุณ' --env KEYCLOAK_AUTH_REALM='ใส่ค่าของคุณ' --env KEYCLOAK_CLIENT_ID='ใส่ค่าของคุณ' --env KEYCLOAK_CLIENT_SECRET='ใส่ค่าของคุณ' --env KEYCLOAK_USERNAME='ใส่ค่าของคุณ' --env KEYCLOAK_PASSWORD='ใส่ค่าของคุณ' --env KEYCLOAK_GRANT_TYPE='ใส่ค่าของคุณ' --env KEYCLOAK_MCP_READ_ONLY='ใส่ค่าของคุณ' --env KEYCLOAK_MCP_REALMS='ใส่ค่าของคุณ' --env KEYCLOAK_MCP_ALLOW_MASTER_WRITE='ใส่ค่าของคุณ' --env KEYCLOAK_MCP_TOOLSETS='ใส่ค่าของคุณ' --env KEYCLOAK_MCP_REQUIRE_CONFIRMATION='ใส่ค่าของคุณ' --env KEYCLOAK_MCP_TIMEOUT_MS='ใส่ค่าของคุณ' --env KEYCLOAK_MCP_LOG_LEVEL='ใส่ค่าของคุณ' -- npx -y keycloak-model-context-protocol

เติมค่าที่เว้นว่างไว้ก่อนรัน

เปิดใน Cursor

หรือคัดลอกค่าตั้งเอง

วางในไฟล์ .cursor/mcp.json ของโปรเจกต์ หรือ ~/.cursor/mcp.json

{
  "mcpServers": {
    "keycloak-model-context-protocol": {
      "command": "npx",
      "args": [
        "-y",
        "keycloak-model-context-protocol"
      ],
      "env": {
        "KEYCLOAK_URL": "ใส่ค่าของคุณ",
        "KEYCLOAK_AUTH_REALM": "ใส่ค่าของคุณ",
        "KEYCLOAK_CLIENT_ID": "ใส่ค่าของคุณ",
        "KEYCLOAK_CLIENT_SECRET": "ใส่ค่าของคุณ",
        "KEYCLOAK_USERNAME": "ใส่ค่าของคุณ",
        "KEYCLOAK_PASSWORD": "ใส่ค่าของคุณ",
        "KEYCLOAK_GRANT_TYPE": "ใส่ค่าของคุณ",
        "KEYCLOAK_MCP_READ_ONLY": "ใส่ค่าของคุณ",
        "KEYCLOAK_MCP_REALMS": "ใส่ค่าของคุณ",
        "KEYCLOAK_MCP_ALLOW_MASTER_WRITE": "ใส่ค่าของคุณ",
        "KEYCLOAK_MCP_TOOLSETS": "ใส่ค่าของคุณ",
        "KEYCLOAK_MCP_REQUIRE_CONFIRMATION": "ใส่ค่าของคุณ",
        "KEYCLOAK_MCP_TIMEOUT_MS": "ใส่ค่าของคุณ",
        "KEYCLOAK_MCP_LOG_LEVEL": "ใส่ค่าของคุณ"
      }
    }
  }
}

เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง

เปิดใน VS Code

หรือคัดลอกค่าตั้งเอง

วางในไฟล์ .vscode/mcp.json ของโปรเจกต์

{
  "servers": {
    "keycloak-model-context-protocol": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "keycloak-model-context-protocol"
      ],
      "env": {
        "KEYCLOAK_URL": "ใส่ค่าของคุณ",
        "KEYCLOAK_AUTH_REALM": "ใส่ค่าของคุณ",
        "KEYCLOAK_CLIENT_ID": "ใส่ค่าของคุณ",
        "KEYCLOAK_CLIENT_SECRET": "ใส่ค่าของคุณ",
        "KEYCLOAK_USERNAME": "ใส่ค่าของคุณ",
        "KEYCLOAK_PASSWORD": "ใส่ค่าของคุณ",
        "KEYCLOAK_GRANT_TYPE": "ใส่ค่าของคุณ",
        "KEYCLOAK_MCP_READ_ONLY": "ใส่ค่าของคุณ",
        "KEYCLOAK_MCP_REALMS": "ใส่ค่าของคุณ",
        "KEYCLOAK_MCP_ALLOW_MASTER_WRITE": "ใส่ค่าของคุณ",
        "KEYCLOAK_MCP_TOOLSETS": "ใส่ค่าของคุณ",
        "KEYCLOAK_MCP_REQUIRE_CONFIRMATION": "ใส่ค่าของคุณ",
        "KEYCLOAK_MCP_TIMEOUT_MS": "ใส่ค่าของคุณ",
        "KEYCLOAK_MCP_LOG_LEVEL": "ใส่ค่าของคุณ"
      }
    }
  }
}

เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง

ตัวนี้รันในเครื่องคุณ แต่ ChatGPT ต่อได้เฉพาะ server บนอินเทอร์เน็ต ลองเลือกแอปอื่น

ตัวเลือกเก็บในคุกกี้บนเครื่องนี้ ไม่ต้องมีบัญชี

ค่าที่ต้องใส่เอง

  • KEYCLOAK_URL จำเป็น env
    Base URL of the Keycloak server, e.g. https://keycloak.example.com
  • KEYCLOAK_AUTH_REALM env
    Realm used to obtain the admin token
  • KEYCLOAK_CLIENT_ID env
    Client ID used for login (default admin-cli for the password grant, required for client_credentials)
  • KEYCLOAK_CLIENT_SECRET ความลับ env
    Client secret for the client_credentials grant (recommended: a dedicated service account)
  • KEYCLOAK_USERNAME env
    Username for the password grant (alternative to client credentials)
  • KEYCLOAK_PASSWORD ความลับ env
    Password for the password grant
  • KEYCLOAK_GRANT_TYPE env
    Grant type; auto-detected if unset (client_credentials when a secret is set, else password)
  • KEYCLOAK_MCP_READ_ONLY env
    If true, only read-only tools are registered
  • KEYCLOAK_MCP_REALMS env
    Comma-separated allowlist of target realms; empty means all realms
  • KEYCLOAK_MCP_ALLOW_MASTER_WRITE env
    If true, write tools may modify the master realm
  • KEYCLOAK_MCP_TOOLSETS env
    Comma-separated enabled toolsets (core, groups, roles, clients, sessions, events, security) or all
  • KEYCLOAK_MCP_REQUIRE_CONFIRMATION env
    If true, destructive tools require confirm=true
  • KEYCLOAK_MCP_TIMEOUT_MS env
    HTTP timeout for Keycloak requests in milliseconds
  • KEYCLOAK_MCP_LOG_LEVEL env
    Log level written to stderr

ค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README

ทำอะไรได้บ้าง

รันในเครื่องคุณ รายการเครื่องมือจะขึ้นในแอป AI หลังติดตั้ง

ผลตรวจเบื้องต้นi

เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 7 พ.ย. 2569

  • ✓ ผ่าน

    ตัวตนผู้ทำตรงกับ repo

    ชื่อใน registry ยืนยันด้วยบัญชี GitHub ChristophEnglisch ซึ่งเป็นเจ้าของ repo

  • … ยังไม่ตรวจ

    ยังมีคนดูแล

    ยังไม่ได้อ่านข้อมูล repo จาก GitHub

  • … ยังไม่ตรวจ

    มีสัญญาอนุญาต (license)

    ยังไม่ได้อ่านข้อมูล repo จาก GitHub

  • – ไม่เกี่ยว

    endpoint ตอบ

    ตัวนี้รันบนเครื่องคุณ ไม่มี endpoint บนอินเทอร์เน็ต

  • – ไม่เกี่ยว

    ล็อกอินแบบ OAuth

    ตัวนี้รันบนเครื่อง ใช้ค่าที่ตั้งในเครื่องแทน

  • … ยังไม่ตรวจ

    คำอธิบายเครื่องมือไม่มีคำสั่งแอบแฝง

    รันในเครื่องคุณ เราอ่านรายการเครื่องมือได้เฉพาะตัวที่มี endpoint บนอินเทอร์เน็ต

เทียบกับตัวอื่นในหมวด อื่น ๆi

  • ดาวมากกว่า 0% ของอีก 18326 ตัวในหมวดนี้
  • ส่งรุ่นใหม่เข้า registry ล่าสุดกว่า 77% ของอีก 18326 ตัวในหมวดนี้
  • ผลตรวจเบื้องต้นดีกว่าหรือเท่ากับ 100% ของอีก 18326 ตัวในหมวดนี้

เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo

คำถามที่พบบ่อย

Keycloak Model Context Protocol ปลอดภัยไหม?

จากการตรวจเบื้องต้นของเรา ผ่าน 1 จาก 1 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น

ต้องใช้กุญแจหรือรหัสอะไรบ้าง?

ต้องใส่ค่าเหล่านี้: KEYCLOAK_URL, KEYCLOAK_CLIENT_SECRET, KEYCLOAK_PASSWORD

ตัวนี้รันบนเครื่องหรือบนคลาวด์?

รันบนเครื่องของคุณ โปรแกรม AI จะเปิด server ขึ้นมาเองเมื่อใช้ ข้อมูลไม่ต้องผ่านเซิร์ฟเวอร์ของผู้ทำ (ยกเว้นตัวที่ไปเรียกบริการออนไลน์ต่อ)

ยังมีคนดูแลอยู่ไหม?

repo บน GitHub มีการแก้โค้ดล่าสุด – และส่งรุ่นล่าสุด (1.1.0) เข้า registry 12 วันที่ผ่านมา

ใช้กับโปรแกรมไหนได้บ้าง?

โปรแกรมที่รองรับ MCP เช่น Claude Desktop, Claude Code, Cursor และ VS Code ตัวนี้ต้องมี Node.js ในเครื่องด้วย

มีตัวไหนใช้แทนได้บ้าง?

ในหมวดเดียวกันมี Spec Driven Development, Remote Desktop Commander, Signoff

ตัวที่ใช้แทนได้

server หมวดเดียวกันจากผู้ทำคนอื่น เรียงตามดาว

อ่านการ์ด:★ ดาว GitHubiสามเสา: รีวิว · ผลตรวจ · การใช้งานiอัปเดต = วันที่ส่งรุ่นล่าสุดเข้า registryi

Spec Driven Development

โดย formulahendry

MCP Server that facilitates spec-driven development workflows, not just Vibe Coding.

รันบนเครื่อง★ 440MITอัปเดต 14 เดือนที่ผ่านมา
ติดตั้ง

Remote Desktop Commander

โดย desktop-commander

Remote Desktop Commander: use files, terminal and processes on your own computers from any AI app.

รันบนคลาวด์★ 211อัปเดต เมื่อวานซืน
ติดตั้ง

Signoff

โดย ayuanxx-max

Five gates that make an agent's 'done' provable: run them, read the verdict, audit the record.

รันบนเครื่องอัปเดต วันนี้
ติดตั้ง

README จากผู้ทำ

เปิดอ่าน README

ส่วนนี้คัดจาก repo ของผู้ทำตามต้นฉบับ PopNx MCP ไม่ได้ตรวจหรือรับรองเนื้อหา ตัด HTML รูปภาพ และสคริปต์ออกแล้ว ลิงก์จะพาออกนอกเว็บ

Keycloak MCP Server

A Model Context Protocol (MCP) server for Keycloak administration. It lets an AI assistant such as Claude manage users, groups, roles and sessions, and inspect clients, events and the security posture of your realms, through the Keycloak Admin REST API, with least-privilege authentication and guardrails around every write.

[!WARNING]

This server acts with the permissions of the Keycloak account you give it. Use a dedicated service-account client with only the roles you need, never the bootstrap admin. Every tool that changes data asks for confirmation by default, and a read-only mode is available. See Security.

Highlights

  • 24 tools in 7 toolsets, enabled per toolset. The default set (core, groups, roles) is small; everything else is opt-in.
  • Least-privilege auth. client_credentials with a service account is the recommended grant; the password grant stays available. No credential defaults, so a missing setting fails fast.
  • Guardrails. Read-only mode, realm allowlist, write protection for the master realm, and a preview-then-confirm: true flow for every change. Grants of administrative rights are detected through composite roles and parent groups.
  • 4 guided prompts (onboarding, offboarding, security audit, failed-login investigation) and MCP resources for realms and users, with realm-name completion.
  • Structured, paginated output with output schemas; secrets and credentials are never returned or logged.
  • Works with Claude Desktop, Claude Code, VS Code, Cursor and any stdio MCP client. Requires Node.js 22 or newer.

How it works

Your MCP client starts the server as a local child process and talks to it over stdio. Every tool call passes the guards, then goes through a single gateway that owns the Keycloak login and caches the access token.

What a confirmed call looks like

Every tool that changes data is _destructive_ (it deletes or revokes) or _sensitive_ (it changes identity, credentials, rights or protection mechanisms, for example user_update or user_role_assign). Called without confirm: true, such a tool only returns a preview of what would happen and changes nothing. After you approve, the assistant repeats the call with confirm: true.

The model can set confirm: true itself, even on its first call. The server then still computes the preview and returns it with the result, but only your client's approval prompt proves that a human agreed. All these tools carry destructiveHint, so clients that ask before destructive calls ask here too.

Quick start

Requirements: Node.js 22 or newer, a Keycloak server your machine can reach (tested with Keycloak 24.0 to 26.8), and an MCP client.

1. Prepare Keycloak (3 steps)

In the realm you want to administer (here demo):

  1. Create a client mcp-admin with _Client authentication_ on and only _Service accounts roles_ enabled (turn off _Standard flow_ and _Direct access grants_).
  2. Assign roles. On the client's _Service accounts roles_ tab, assign client roles of realm-management. For a first read-only trial: view-users, query-users, query-groups, view-realm.
  3. Copy the secret from the client's _Credentials_ tab.

Step-by-step instructions with Admin Console click paths, kcadm.sh commands and a local Docker Keycloak: docs/getting-started.md.

2. Configure your MCP client

Example for Claude Code (other clients: docs/clients.md):

claude mcp add --transport stdio \

--env KEYCLOAK_URL=https://keycloak.example.com \ --env KEYCLOAK_AUTH_REALM=demo \ --env KEYCLOAK_CLIENT_ID=mcp-admin \ --env KEYCLOAK_CLIENT_SECRET="$KEYCLOAK_CLIENT_SECRET" \ keycloak -- npx -y keycloak-model-context-protocol@1

Or as JSON (Claude Desktop, claude_desktop_config.json):

{

"mcpServers": { "keycloak": { "command": "npx", "args": ["-y", "keycloak-model-context-protocol@1"], "env": { "KEYCLOAK_URL": "https://keycloak.example.com", "KEYCLOAK_AUTH_REALM": "demo", "KEYCLOAK_CLIENT_ID": "mcp-admin", "KEYCLOAK_CLIENT_SECRET": " " } } } }

3. Ask your first question

_List the realms you can access, then show me the first 10 users of realm demo._

If you get an answer, you are done. If not, see docs/troubleshooting.md.

Configuration

All settings are environment variables. Only KEYCLOAK_URL and one set of credentials are required.

VariableDefaultPurpose
KEYCLOAK_URL(required)Base URL of the Keycloak server
KEYCLOAK_AUTH_REALMmasterRealm where the login account or client lives
KEYCLOAK_CLIENT_ID / KEYCLOAK_CLIENT_SECRETnoneclient_credentials login (recommended)
KEYCLOAK_USERNAME / KEYCLOAK_PASSWORDnonePassword grant login (client defaults to admin-cli)
KEYCLOAK_GRANT_TYPEautoclient_credentials or password; detected from what you set
KEYCLOAK_MCP_TOOLSETScore,groups,rolesEnabled toolsets, or all
KEYCLOAK_MCP_READ_ONLYfalseRegister read-only tools only
KEYCLOAK_MCP_REALMSallComma-separated allowlist of target realms
KEYCLOAK_MCP_ALLOW_MASTER_WRITEfalseAllow write tools in the master realm
KEYCLOAK_MCP_REQUIRE_CONFIRMATIONtrueDestructive and sensitive tools need confirm: true
KEYCLOAK_MCP_TIMEOUT_MS30000HTTP timeout for Keycloak requests
KEYCLOAK_MCP_LOG_LEVELinfodebug, info, warn or error (stderr)

Full reference with examples, validation rules and the tool-to-role matrix: docs/configuration.md.

Toolsets and tools

Tools are named _ . Only the default toolsets are enabled unless you set KEYCLOAK_MCP_TOOLSETS. In read-only mode only tools of kind _read_ are registered.

ToolsetDefaultTools
coreyesrealm_list, realm_get, user_search, user_get, user_create (sensitive), user_update (sensitive), user_delete (destructive), user_send_actions_email (sensitive)
groupsyesgroup_list, group_members_list, user_group_add (sensitive), user_group_remove (destructive)
rolesyesrole_list, user_roles_list, user_role_assign (sensitive), user_role_revoke (destructive)
clientsnoclient_list, client_get
sessionsnouser_sessions_list, user_logout (destructive)
eventsnoevent_list, admin_event_list
securitynouser_brute_force_status, user_brute_force_unlock (sensitive)

Details for every tool (parameters, outputs, required roles): docs/tools-reference.md.

Prompts and resources

Prompts are guided workflows built on the tools. They appear in your client's prompt picker (in Claude Code as slash commands). The realm argument autocompletes.

PromptWhat it does
onboard_employeeCreate a user, add groups and roles, send the welcome e-mail
offboard_employeeReview, end sessions and disable a departing employee's account (does not delete)
audit_realm_securityRead-only security review with prioritized findings
investigate_failed_loginsAnalyze failed logins and lockout status without changing anything

Resources are read-only JSON documents, filtered by the same realm allowlist:

URIContent
keycloak://realmsNames of accessible realms
keycloak://realms/{realm}Safe subset of the realm settings
keycloak://realms/{realm}/security-summaryBrute-force, password policy, SSL, OTP, event flags, client exposure counts (no secrets)
keycloak://realms/{realm}/users/{userId}One user's basic fields (no attributes, no credentials)

Security

  • Least privilege first. Use a service-account client scoped to one realm with only the realm-management roles you need. A role matrix is in docs/configuration.md.
  • Every change needs confirmation (KEYCLOAK_MCP_REQUIRE_CONFIRMATION=true): destructive and sensitive tools show a preview firs

ตัดมาแค่ช่วงต้น อ่านต่อใน repo

ถาม PopNx