Borrowing it
Nothing to install: this file belongs to shigechika/boxadm-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/boxadm-mcp/main/CLAUDE.mdgit clone --depth 1 https://github.com/shigechika/boxadm-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/boxadm-mcp/claude-md)<a href="https://agentmods.dev/instructions/shigechika/boxadm-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/shigechika/boxadm-mcp/claude-md.svg" alt="Measured on agentmods" 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.02957 | $0.02957 |
| Opus 5 | $0.01478 | $0.01478 |
| Sonnet 5 | $0.00591 | $0.00591 |
| Haiku 4.5 | $0.00296 | $0.00296 |
Grade A, and why
boxadm-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 7d 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 — 187 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md
Overview
MCP (Model Context Protocol) server surfacing external file flow from a Box
admin's point of view — reads the Box enterprise event log (admin_logs)
to highlight who shares a lot with the outside and which files get accessed
from outside. Built on the official mcp Python SDK's FastMCP
(boxadm_mcp/server.py), over stdio transport. Read-only: no tool ever
revokes a share, deletes a file, or otherwise mutates anything.
Commands
uv sync --dev
uv run pytest -v # run all tests
uv run ruff check . # lint
uv run ruff format --check . # format check
This mirrors .github/workflows/ci.yml: a lint job (ruff check +
ruff format --check) and a test job (pytest -v) on Python
3.10/3.12/3.13, Linux only — no Windows job, because client.py imports
fcntl at module load (POSIX-only; see below), which would fail before any
test runs.
Architecture
boxadm_mcp/server.py— FastMCP server with 9 tools:health_check,recent_admin_events(raw diagnostic),external_access_events(enterprise-wide DOWNLOAD/PREVIEW analytics, plus acreated_by_loginsDLP-tracing mode),external_collaborators/public_shared_links/top_external_sharers(enumeration over the co-admin's visible folders, BFS via_scan()),list_folder_items(one folder's contents, with uploader attribution fromuploader_display_name—created_by/modified_byare "Anonymous User" for a File Request upload, andsince/untilare compared as instants because Box's offset differs from the caller's),get_user(one account's current state by exact login — see below), anddaily_brief(synthesis of both)._SCAN_CACHEmemoizes_scan()results for 60s (_SCAN_TTL) keyed on(root_folder_id, max_folders, max_depth, want_collabs), soexternal_collaborators/top_external_sharers(samewant_collabs=Truekey) share one traversal instead of re-walking; cleared onreset_client()._scan()fans the per-folderget_folder_collaborations+get_folder_itemscalls out across a boundedThreadPoolExecutor(BOX_SCAN_CONCURRENCY, default 8, clamped 1..32), draining one BFS level at a time up to the folder budget — Box has no enterprise-wide "list all collaborations" API, so the per-folder fan-out is unavoidable and concurrency is the only lever. Concurrency is deliberately not in the cache key (it changes speed, never results), andexecutor.map's order-preserving merge keeps the visited set,folders_scanned, and output ordering identical to a sequential walk. Per-folder API failures are tolerated but counted infetch_errorsand surfaced by every collab/exposure tool, so a folder dropped by an error is disclosed the same waycappeddiscloses a budget cut — coverage is complete only whencappedis false ANDfetch_errorsis 0. A 429 (honoringRetry-After) or transient 5xx is retried with jittered backoff inclient.py's_getfirst (bounded by an attempt cap and a per-call wall-clock budget), so only a failure that outlasts those retries (e.g. a persistent 403, or a sustained throttle) lands infetch_errors. That per-_getbudget does not bound a whole scan, so_scan()also carries a soft wall-clock deadline (BOX_SCAN_DEADLINE, default 45s;0disables), checked only between BFS levels (the in-flight batch always finishes) — when hit it setscappedand returns the disclosed partial rather than letting the tool call run to a gateway timeout that returns nothing. The per-request HTTP timeout isBOX_HTTP_TIMEOUT(default 30s). Neither is in the cache key. Whenwant_collabs=True, folders Box flags withis_externally_ownedare skipped (an outside party owns them, so their collaborations aren't the enterprise's to audit) and reported separately underskipped_externally_owned, never silently dropped — this is Box's authoritative signal, and an earlier owner-domain heuristic (is_external(owner)) was tried and reverted as a production regression (it collapsed ~190 audited folders to 9).boxadm_mcp/client.py— two read-only client classes sharing_FolderReadMixin(the shared authenticated GET plus the folder/collaboration getters andget_users(), so one implementation serves both auth modes):BoxClient(Client Credentials Grant, server-to-server) andBoxOAuthClient(OAuth 2.0 user auth with an auto-refreshed, cross-process-locked token cache — see below). Exception hierarchy:BoxError(base) →BoxAuthError→BoxNotAuthenticatedError(no usable cache; runboxadm-mcp auth), andBoxError→BoxRequestError(an argument would have built a request other than the one intended — raised instead of being sent).server.pycallers only special-caseBoxNotAuthenticatedError(surfaced asneeds-login); a bareBoxAuthErrorfalls through to the sameexcept BoxErrorhandling as any other Box API failure — it is not given its ownexcept BoxAuthErrorclause anywhere inserver.pytoday.- Ids decide the endpoint, so they are validated before interpolation. A
folder id goes into the request PATH and
httpx.URLresolves..segments, so../usersrewrites/2.0/folders/../usersinto/2.0/users— a page of the enterprise directory, i.e. the enumerationget_userrefuses. Two layers:_validate_resource_id()(decimal-only, in each folder getter, where a useful message about WHICH argument is possible) and_assert_endpoint_intact()in_get(no dot segment / query / fragment, root-relative), which covers every present and future path at the point the URL is assembled.BoxRequestErroris aBoxErroron purpose so_scan's per-folder handler absorbs one intofetch_errorsinstead of it escapingThreadPoolExecutor.mapas a raw traceback. That absorption is NOT the defence for a caller-supplied root:server._checked_root()validates that up front and returns an error dict, because an absorbed refusal would report a request that never left as a complete, empty result. boxadm_mcp/config.py—allowed_domains()readsBOX_ALLOWED_DOMAINS(comma-separated); no organization-specific default — an unset/empty value yields no domains, sois_external()treats every address as external until configured (fail-safe for a leakage-detection tool).boxadm_mcp/oauth.py—login(): the one-time interactive OAuth flow run viaboxadm-mcp auth. Spins up a localhttp.serverto catch the redirect, then writes the token cache through the samecache_lock/write_token_cachepathBoxOAuthClientuses for refreshes.boxadm_mcp/__main__.py— CLI entry point (--version/auth) and themcp.run()stdio server start.
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.
- 7d ago First seen · 187 lines · 2,957 tokens per session scan A a8250d58bcfb
boxadm-mcp CLAUDE.md is an instructions file published in the GitHub repository shigechika/boxadm-mcp (0 stars, last pushed 4d ago), licensed MIT. It adds 2,957 tokens to every session, about $0.0148 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.