threatdeck
Live 13:45 UTC ·

Claude Code managed settings

Pick a preset, adjust the controls, copy the file. Every key links to the Claude Code doc it was checked against; options we could not verify are left out. Output is valid JSON for managed-settings.json, an MDM profile or the claude.ai admin console, with the minimum version set to 2.1.273 (the higher of the Advisory Board's minimum safe version and 2.1.273, required by the managed MCP allowlist).

File to generate
Most organisations: secrets blocked, bypass mode off, sandbox on, short retention.
Secrets and credential files
doc
doc
doc
doc
doc
Shell commands
doc
doc
doc
doc
doc
Permission mode
doc
doc
doc
Managed locks
managed only doc
managed only doc
managed only doc
managed only doc
managed only doc
MCP servers
managed only doc
doc
doc
Sandbox (Bash commands)
doc
doc
doc
doc
doc
managed only doc
Sign-in
doc
doc
Data, retention and telemetry
doc
doc
doc
doc
doc

What each enabled control does

    Building an MCP allowlist with pinned versions and advisory checks? Use the MCP allowlist generator and paste its entries into Allowed MCP servers.

    Where to put the file

    Save as managed-settings.json in the system directory, using whatever already places files on your fleet:

    • macOS: /Library/Application Support/ClaudeCode/managed-settings.json
    • Linux and WSL: /etc/claude-code/managed-settings.json
    • Windows: C:\Program Files\ClaudeCode\managed-settings.json (the legacy C:\ProgramData\ClaudeCode\ path is not read)
    • MDM: a macOS configuration profile for the com.anthropic.claudecode preference domain, or the JSON as a REG_SZ value named Settings under HKLM\SOFTWARE\Policies\ClaudeCode (Intune, Group Policy). Starter templates: anthropics/claude-code examples/mdm.
    • Server-managed: paste the same JSON in the claude.ai admin console (fetched at startup and hourly). Put forceLoginOrgUUID / forceLoginMethod in the file or MDM policy.
    • Several teams? Split it into managed-settings.d/10-*.json drop-ins next to the file; lists merge, later single values win.

    Check one machine before the fleet: /status in Claude Code shows Enterprise managed settings (file) on the Setting sources line, and claude doctor lists any entry it dropped. A file that is not valid JSON stops Claude Code from starting. Deploy managed settings

    Hooks

    Hooks are your own scripts, so this page does not write them. A PreToolUse hook on Bash that exits with code 2 blocks the tool call, with its stderr as the reason. Deploy vetted hooks in managed settings and set Only managed hooks run (allowManagedHooksOnly) so user, project and plugin hooks cannot run; a ConfigChange hook can audit or block settings changes during sessions. Hooks reference

    {
      "hooks": {
        "PreToolUse": [
          { "matcher": "Bash", "hooks": [{ "type": "command", "command": "/usr/local/bin/your-bash-guard.sh" }] }
        ]
      }
    }

    What this does not protect

    • Read deny rules cover Claude's file tools and file commands it recognises (cat, head, sed…), not a command that reads files without naming them (grep -r over a folder) or a script that opens files itself. Turn on the sandbox for OS-level enforcement. source
    • Bash rules match the command as Claude writes it: Bash(curl *) does not stop /usr/bin/curl or sh -c 'curl …'. source
    • The sandbox wraps shell commands only. Read, Edit, WebFetch and WebSearch follow permission rules; hooks, local MCP servers, plugin monitors and helper commands run with the developer's full access. source
    • Commands a developer types at the ! prompt usually run unsandboxed, with the access they already have in any terminal. source
    • The sandbox proxy decides on the hostname without inspecting TLS: broad domains such as github.com can still carry data out. source
    • The sandbox does not run on native Windows; with failIfUnavailable those machines cannot start Claude Code. source
    • A developer with local admin rights can edit the managed file; redeploy it on a schedule from MDM. Managed settings bind Claude Code only, not other tools that call the API. source
    • Sessions in Anthropic-hosted cloud environments do not read a device's file or MDM profile: use server-managed settings for them. source
    • An MCP allowlist decides which servers load, not what an allowed server does with its tools or the data it returns. Review servers before you allow them. source

    Sources (checked 2026-11-10): Settings reference · Settings files and precedence · Deploy managed settings · Configure permissions · Sandboxing · Managed MCP configuration · Environment variables · Hooks · Security. Some keys need a recent Claude Code; /status and claude doctor show what a machine applied.

    Following

    Follow the vendors, products, AI tools, techniques and actors you care about. Matching stories, CVEs and exploited bugs are marked, a Following tab appears in the feed, and returning visits show what changed. Saved only in this browser.

    Presets

    Get updates

    A personal RSS feed of new stories on everything you follow. Paste it into any feed reader, Slack or Teams RSS app.