Claude Code enforces organization policy through managed settings that take precedence over local developer configuration, delivered from the Claude admin console, an MDM system, or a file on disk at /Library/Application Support/ClaudeCode/managed-settings.json on macOS, /etc/claude-code/managed-settings.json on Linux, and C:\Program Files\ClaudeCode\managed-settings.json on Windows. Those settings control permissions, MCP servers, available models, hooks, telemetry, and login enforcement. Usage visibility comes from the analytics dashboard, the Enterprise Analytics API, and OpenTelemetry export; spend caps come from seat allowances, admin spend limits, workspace limits, or a gateway.
- Managed settings win. They outrank command-line flags, project settings, and user settings, in that order.
- Lock policy with
allowManagedPermissionRulesOnly,allowedMcpServers, andenforceAvailableModels. - Audit is OTel plus the Analytics API. The dashboard shows adoption; only those two give per-user cost.
- A gateway is the answer when you need one credential, one log, and per-developer spend caps across cloud providers.
- Budget $150 to $250 per developer per month, not the seat price. Anthropic publishes that figure itself.
Decision one: pick the billing rail
The rail decides your billing, your compliance inheritance, your audit surface, and which Claude Code features your developers can reach. Change it later and every other decision on this page moves with it, so take it first and deliberately.
| Rail | Billing | Choose it when |
|---|---|---|
| Claude for Teams | Per-seat allowance | You want one subscription covering Claude Code and claude.ai, under 150 people |
| Claude for Enterprise | $20/seat plus usage at API rates | You need SSO, SCIM, audit logs, RBAC, and managed policy settings |
| Claude Console | Pay as you go per token | You are API-first and want workspace spend limits |
| Amazon Bedrock | Your AWS account | You want to inherit AWS compliance and billing |
| Google Cloud's Agent Platform | Your GCP account | You want to inherit GCP compliance and billing |
| Microsoft Foundry | Your Azure account | You want to inherit Azure compliance and billing |
Whichever rail you choose, the proxy, custom CA, and mTLS requirements in Anthropic’s network configuration guidance apply the same way, and a gateway can sit in front of any of them.
Decision two: how policy reaches machines
Claude Code reads settings from several sources and applies the highest-priority one. Managed settings sit at the top and cannot be overridden by a developer, which is the property that makes the whole model work.
| Rank | Source | Who controls it |
|---|---|---|
| 1 | Managed settings (server-managed, MDM, or on-disk file) | Admin |
| 2 | Command-line arguments | Developer, per session |
| 3 | .claude/settings.local.json | Developer, gitignored |
| 4 | .claude/settings.json | The repository |
| 5 | ~/.claude/settings.json | Developer, global |
| Platform | Path |
|---|---|
| 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 |
| Any platform, fragments | a managed-settings.d/ directory beside the file |
There are three ways to deliver the same file, and they do not merge: Claude Code applies the first source that returns a non-empty configuration. Server-managed settings from the claude.ai admin console reach any machine where the developer is signed into your organization, and are the lowest-effort option; an MDM-pushed file works before first login, which is the only way to enforce login policy itself; a hand-placed file is for pilots. If you use two, keep the login-enforcement keys in both, because a cached server-managed configuration replaces the device file rather than merging with it.
Decision three: what to enforce
A starting policy should be short enough that people read it and strict enough that the obvious accidents cannot happen. Everything below is a managed-settings key, and the ones marked managed-only cannot be set by a developer at all.
{
"$schema": "https://json.schemastore.org/claude-code-settings.json",
"forceLoginMethod": "claudeai",
"forceLoginOrgUUID": "<your-org-uuid>",
"permissions": {
"deny": [
"Read(./.env)",
"Read(./.env.*)",
"Read(./secrets/**)",
"Bash(curl:*)",
"Bash(git push --force:*)"
],
"ask": ["Bash(git push:*)"],
"disableBypassPermissionsMode": true
},
"allowManagedPermissionRulesOnly": false,
"allowedMcpServers": [{ "serverName": "github" }],
"allowManagedMcpServersOnly": true,
"disableClaudeAiConnectors": true,
"availableModels": ["sonnet", "haiku"],
"enforceAvailableModels": true,
"allowedHttpHookUrls": ["https://hooks.internal.example.com/*"],
"cleanupPeriodDays": 30,
"companyAnnouncements": [
"Agent policy: docs.example.com/ai. Report anything odd in #ai-platform."
]
}
denybeats everything. Put secrets files and credential exfiltration paths here, not inask. A prompt a developer sees forty times a day is a prompt they stop reading.disableBypassPermissionsModestops a developer from switching the session into a mode that skips approvals. Set it before you argue about individual rules.allowedMcpServerswithallowManagedMcpServersOnlyis the real MCP control. An empty allowlist is a full lockdown;deniedMcpServerstakes precedence over the allowlist when both name a server.availableModelsneedsenforceAvailableModelsto apply to the Default option too. Without the second key, restricting the list leaves the default route open, which is the most common way this control is set and does nothing. Decide what belongs on the list from evidence rather than habit: the cards for Claude Opus 5 and Claude Fable 5 carry the published coding scores next to the rates you will pay for them.allowManagedPermissionRulesOnlystops project and user settings contributing permission rules at all. Powerful, and heavy-handed: turn it on when a repository has been caught allowlisting its own way around policy, not before.claudeMdinjects organization-wide instructions as CLAUDE.md-style memory, honored only from managed settings. Keep it under a screen; it is prepended to every session your organization runs.
Decision four: audit and telemetry
Three surfaces answer three different questions, and buying one and expecting another is the usual disappointment.
| Surface | Answers | Requires |
|---|---|---|
| Analytics dashboard | Adoption, accept rate, PRs and lines with Claude Code | Team or Enterprise; GitHub app for contribution metrics |
| Spend report CSV | Estimated spend per user and per model, daily | Usage credits turned on |
| Enterprise Analytics API | Per-user engagement, usage, and cost across surfaces | Enterprise plan, read:analytics key |
| OpenTelemetry export | Live per-session tokens, cost, tool decisions | Any rail |
OpenTelemetry is the only one that works on every rail, including Bedrock, Google Cloud, and Microsoft Foundry, where Claude Code sends no metrics back to Anthropic at all and the dashboards therefore see nothing.
{
"env": {
"CLAUDE_CODE_ENABLE_TELEMETRY": "1",
"OTEL_METRICS_EXPORTER": "otlp",
"OTEL_LOGS_EXPORTER": "otlp",
"OTEL_EXPORTER_OTLP_PROTOCOL": "grpc",
"OTEL_EXPORTER_OTLP_ENDPOINT": "http://collector.internal.example.com:4317",
"OTEL_EXPORTER_OTLP_HEADERS": "Authorization=Bearer <token>",
"OTEL_RESOURCE_ATTRIBUTES": "cost_center=eng,team.id=platform",
"OTEL_METRICS_INCLUDE_SESSION_ID": "false"
}
}
- Metrics worth alerting on:
claude_code.cost.usagein USD,claude_code.token.usage,claude_code.session.count, andclaude_code.active_time.total. - Every metric and event carries
session.id,user.id,organization.id,app.version, andapp.entrypoint, so cost attributes cleanly by person and by surface. - The cost metric also carries
model,query_source(main,subagent, orauxiliary), andeffort, which is how you find out that your subagents cost more than your main sessions. OTEL_RESOURCE_ATTRIBUTEStakes no spaces. Use underscores. It is the cleanest way to stamp a cost center onto every datapoint.- Turn
OTEL_METRICS_INCLUDE_SESSION_IDoff once you are past the pilot. It is on by default and it is the largest single driver of metric cardinality. - Enterprise Analytics API keys are minted by a Primary Owner at the analytics API keys page with the
read:analyticsscope. The API is not available on the Teams plan.
Decision five: where the spend ceiling sits
Every rail can be capped, but the mechanism is different on each one, and a mixed organization has to set all of them because each developer is metered by whichever credential they signed in with.
| Rail | Default ceiling | Explicit cap |
|---|---|---|
| Team | The seat allowance | Spend limits in admin settings once usage credits are on |
| Enterprise | None; usage is metered | Spend limits at org, group, and member level |
| Claude Console | None | Workspace spend limit and workspace rate limit |
| Cloud providers | None | Your cloud budget controls |
| Claude apps gateway | None | Per-developer daily, weekly, or monthly caps, enforced live |
On the Console rail there is a detail worth knowing: a workspace called "Claude Code" is created automatically on first authentication, you cannot mint API keys inside it, and it exists precisely so Claude Code spend is isolated and cappable. Set a workspace rate limit as well as a spend limit, so an agent run cannot crowd out production traffic sharing your organization’s quota.
When a gateway earns its keep
A gateway becomes the right answer at the point where you want one credential store, one request log, and per-developer spend caps across more than one provider. Anthropic ships its own self-hosted Claude apps gateway that signs developers in through your IdP, routes to Bedrock, Google Cloud, or Microsoft Foundry, applies per-group model access, exports OTLP telemetry, and enforces per-developer spend limits live on every request. Third-party LLM gateways work too, with ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN distributed through the same managed settings.
A rollout that does not stall
Pilot ten people for a month
One rail, spend limits on, telemetry on, no permission rules beyond the secrets denylist. The point is a measured baseline, not a policy. You will learn your real per-developer cost, which is the number every later argument needs.
Write the policy from what the pilot showed
Turn the rejections and the surprises into deny rules and an MCP allowlist. A policy derived from observed behaviour survives contact with engineers; one derived from a threat-model workshop mostly generates exceptions.
Ship managed settings through MDM
Verify enforcement on a real machine rather than trusting the deploy. Check the Windows path if you have Windows developers, and confirm that a rule you set actually blocks the thing it names.
Wire telemetry before you widen
A collector, a dashboard on claude_code.cost.usage by user.id and by cost center, and one alert on daily spend. Doing this after the rollout means the first month has no data and the first invoice has no explanation.
Widen by team, with a cap per team
A cap you can raise on request beats a blocked engineer at four on a Thursday, and it gives you a natural conversation with the teams whose usage is genuinely different rather than merely higher.
Review monthly, per person and per repo
Not to police it. The outlier is almost always a fixable workflow: an uncleared session carrying a huge context, a default model set too high, or an agent team left running. Those are worth finding, and they are invisible at the org level.
Questions people ask
How do I deploy Claude Code across an enterprise?
Choose a billing rail, then push a managed settings file through your MDM or the claude.ai admin console. Managed settings outrank command-line flags, project settings, and user settings, so they are what makes permissions, MCP allowlists, model restrictions, and telemetry enforceable rather than advisory. Pilot ten people first to get a measured cost baseline before widening.
Where is the Claude Code managed settings file?
/Library/Application Support/ClaudeCode/managed-settings.json on macOS, /etc/claude-code/managed-settings.json on Linux and WSL, and C:\Program Files\ClaudeCode\managed-settings.json on Windows, each with an optional managed-settings.d/ directory for fragments. The old Windows path under ProgramData stopped being read in v2.1.75.
How do I restrict which MCP servers Claude Code can use?
Set allowedMcpServers in managed settings with allowManagedMcpServersOnly set to true, so only your allowlist applies. deniedMcpServers takes precedence over the allowlist, an empty allowlist is a full lockdown, and disableClaudeAiConnectors stops claude.ai connectors being fetched automatically.
How do I restrict which models Claude Code can use?
Set availableModels to the list you allow, and set enforceAvailableModels to true. Without the second key the restriction does not apply to the Default model option, which is how most attempts at this control end up doing nothing.
How do we audit Claude Code usage across the organization?
The Team and Enterprise analytics dashboard covers adoption and contribution metrics; the spend report CSV covers estimated spend per user and per model; the Enterprise Analytics API returns per-user usage and cost with a read:analytics key on Enterprise only; and OpenTelemetry export streams per-session cost and token metrics on every rail, including cloud providers where the dashboards see nothing.
What should we budget per developer for Claude Code?
Anthropic reports about $13 per developer per active day and $150 to $250 per developer per month across enterprise deployments, staying under $30 per active day for 90 percent of users. Usage is heavily skewed, so budget a distribution: your top decile will run several times the median.
Sources
Every figure above was read from these pages on August 2026. Vendors reprice without notice; if you find a stale number, tell us.
- Claude Code: set up Claude Code for your organization
- Claude Code: settings reference Managed settings paths, precedence, and every policy key quoted here.
- Claude Code: authentication
- Claude Code: monitoring with OpenTelemetry
- Claude Code: track team usage with analytics
- Claude Code: manage costs effectively
- Claude apps gateway spend limits