Borrowing it
Nothing to install: this file belongs to shigechika/keycloak-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/shigechika/keycloak-mcp/main/CLAUDE.mdgit clone --depth 1 https://github.com/shigechika/keycloak-mcpWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/shigechika/keycloak-mcp/claude-md)<a href="https://agentmods.dev/instructions/shigechika/keycloak-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/shigechika/keycloak-mcp/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/shigechika/keycloak-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/shigechika/keycloak-mcp/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.01078 | $0.01078 |
| Opus 5 | $0.00539 | $0.00539 |
| Sonnet 5 | $0.00216 | $0.00216 |
| Haiku 4.5 | $0.00108 | $0.00108 |
Grade A, and why
keycloak-mcp CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 77 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md
Overview
MCP server for the KeyCloak Admin REST API. Authenticates as a Service
Account (OIDC Client Credentials Grant — no human password or TOTP);
never calls the userinfo endpoint and never creates user sessions
(the project describes this as "Infinispan-safe" — see README.md).
Exposes 29 tools (users, MFA/credentials, groups, brute-force/security,
events, admin events, sessions/clients, and a daily_brief morning
report) over stdio transport.
Commands
uv sync --dev
uv run pytest -v # all tests
uv run ruff check . # lint
uv run ruff format --check . # format check
This mirrors .github/workflows/ci.yml (matrix: Python 3.10–3.14 on
Ubuntu, plus one Windows 3.12 job to catch stdio newline regressions).
Plain-pip equivalents are documented in README.md's Development section.
Architecture
keycloak_mcp/auth.py—TokenManager: Client Credentials Grant token fetch/cache, refreshed 30s before expiry.keycloak_mcp/client.py—KeyCloakClient: thinhttpxwrapper over the Admin REST API; retries 429/502/503/504 and transport errors with exponential backoff;_paginatepages list endpoints.keycloak_mcp/sites.py—SiteClassifier: labels IPs with a site name from an optionalKEYCLOAK_SITES_INIfile.keycloak_mcp/server.py—FastMCPserver; all@mcp.tool()functions.keycloak_mcp/__main__.py— CLI entry point (--check,--version) plus a Windows-only stdout wrapper that strips CRLF back to LF.
Required env vars: KEYCLOAK_URL, KEYCLOAK_CLIENT_ID,
KEYCLOAK_CLIENT_SECRET. Optional: KEYCLOAK_REALM (default master),
KEYCLOAK_SITES_INI, KEYCLOAK_DEFAULT_DATE_FROM_HOURS (default 24), and the
heavy-tool bounds KEYCLOAK_DEADLINE (default 45s), KEYCLOAK_MAX_EVENTS
(default 200000), KEYCLOAK_MAX_USERS (default 5000) — a wall-clock deadline +
caps so a wide event window or a whole-realm get_totp_users returns a
disclosed partial (⚠️) instead of blowing the ~60s gateway and hammering
KeyCloak (see _paginate's deadline/max_total and server.py's
_deadline_seconds/_max_events/_max_users). Each 0/negative disables.
KEYCLOAK_USER_ATTRIBUTE_WHITELIST (default unset, comma-separated attribute
keys) opts specific custom user attributes into get_user's output — unset,
get_user never fetches or surfaces attributes at all (see
_user_attribute_whitelist/get_user_by_id), so no custom attribute reaches
tool output, hence LLM context, unless an operator explicitly names it. A
whitelisted key that matches _looks_like_credential_key's substring list
(password, secret, token, …) is reported as blocked rather than shown —
a safety net on top of the whitelist, not a guarantee for arbitrarily-named
credential attributes.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 8d ago First seen · 77 lines · 1,078 tokens per session scan A 88997e8e618b
keycloak-mcp CLAUDE.md is an instructions file published in the GitHub repository shigechika/keycloak-mcp (0 stars, last pushed 6d ago), licensed MIT. It adds 1,078 tokens to every session, about $0.0054 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other instructions, from other repositories
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.