keycloak-model-context-protocol 1.0.1 → 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.
Files changed (2) hide show
  1. package/README.md +2 -42
  2. package/package.json +5 -3
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
- ```mermaid
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
+ ![Architecture: the MCP client talks JSON-RPC over stdio to the server, whose guards, toolsets and gateway call the Keycloak token endpoint and Admin REST API](https://raw.githubusercontent.com/ChristophEnglisch/keycloak-model-context-protocol/main/docs/diagrams/architecture.svg)
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
- ```mermaid
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
+ ![Sequence of a destructive call: the first user_delete call returns a preview and changes nothing, the repeated call with confirm: true deletes the user](https://raw.githubusercontent.com/ChristophEnglisch/keycloak-model-context-protocol/main/docs/diagrams/destructive-call.svg)
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.1",
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",
@@ -53,7 +55,7 @@
53
55
  "zod": "^4.6.7"
54
56
  },
55
57
  "devDependencies": {
56
- "@biomejs/biome": "^2.6.2",
58
+ "@biomejs/biome": "^2.6.3",
57
59
  "@modelcontextprotocol/client": "^2.4.0",
58
60
  "@types/node": "^22.20.5",
59
61
  "@vitest/coverage-v8": "^5.0.5",