boxadm-mcp
The boxadm-mcp server is a read-only MCP server for Box administrators to monitor external file sharing risks using Box admin event logs and folder enumeration. All operations are read-only — no Box content is modified.
Health Check: Verify server version, Box API connectivity, authentication status,
admin_logsscope access, and configured internal domain allowlist.Raw Admin Events: Fetch recent enterprise-wide admin log events for diagnostic purposes, with pagination support via
stream_position.External Access Analysis: Aggregate external DOWNLOAD/PREVIEW events — identify top external accessors, top externally-accessed files, and shared-link usage. Supports DLP tracing mode to trace exactly which files a specific external account accessed.
External Collaborators: Enumerate folders visible to the admin and list all outside-org collaborators (accepted or pending), including their role, status, and expiry.
Public Shared Links: Discover all files/folders shared via open (anyone-with-the-link) access — the highest-exposure sharing mode in Box.
Top External Sharers: Rank internal users by total external exposure (external collaborations + public shared links combined) to identify who shares the most outside the org.
Daily DLP Brief: A single combined call summarizing recent external access events and current sharing exposure (collaborators, public links, top sharers) for a morning DLP review.
Supports both OAuth 2.0 (user auth) and Client Credentials Grant (server-to-server) for Box authentication.
Provides tools for monitoring external file sharing and access events from a Box enterprise admin perspective, including enterprise events, external collaborators, public shared links, and DLP tracing.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@boxadm-mcpwho are the top external sharers today?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
boxadm-mcp
English | 日本語
MCP (Model Context Protocol) server that surfaces external file flow from
a Box admin's point of view. It reads Box's enterprise event log
(admin_logs) to highlight "who shares a lot with the outside" and "which
files get accessed from outside" — an early-warning signal for leakage, not a
general-purpose file browser.
Read-only: it never revokes shares, deletes files, or otherwise mutates anything — it only surfaces risk. This is a different tool from a general-purpose Box file MCP (the official Box MCP, or the claude.ai Box connector): those operate on a user's own files and cannot see enterprise events, which is exactly what this server is for.
Named after the admin-console viewpoint (boxadm = Box admin), sibling of
gwsadm-mcp.
Features
Tool | Category | Description |
| — | version + auth_mode + Box auth + |
| Diagnostic | Raw recent enterprise events (for checking event types/fields). Supports manual pagination via |
| Access (events, enterprise-wide) | Aggregates external DOWNLOAD/PREVIEW within a window: top external accessors, top externally-accessed files, share-link count. Pass |
| Exposure (enumeration) | Lists external collaborators (outside-org login or external invite email) |
| Exposure (enumeration) | Lists items shared with an |
| Exposure (enumeration) | Ranks internal owners by external exposure (external collabs + public links) |
| Combined | Morning summary combining access (events) and exposure (enumeration) |
Related MCP server: mcp-sqlserver-readonly
Auth model
Two modes, selected via BOX_AUTH_MODE:
oauth— OAuth 2.0 (user auth). An admin authorizes once in a browser; the refresh token keeps it running unattended after that.ccg— Client Credentials Grant (server-to-server). Simpler to run unattended if your Box tenant has an available server-authentication app slot.
admin_logs (enterprise events) is readable in either mode, provided the
authorizing/impersonated user is an admin and the app has the Manage
enterprise properties scope.
OAuth setup (one-time, by a Box admin)
Developer Console → Create Platform App → Custom App → User Authentication (OAuth 2.0)
Redirect URI:
http://localhost:8787/callbackApplication Scopes: check Manage enterprise properties (required for
admin_logs). Add Read all files and folders too if you also want collaboration/share-link enumeration (requires re-consent)Enable the app in the Admin Console (unpublished apps are disabled by default under most tenant policies)
Note the Client ID / Client Secret
First login: set
BOX_AUTH_MODE=oauthetc., then runboxadm-mcp auth→ authorize in the browser → a token cache is written to~/.config/boxadm-mcp/token.json(chmod 600)
Setup
# uv
uv pip install boxadm-mcp
# pip
pip install boxadm-mcpOr from source:
git clone https://github.com/shigechika/boxadm-mcp.git
cd boxadm-mcp
# uv
uv sync
# pip
pip install -e .Configuration
Variable | Required | Description |
|
| |
| ✓ | App Client ID |
| ✓ | App Client Secret |
| ccg mode | Enterprise ID (CCG subject; not needed for oauth) |
| oauth redirect. Default | |
| oauth token cache path. Default | |
| Default | |
| Parallel per-folder lookups in the enumeration scan. Default | |
| Soft wall-clock budget (seconds) for one enumeration scan. Default | |
| Per-request HTTP timeout (seconds). Default | |
| ✓ | Internal email domains (comma-separated). No default — every address counts as external until you set this |
Keep secrets out of .mcp.json (e.g. in a local env file sourced before
launch); .mcp.json itself can reference ${BOX_CLIENT_ID}-style variables
and be safely committed.
Scope and limits
Access tools (
external_access_events, and the access half ofdaily_brief) read the enterprise-wide events stream. Hittingmax_eventssetscapped: true(oldest-first scan).Exposure (enumeration) tools only see folders visible to the co-admin account (not a guaranteed 100% of the enterprise), plus
max_folders/max_depthlimits (surfaced viacapped). Requires the Read all files and folders scope.The scan fans its per-folder lookups out concurrently (
BOX_SCAN_CONCURRENCY), since Box has no enterprise-wide collaboration listing — this widens how many folders finish inside a tool-call timeout, but coverage is still bounded by the caps. The read path retries429(honoringRetry-After) and transient5xxwith jittered backoff, so a passing throttle recovers instead of degrading coverage; a folder dropped by a per-folder API error that outlasts those retries (e.g. a persistent403) is counted infetch_errors: coverage is complete only whencappedis false andfetch_errorsis 0.Enumeration tools share a short-TTL scan memo across calls;
public_shared_linksskips collaboration calls entirely (optimization).
DLP tracing (reverse-lookup by accessor)
To answer "what did this external account download": pass
created_by_logins (comma-separated logins) to external_access_events. It
keeps only that accessor's events and returns per-file detail
(matched_events: item id/name, owner, size in bytes+GB, timestamp,
event_type, whether it was via a share link).
external_access_events(since_hours=26, created_by_logins="someone@example.com")Since the accessor could appear anywhere in the window, a filtered call auto-extends the scan cap to up to 50,000 events (oldest-first) — but only matching events are kept, so memory stays bounded.
In this mode the response carries
events_matched(match count) instead ofevents_scanned(no running total is kept; usecappedto judge coverage).capped: truemeans the window wasn't fully scanned — raisemax_events.Box's
admin_logsAPI has nocreated_byquery parameter, so this is a client-side filter (fetch_admin_events(created_by_logins=...)).
Usage
Claude Code
Add to .mcp.json:
{
"mcpServers": {
"boxadm-mcp": {
"type": "stdio",
"command": "boxadm-mcp",
"env": {
"BOX_AUTH_MODE": "oauth",
"BOX_CLIENT_ID": "${BOX_CLIENT_ID}",
"BOX_CLIENT_SECRET": "${BOX_CLIENT_SECRET}",
"BOX_ALLOWED_DOMAINS": "example.com"
}
}
}
}CLI Options
boxadm-mcp auth # OAuth first-time login (opens a browser)
boxadm-mcp --version # Print version and exit
boxadm-mcp # Start MCP server (STDIO, default)Development
git clone https://github.com/shigechika/boxadm-mcp.git
cd boxadm-mcp
# uv
uv sync --dev
uv run pytest -v
uv run ruff check .
# pip
python3 -m venv .venv
.venv/bin/pip install -e . && .venv/bin/pip install pytest respx ruff
.venv/bin/pytest -v
.venv/bin/ruff check .Tests never touch Box — respx mocks the CCG/OAuth token endpoint and the
admin_logs/enumeration APIs.
Live smoke test
That isolation is the point of the unit tests, and also their limit: they
cannot tell you that a tool has stopped returning real data.
scripts/smoke_test.py runs every registered tool against the configured
enterprise and fails on empty, malformed or error answers:
# needs the same BOX_* environment variables as the server
uv run python scripts/smoke_test.py
uv run python scripts/smoke_test.py --only shared_links --tracebackRead-only. Every tool here reads; nothing in Box is changed. A future tool that writes must be listed as state-changing and skipped, and a test enforces that.
No payloads in the report. Tool names, statuses and row counts only; server-authored error text is redacted too, since Box errors quote the account or item they were asked about.
Bounded. These tools page the event stream and walk the folder tree, so each probe passes explicit small caps instead of the interactive defaults (5000 events, 150 folders) — enforced by a test that finds the bounding parameters from the source.
Nothing enterprise-specific in the specs. A test bans address shapes (login, URL, hostname, IPv4, IPv6) and the parameters that carry an account name, because this repository is public. The only literal identifier is folder id
0, which is the root folder in every enterprise.An empty answer passes: no public links and no external collaborators is the desired state, so probes assert the accounting envelope (
count,folders_scanned,window_hours) rather than a row count.CI enforces the cheap half: a tool registered without a probe spec fails the build (
tests/test_smoke_probes.py), so adding a tool forces the question "how would we know it works?".scripts/smoke_harness.pyis the engine and holds no Box knowledge: it is kept identical across the servers that share it, so fix engine bugs once and sync the file rather than patching this copy.
Releasing
Releases are automated with release-please.
Merging Conventional Commits (feat:, fix:, …)
to main keeps a release PR open with the next version and changelog. Merging
that PR tags vX.Y.Z and publishes a GitHub Release, whose release: published
event triggers the release workflow to build and publish to PyPI and the MCP
Registry. release-please owns the version in boxadm_mcp/__init__.py and
server.json (do not bump them by hand).
The release-please workflow should be given a repository secretRELEASE_PLEASE_TOKEN (a PAT with contents: write + pull-requests: write).
The default GITHUB_TOKEN cannot create the Release that triggers the
downstream release workflow (GitHub blocks workflow runs triggered by
GITHUB_TOKEN), so without the PAT nothing gets published. The workflow falls
back to GITHUB_TOKEN when the secret is unset so PR CI keeps working on forks.
Governance
Because this surfaces what users share, run it as authorized information-security monitoring with a clear purpose, a defined set of viewers, and a retention policy. Most external sharing is legitimate (collaborators, vendors), so treat findings as a risk ranking, not an alert queue — build an allowlist of known-OK sharers over time.
License
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/shigechika/boxadm-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server