Coding agents

How to block Claude Code on company machines

Claude Code reads your repositories, edits files, runs shell commands and connects to MCP servers, all with the developer's own access. Decide whether to block it or allow it under a policy you control, then enforce that choice on every device.

Next step

AI Agent Blocklist: package names, process names, app IDs and domains of Claude Code and every other coding agent

Ready for Intune, Jamf, your firewall and your DNS filter, with a risk grade on every entry and daily updates.

From $99 a month for one organisation See plans Ask a question

What Claude Code can reach on a developer machine

Claude Code is Anthropic's coding agent. It is useful precisely because it can act, and that is also why an unmanaged install is a security question rather than a productivity one.

Files and code

Reads files in the working folder and beyond, including configuration and secrets that sit next to the code.

The shell

Runs commands with the developer's rights: package installs, scripts, git, cloud command-line tools.

MCP servers

Connects to tools and data sources through MCP, from local scripts to company systems in the cloud.

The web

Fetches web pages and documentation, which can contain instructions written to steer an agent.

The browser

With the Claude in Chrome extension connected, it can open tabs and act in sites the user is signed in to.

Fewer prompts

Permission modes such as bypass permissions skip approval prompts entirely, which the documentation reserves for isolated containers.

Why this matters: any coding agent with shell access can read what the developer can read. Text planted in a package, a README or an issue can ask it to look for secrets, so deny those paths in managed settings. Read AI coding agent security risks for the common patterns.

Where Claude Code shows up, and its identifiers

Blocking one install method is not enough. Claude Code ships through several channels and runs inside editors and a desktop app. These are the identifiers you control.

SurfaceHow it arrivesIdentifier to block
Command-line tool, native installAnthropic's install script for macOS, Linux and Windows; the launcher sits in the user's home folder under .local/binProcess name claude
npm packageGlobal npm install, needs Node.js@anthropic-ai/claude-code
Homebrew on macOSCask installclaude-code
WinGet on WindowsPackage installAnthropic.ClaudeCode
VS CodeMarketplace extensionanthropic.claude-code
JetBrains IDEsMarketplace plugincom.anthropic.code.plugin
Linux package managersapt, dnf and apk repositories published by AnthropicPackage claude-code, repository files in your package config

Claude Code also runs inside the Claude desktop app and in cloud sessions started from the browser. Those are governed from your Claude organisation's admin settings and, for cloud sessions, by server-managed settings.

Signs Claude Code is already in use

Before you block, find out who uses it and for what. These traces are easy to collect with your endpoint tools.

  • A process named claude in endpoint telemetry, often started from a terminal or an editor
  • A .claude folder and a .claude.json file in user home directories
  • .claude/settings.json, CLAUDE.md or .mcp.json files committed to company repositories
  • The VS Code extension or JetBrains plugin in your editor inventory
  • Homebrew, WinGet or npm inventories that list the packages above
  • DNS and proxy logs with traffic to anthropic.com, claude.ai and claude.com
  • Developers asking for an exception for a "terminal AI" or "agent" in tickets
  • API keys for Anthropic in password managers, CI secrets or shell profiles

Block it, or allow it under managed settings?

Many organisations do not need a total ban. They need Claude Code to run only with company accounts and company rules. Pick the path before you touch any setting.

Path A

Block everywhere

For organisations with no approved AI coding tool, or with source code that must never leave the network.

  • Device rules stop install and execution
  • IDE policies block the extensions
  • Network rules block the agent's hosts
  • Exceptions go through a written request
Path B

Allow under policy

For organisations with Claude for Teams or Enterprise, or a cloud provider contract for Claude models.

  • Only company accounts and providers can sign in
  • Managed permission rules that users cannot loosen
  • MCP servers limited to an approved set
  • Everything else on our list stays blocked

Path A: how to block Claude Code in layers

No single control catches every install method. Stack three layers so that a gap in one is covered by the next.

Layer 1Devices

Block the WinGet and Homebrew packages, and the npm package in your internal registry or proxy. Use your endpoint tool to block or alert on the claude process and on the launcher and versions folders the native installer creates.

On Windows use Intune or AppLocker style rules; on Macs use your MDM's app restrictions. Our Intune guide shows the layout.

Layer 2Editors

In VS Code, the AllowedExtensions policy maps to the extensions.allowed setting. Set the Claude Code extension ID to false, and VS Code disables installed copies. In JetBrains IDEs, remove or block the plugin through your IDE management.

Layer 3Network

Anthropic documents the hosts Claude Code needs for the API, sign-in, downloads and updates. If nobody in the company uses Claude, block anthropic.com, claude.ai and claude.com at the firewall or DNS filter. If Claude chat is approved, rely on layers 1 and 2 and on sign-in restrictions instead.

Cloud provider routes: Claude Code can also reach Claude models through Amazon Bedrock, Google Cloud and Microsoft Foundry. Blocking Anthropic's own hosts does not stop those routes. Use device controls, or the allowedProviders key in managed settings, to close them.

Path B: lock Claude Code down with managed settings

Managed settings sit above every user, project and command-line setting. Developers cannot override them from their own files.

DeliveryWhere it livesWhen it applies
File on macOS/Library/Application Support/ClaudeCode/managed-settings.jsonRead at start, rechecked while running
File on Linux and WSL/etc/claude-code/managed-settings.jsonRead at start, rechecked while running
File on WindowsC:\Program Files\ClaudeCode\managed-settings.jsonThe older ProgramData path is no longer read
macOS MDM profilePreferences domain com.anthropic.claudecodeChecked for changes every 30 minutes
Windows registryREG_SZ value Settings under HKLM\SOFTWARE\Policies\ClaudeCodeChecked for changes every 30 minutes
Server-managedOrganization settings > Claude Code > Managed settings in the claude.ai admin console (Teams and Enterprise, Owner role)Fetched at start and hourly
{ "permissions": { "deny": [ "Read(./.env)", "Read(./.env.*)", "Read(./secrets/**)", "Bash(curl *)" ], "disableBypassPermissionsMode": "disable", "disableAutoMode": "disable" }, "allowManagedPermissionRulesOnly": true, "forceLoginMethod": "claudeai", "forceLoginOrgUUID": ["your organisation ID"], "allowedProviders": ["anthropic"] }

A starting point for managed-settings.json. Replace the organisation ID with the one shown in your Claude admin settings, and test on one machine first.

What each key does
The deny rules stop Claude's file tools from reading .env files and a secrets folder, and block curl in the shell. disableBypassPermissionsMode and disableAutoMode remove the two modes that skip your prompts. allowManagedPermissionRulesOnly makes managed rules the only permission rules. forceLoginMethod and forceLoginOrgUUID refuse accounts outside your organisation, and allowedProviders limits which services Claude Code may reach.
How to confirm it worked
On the test machine, run /status inside Claude Code. The Setting sources line should name enterprise managed settings and how they arrived. Run claude doctor in the shell to see any entries Claude Code rejected.
Limits you should know
A developer with local administrator rights can edit the managed file, so let your MDM redeploy it on a schedule. Deny rules on Bash commands match command text, so the documentation recommends the sandbox for limits that must hold. Managed settings bind only Claude Code, not other tools.
Protecting secrets needs more than one rule. See stop AI coding agents from reading .env files for the sandbox settings that block reads at the operating system level.

How to disable MCP in Claude Code

MCP servers give Claude Code new tools and new data sources. Each one is code you did not write, running with the developer's rights. Claude Code offers several levels of control.

Off entirely

  • Deploy managed-mcp.json with an empty mcpServers object
  • claude mcp add then fails with an enterprise policy error
  • Previously added servers stop loading next session

Approved set only

  • List approved servers in allowedMcpServers by command or URL
  • Set allowManagedMcpServersOnly to true
  • Users cannot widen the list

Known bad blocked

  • List servers in deniedMcpServers
  • A deny always wins over an allow
  • Match by command or URL, not by name
Server names are labels users choose, so a name entry is not a security control. Match on the exact command or URL. Connectors fetched from claude.ai can be switched off with disableClaudeAiConnectors. More options are on how to disable MCP servers, and the reasons are on MCP security risks.

How to stop Claude Code in the terminal

Sometimes the question is simpler: a developer wants Claude Code to stop what it is doing right now. These keys are documented for the interactive session.

Esc

Interrupts the current response or tool call. Work done so far is kept, and you can redirect.

Ctrl+C

Interrupts a running operation. With nothing running, the first press clears input and the second exits.

Ctrl+D

Exits the session. Press twice in quick succession when the prompt is empty.

Esc Esc

With an empty prompt, opens the rewind menu to restore code and conversation from an earlier point.

On a permission prompt, Esc declines the action. In auto mode, a background classifier reviews actions before they run; if your policy disables auto mode, every risky action comes back to the user as a prompt.

Claude Code behind a firewall or secure web gateway

Admins searching why a gateway "blocks Claude Code" usually have one of two situations. Both are easy to tell apart.

You want it to work

  • Claude Code trusts the operating system certificate store by default, so install your inspection root certificate there
  • NODE_EXTRA_CA_CERTS can point to an extra certificate file
  • HTTPS_PROXY sets the proxy; SOCKS proxies are not supported
  • Allow the hosts in Anthropic's network requirements list

You want it blocked

  • Add the AI agent domains from our list as a custom block list
  • Block installer and update traffic as well as the API
  • Cover the cloud provider routes on the device, not the network
  • Log blocked attempts to find who still tries
Step-by-step guides for adding our list to common platforms: Zscaler, firewalls in general.

A one-week rollout that developers accept

Blocking a tool developers like, without warning, creates workarounds. A short, visible plan gets the same result with fewer tickets.

Day 1Inventory

Collect the signs listed above and name the teams that use Claude Code today, and for what kind of work.

Day 2Decide

Choose Path A or Path B with security and engineering leads. Write the decision in one paragraph that you can send to every developer.

Day 3Pilot

Apply the policy to a small group of volunteer machines. Check /status, claude doctor and your endpoint logs.

Day 4Announce

Tell developers what changes, why, which tool is approved and how to ask for an exception. Link your AI agent use policy.

Day 5Enforce

Roll out to all machines and import our daily list so the next coding agent is blocked before anyone installs it.

How the AI Agent Blocklist covers Claude Code and its peers

Claude Code is one of many coding agents. Blocking it alone moves developers to the next one. Our files cover the whole category, so one policy handles them all.

Packages

  • npm and PyPI package names of coding agents
  • Homebrew and WinGet IDs
  • For registry and endpoint rules

Processes and apps

  • Process names on Windows, macOS and Linux
  • macOS bundle IDs and Windows package IDs
  • VS Code and JetBrains extension IDs

Domains

  • Coding agent and MCP domains
  • Firewall, DNS and PAC formats
  • Risk grade on every row
The same list covers Codex CLI, Cursor and command-line agents such as @google/gemini-cli and goose. For GitHub's assistant see disable GitHub Copilot.

One subscription for every coding agent

The AI Agent Blocklist holds 5,300+ agent identifiers on devices and 2,600+ AI agent domains, updated every day.

From $99 a month for one organisation. We set up download access within one business day of your order.

See plans Ask a question
  • Package names, process names, bundle and package IDs for Intune and Jamf
  • VS Code and JetBrains extension IDs of coding agents
  • Domain list, hosts file, PAC file and firewall list format
  • CSV and JSON with tool name, category and risk grade

Ask us or order a plan

Tell us what you need to block and where your rules live. We reply within one business day.

  • Files for firewalls, DNS filters, secure web gateways, MDM and browser policies
  • Updated every day as new AI browsers, agents and extensions appear
  • Plans for one organisation, for MSPs and for product makers, or a hosted filter we run for you

We use your details only to answer you. No newsletters.

Questions about blocking Claude Code

How do I block Claude Code on company computers?
Use three layers. Block installation and execution on devices by package name, app ID and process name; block the editor extensions with your IDE policies; and block the Anthropic hosts Claude Code needs on your firewall or DNS filter, if you do not use Claude elsewhere. Where Claude is approved, restrict sign-in to your organisation instead.
How do I disable Claude Code for my organisation without blocking Claude?
Deploy managed settings to every machine. Set forceLoginMethod and forceLoginOrgUUID so only your organisation's accounts work, lock permissions with allowManagedPermissionRulesOnly, and deny the tools you do not want. In Claude for Teams and Enterprise, Owners also manage Claude Code features from the admin console.
Where does the Claude Code managed settings file go?
On macOS it is /Library/Application Support/ClaudeCode/managed-settings.json, on Linux and WSL /etc/claude-code/managed-settings.json, and on Windows C:\Program Files\ClaudeCode\managed-settings.json. MDM can also deliver it through the com.anthropic.claudecode preferences domain on macOS or a Settings value under HKLM\SOFTWARE\Policies\ClaudeCode on Windows.
How do I disable MCP in Claude Code?
Deploy a managed-mcp.json file containing an empty mcpServers object in the managed settings folder. Claude Code then loads no user-added MCP servers and claude mcp add fails with an enterprise policy error. A deny rule for mcp__* removes all MCP tools as a second layer.
How do I stop Claude Code in the terminal?
Press Esc to interrupt the current response or tool call. Ctrl+C also interrupts a running operation; when nothing is running, the first press clears the input and a second press exits. Ctrl+D pressed twice quickly also exits the session.
Can developers bypass managed settings?
Not from their own settings files or command line options. A developer with local administrator rights can edit the managed file itself, which is why MDM should redeploy it on a schedule. Managed settings also bind only Claude Code, not other tools that call the API.
Why does Claude Code fail behind our secure web gateway?
If the gateway inspects TLS, Claude Code must trust its root certificate. Claude Code reads the operating system trust store by default, and NODE_EXTRA_CA_CERTS can point to an extra certificate. If the gateway blocks the hosts on purpose, the failure is the policy working.

Using the Claude browser extension too? See how to block Claude in Chrome.

Anthropic, Claude, Claude Code and Claude in Chrome are trademarks of Anthropic, PBC. Codex is a trademark of OpenAI. Cursor is a trademark of Anysphere, Inc. GitHub and GitHub Copilot are trademarks of GitHub, Inc.

VS Code, Intune, Windows and Microsoft Foundry are trademarks of Microsoft Corporation. JetBrains is a trademark of JetBrains s.r.o. Amazon Bedrock is a trademark of Amazon.com, Inc. Google Cloud and Gemini are trademarks of Google LLC.

Zscaler is a trademark of Zscaler, Inc. Jamf is a trademark of Jamf. macOS is a trademark of Apple Inc. WinGet and AppLocker are trademarks of Microsoft Corporation.

Linux is a registered trademark of Linus Torvalds. npm is a trademark of npm, Inc. PyPI is a trademark of the Python Software Foundation. Homebrew and goose are trademarks of their respective owners.

Names are used only to identify the products discussed. AI Agent Blocklist is not affiliated with, sponsored or endorsed by these companies.