keycloak-model-context-protocol 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -42
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -22,53 +22,13 @@ A [Model Context Protocol](https://modelcontextprotocol.io) (MCP) server for **K
|
|
|
22
22
|
|
|
23
23
|
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.
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
flowchart LR
|
|
27
|
-
subgraph Host["Your machine"]
|
|
28
|
-
Client["MCP client<br/>(Claude Desktop, Claude Code,<br/>VS Code, Cursor, ...)"]
|
|
29
|
-
subgraph Server["keycloak-model-context-protocol (Node.js)"]
|
|
30
|
-
Guards["Guards<br/>read-only, realm allowlist,<br/>master protection, confirmation"]
|
|
31
|
-
Toolsets["Toolsets, prompts, resources<br/>core, groups, roles, clients,<br/>sessions, events, security"]
|
|
32
|
-
Gateway["Gateway<br/>login and token cache"]
|
|
33
|
-
Guards --> Toolsets --> Gateway
|
|
34
|
-
end
|
|
35
|
-
Client <-->|"JSON-RPC over stdio"| Guards
|
|
36
|
-
end
|
|
37
|
-
|
|
38
|
-
subgraph KC["Keycloak"]
|
|
39
|
-
Token["Token endpoint"]
|
|
40
|
-
Admin["Admin REST API<br/>/admin/realms/..."]
|
|
41
|
-
end
|
|
42
|
-
|
|
43
|
-
Gateway -->|"client_credentials or password grant"| Token
|
|
44
|
-
Gateway -->|"Bearer token"| Admin
|
|
45
|
-
```
|
|
25
|
+

|
|
46
26
|
|
|
47
27
|
### What a destructive call looks like
|
|
48
28
|
|
|
49
29
|
A destructive tool never acts on the first call. It returns a preview of what would happen and changes nothing. Only after you approve does the assistant repeat the call with `confirm: true`.
|
|
50
30
|
|
|
51
|
-
|
|
52
|
-
sequenceDiagram
|
|
53
|
-
autonumber
|
|
54
|
-
actor User
|
|
55
|
-
participant LLM as MCP client / LLM
|
|
56
|
-
participant MCP as Keycloak MCP server
|
|
57
|
-
participant KC as Keycloak
|
|
58
|
-
|
|
59
|
-
User->>LLM: "Delete user bob from realm demo"
|
|
60
|
-
LLM->>MCP: user_delete (realm, userId)
|
|
61
|
-
MCP->>KC: GET user (for the preview)
|
|
62
|
-
KC-->>MCP: user data
|
|
63
|
-
MCP-->>LLM: isError, "Confirmation required. This would: permanently delete user bob ... Nothing was changed."
|
|
64
|
-
LLM->>User: "This will permanently delete bob. Proceed?"
|
|
65
|
-
User->>LLM: "Yes"
|
|
66
|
-
LLM->>MCP: user_delete (realm, userId, confirm: true)
|
|
67
|
-
MCP->>KC: DELETE user
|
|
68
|
-
KC-->>MCP: 204 No Content
|
|
69
|
-
MCP-->>LLM: deleted: true
|
|
70
|
-
LLM-->>User: "User bob was deleted."
|
|
71
|
-
```
|
|
31
|
+

|
|
72
32
|
|
|
73
33
|
## Quick start
|
|
74
34
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "keycloak-model-context-protocol",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "MCP server for Keycloak administration",
|
|
5
5
|
"mcpName": "io.github.ChristophEnglisch/keycloak-model-context-protocol",
|
|
6
6
|
"license": "MIT",
|
|
@@ -45,7 +45,9 @@
|
|
|
45
45
|
"test:smoke": "npm run build && node tests/smoke/pack-smoke.mjs",
|
|
46
46
|
"test:all": "npm test && npm run test:integration && npm run test:smoke",
|
|
47
47
|
"docs:tools": "npm run build && node scripts/generate-tools-reference.mjs",
|
|
48
|
-
"docs:check": "npm run build && node scripts/generate-tools-reference.mjs --check"
|
|
48
|
+
"docs:check": "npm run build && node scripts/generate-tools-reference.mjs --check",
|
|
49
|
+
"docs:diagrams": "node scripts/render-diagrams.mjs",
|
|
50
|
+
"docs:diagrams:check": "node scripts/render-diagrams.mjs --check"
|
|
49
51
|
},
|
|
50
52
|
"dependencies": {
|
|
51
53
|
"@keycloak/keycloak-admin-client": "^26.8.1",
|