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.
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.
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.
| Surface | How it arrives | Identifier to block |
|---|---|---|
| Command-line tool, native install | Anthropic's install script for macOS, Linux and Windows; the launcher sits in the user's home folder under .local/bin | Process name claude |
| npm package | Global npm install, needs Node.js | @anthropic-ai/claude-code |
| Homebrew on macOS | Cask install | claude-code |
| WinGet on Windows | Package install | Anthropic.ClaudeCode |
| VS Code | Marketplace extension | anthropic.claude-code |
| JetBrains IDEs | Marketplace plugin | com.anthropic.code.plugin |
| Linux package managers | apt, dnf and apk repositories published by Anthropic | Package 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.
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
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.
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.
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.
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.
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.
| Delivery | Where it lives | When it applies |
|---|---|---|
| File on macOS | /Library/Application Support/ClaudeCode/managed-settings.json | Read at start, rechecked while running |
| File on Linux and WSL | /etc/claude-code/managed-settings.json | Read at start, rechecked while running |
| File on Windows | C:\Program Files\ClaudeCode\managed-settings.json | The older ProgramData path is no longer read |
| macOS MDM profile | Preferences domain com.anthropic.claudecode | Checked for changes every 30 minutes |
| Windows registry | REG_SZ value Settings under HKLM\SOFTWARE\Policies\ClaudeCode | Checked for changes every 30 minutes |
| Server-managed | Organization settings > Claude Code > Managed settings in the claude.ai admin console (Teams and Enterprise, Owner role) | Fetched at start and hourly |
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
How to confirm it worked
Limits you should know
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
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.
Interrupts the current response or tool call. Work done so far is kept, and you can redirect.
Interrupts a running operation. With nothing running, the first press clears input and the second exits.
Exits the session. Press twice in quick succession when the prompt is empty.
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
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.
Collect the signs listed above and name the teams that use Claude Code today, and for what kind of work.
Choose Path A or Path B with security and engineering leads. Write the decision in one paragraph that you can send to every developer.
Apply the policy to a small group of volunteer machines. Check /status, claude doctor and your endpoint logs.
Tell developers what changes, why, which tool is approved and how to ask for an exception. Link your AI agent use policy.
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
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
Questions about blocking Claude Code
How do I block Claude Code on company computers?
How do I disable Claude Code for my organisation without blocking Claude?
Where does the Claude Code managed settings file go?
How do I disable MCP in Claude Code?
How do I stop Claude Code in the terminal?
Can developers bypass managed settings?
Why does Claude Code fail behind our secure web gateway?
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.