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.

By Kuntur team · Published · Updated

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.json to /Library/Application Support/ClaudeCode/ does not stop Claude Code; it sets rules users cannot override, such as no bypass-permissions mode, no reading .env or 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:

  1. Download scan.sh.
  2. Read it. It's plain text; here's what it does.
  3. Check its SHA-256 against the published hash: shasum -a 256 scan.sh
  4. Run it: sh scan.sh

macOS and Linux shortcut, if you trust the source (Terminal)

curl -fsSL https://app.kuntur.io/scan.sh | sh

It 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:

A record for Claude Code, filled in from what Step 2 printed:

FieldValue
Display nameClaude Code
Process nameThe exact executable name from ps on your test Mac
Kill processOn
Delete applicationOff at first; the CLI is a file in the user's home folder, and deleting it is undone by the next install
Message to userWhy it closed and where to ask for approval
ScopeThe 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:

  1. Go to Settings > Computer management > Scripts and add the script below. Edit the JSON first.
  2. 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.
  3. 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

What the rule will not catch

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 console: Claude Code detail with Approve and Mark unauthorized buttons, the computers and users that have it, its version and a high finding
What you get in Kuntur: every computer and user with Claude Code (including WSL), its version, related findings, and one click to approve it or mark it unauthorized. Example data.

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

  1. Jamf support: Restricted Software in Jamf Pro
  2. Jamf Pro documentation: Creating a Restricted Software record
  3. Claude Code docs: Deploy managed settings
  4. Claude Code docs: Settings reference

More guides and tools: