How to Detect and Restrict Claude Code with Jamf Pro
First find every Mac where Claude Code is installed, then use Jamf Pro to stop it where it is not approved. Kuntur does the finding; the restriction is done in Jamf Pro. This page covers macOS; for Windows see the Intune version.
Short answer. Jamf Pro can stop or limit Claude Code in two ways, and neither one finds the installs for you:
- Restricted Software (Computers > Restricted Software) kills a process by its name. It fits the native install if the process name is stable on your test Mac. It cannot target npm installs, which run as
node. - A policy that writes
managed-settings.jsonto/Library/Application Support/ClaudeCode/does not stop Claude Code; it sets rules users cannot override, such as no bypass-permissions mode, no reading.envor SSH keys, and an MCP allowlist. It applies whichever way Claude Code was installed on the Mac.
Scope either one to a Smart Group built from the free extension attribute, so it only reaches Macs that have Claude Code.
Step 1: find where Claude Code is installed
Restrict only what you can see. Before writing a rule, find out which machines have Claude Code, for which users, and how it was installed: the install method decides what a rule has to match. Two free ways:
- Across the fleet: the Jamf Pro extension attribute already includes Claude Code. It is read-only and reports per device. On Iru (formerly Kandji) or Mosyle, the Iru audit script and the Mosyle command attribute do the same.
- Scope for the rule: once Macs submit inventory, a Smart Computer Group with
AI tools (Kuntur)likeClaude Codelists them. Like matches substrings, so it also catchesClaude Code extension(the VS Code extension); addnot like Claude Code extensionif you only want the CLI. The Smart Group table has the other criteria. - On one machine: the free Kuntur scanner lists Claude Code with every other AI tool, extension and MCP server it finds. Details per OS are in How to detect Claude Code.
- Download scan.sh.
- Read it. It's plain text; here's what it does.
- Check its SHA-256 against the published hash:
shasum -a 256 scan.sh - Run it:
sh scan.sh
macOS and Linux shortcut, if you trust the source (Terminal)
curl -fsSL https://app.kuntur.io/scan.sh | shIt needs no account and no admin rights, and uploads nothing.
Step 2: see what a rule has to match
Restricted Software matches the executable name, and Claude Code is awkward for that: the native installer keeps each version as its own file under ~/.local/share/claude/versions/ with ~/.local/bin/claude as a link, an npm install runs under node, and the Claude desktop app has a process called Claude. Run the script on a test Mac while Claude Code is open and use the names it prints.
macOS (Terminal), read-only
# Read-only. Run on a test Mac while Claude Code is running: the executable
# names that a Restricted Software record would have to match.
ls -l ~/.local/bin/claude 2>/dev/null # native install: a link into a versions folder
ls ~/.local/share/claude/versions 2>/dev/null
ps -axo comm= | grep -i -e claude -e node | sort -u
Step 3: restrict Claude Code with Jamf Pro
Jamf Pro's Restricted Software stops an app by its process name. According to Jamf's documentation:
- Create one record per app in Computers > Restricted Software > New, with a display name and the exact process name (the name of the executable file).
- Actions include killing the process, deleting the application and showing a message to the user; email notifications for violations are optional.
- The record applies only to computers in its scope, from their next check-in (
sudo jamf manageapplies it immediately on a test Mac).
A record for Claude Code, filled in from what Step 2 printed:
| Field | Value |
|---|---|
| Display name | Claude Code |
| Process name | The exact executable name from ps on your test Mac |
| Kill process | On |
| Delete application | Off at first; the CLI is a file in the user's home folder, and deleting it is undone by the next install |
| Message to user | Why it closed and where to ask for approval |
| Scope | The Smart Group from Step 1, with approved users or a pilot group excluded |
If the process name on your test Mac is stable, a record with that exact name and the kill action works; turn on the user message so people know why it closed. Check that the record does not also hit the Claude desktop app if that one is approved. Because version file names can change on update, re-test after Claude Code updates, or use managed settings instead.
If the process name changes on every update, or your developers install with npm, use managed settings (next step) instead of, or next to, the record.
Step 3b: push managed settings with a Jamf policy
When Claude Code is allowed but with limits, deploy a managed-settings.json. On macOS it lives in /Library/Application Support/ClaudeCode/, and its values override user, project and command-line settings. In Jamf Pro:
- Go to Settings > Computer management > Scripts and add the script below. Edit the JSON first.
- Create a policy under Computers > Policies with the script as a payload, trigger Recurring Check-in, and frequency Once every day, so a local administrator who edits the file gets it back.
- Scope it to the Smart Group from Step 1, or to all Macs if you want the rules in place before anyone installs Claude Code.
Jamf Pro policy script (runs as root)
#!/bin/sh
# Writes Claude Code managed settings. Users cannot override these values.
dir="/Library/Application Support/ClaudeCode"
mkdir -p "$dir"
cat > "$dir/managed-settings.json" <<'JSON'
{
"permissions": {
"disableBypassPermissionsMode": "disable",
"deny": [
"Read(./.env)",
"Read(./.env.*)",
"Read(~/.aws/**)",
"Read(~/.ssh/**)"
]
},
"allowManagedMcpServersOnly": true,
"allowedMcpServers": [
{ "serverName": "github" }
]
}
JSON
chmod 644 "$dir/managed-settings.json"
Check the entry format of each key against the Claude Code settings reference for your version before rolling out. A fuller starting policy, and what each key does, is in Cursor and Claude Code in your company; the policy text to go with it is in the AI coding agent policy template.
Step 4: check that it worked
- Restricted Software: on the test Mac run
sudo jamf manage, start Claude Code and confirm it closes with your message. If you turned on email notifications, the violation email arrives too. - Managed settings: run
/statusinside Claude Code. TheSetting sourcesline should listEnterprise managed settings.claude doctorlists entries it rejected. - Coverage: a week later, compare the Smart Group with the Macs where the rule fired. Macs still in the group with no violations are usually npm installs, renamed binaries or Claude Code inside a container or VM.
What the rule will not catch
- npm installs run under
node; restrictingnodebreaks every JavaScript developer. - Renamed or versioned executables are not matched by an exact-name record.
- Containers and VMs on the Mac run their own processes.
- The VS Code extension runs inside the editor's processes.
- API keys already on disk. Blocking the CLI does not remove an
ANTHROPIC_API_KEYexported in a shell profile or.envfile, and that key works from any other machine. Find exposed AI API keys on every laptop with a Jamf extension attribute that reports file and key type, never the value, then rotate what it finds.
Where Kuntur fits
Kuntur finds where Claude Code is installed, for every user profile, and lets you mark it approved or unauthorized with an audit trail. It does not block, restrict or uninstall anything: the restriction on this page is done by your MDM. Use the inventory before the rule (who will it affect?) and after it (are there installs the rule does not match, such as another install method or a VM?). Each computer shows up in the console with its users, Claude Code version and how it was installed. If an auditor asks how you control AI coding tools, the console exports an audit evidence pack for a period: AI tools per endpoint and user, approval decisions with who and when, a printable summary and SHA-256 checksums. It can support evidence for SOC 2, ISO 27001 or ISO 42001 controls; it does not make you compliant.

Kuntur detects and reports; it does not block, restrict or uninstall anything. Free for up to 5 endpoints; Pro is US$3 per endpoint per month.
FAQ
- Can Jamf Pro block Claude Code?
- Jamf Pro's Restricted Software can kill a process by its exact name and optionally delete the application. How well that works for Claude Code depends on its process names, covered on this page.
- How do I see which Macs have Claude Code in Jamf Pro?
- Jamf's application inventory lists .app bundles, so it misses the CLI. Add the free read-only extension attribute, wait for inventory, and build a Smart Computer Group with AI tools (Kuntur) like Claude Code.
- How do I deploy Claude Code managed settings with Jamf Pro?
- Add a script that writes managed-settings.json to /Library/Application Support/ClaudeCode/, run it from a policy on Recurring Check-in once every day, and scope it to your Macs. Check with /status inside Claude Code.
- Will a Restricted Software record for Claude Code also close the Claude desktop app?
- Only if the process names match. The desktop app runs as Claude; check with ps on a test Mac and keep the CLI's process name in the record, not Claude, if the desktop app is approved.
- Does Kuntur block Claude Code?
- No. Kuntur finds where Claude Code is installed and records whether you approved it. The restriction is a Jamf Pro Restricted Software record or another MDM control.
- Is Restricted Software reliable for command-line tools?
- Jamf's documentation describes matching the exact process name; it does not cover command-line tools that change file names on update or run under an interpreter. Test on a pilot Mac and keep an inventory to catch what the rule misses.
Sources
- Jamf support: Restricted Software in Jamf Pro
- Jamf Pro documentation: Creating a Restricted Software record
- Claude Code docs: Deploy managed settings
- Claude Code docs: Settings reference
More guides and tools: