Find AI Tools on Macs with a Jamf Pro Extension Attribute
To find AI tools installed on Macs managed by Jamf Pro, add one script extension attribute that checks every home folder for Claude Code, Codex, Cursor, ChatGPT, Ollama, AI editor extensions and MCP configs. Each Mac then carries a value like Claude Code; Cursor; MCP configs (2) in its inventory, and Smart Groups turn that into lists you can act on.
Short version. Settings › Computer management › Extension attributes › New. Data type String, input type Script, paste kuntur-ai-inventory-jamf.sh, save. Run sudo jamf recon on a test Mac to see the value at once, then build a Smart Computer Group where the attribute is not None.
Why Jamf's application inventory misses most AI tools
Jamf Pro's application inventory lists .app bundles. That catches Cursor or the ChatGPT app when they sit in /Applications, and little else that matters for AI use on a Mac:
- Coding CLIs such as Claude Code, Codex CLI and Gemini CLI install into the user's home folder, through Homebrew or through npm. There is no bundle to inventory.
- Local models pulled with Ollama or LM Studio are plain files under
~/.ollamaor~/.lmstudio. - Editor extensions such as GitHub Copilot, Cline or Continue are folders inside
~/.vscode/extensionsor~/.cursor/extensions. - MCP servers are entries in a JSON file, often with access to the file system or internal APIs.
Searching Jamf for an application named "Claude" finds the desktop app at best. A script extension attribute is how Jamf collects anything that is not an app bundle.
How Jamf runs a script extension attribute
Four documented behaviours decide how the script is written:
- It runs at every inventory update. Each time a Mac submits inventory (a
jamf recon, usually from an Update Inventory policy), Jamf runs every script extension attribute and stores the new value. There is no separate schedule. - Only the text inside
<result>tags is stored. Anything else the script prints is discarded, so the whole inventory has to fit in one tagged line. - It runs as root, outside any user session.
$HOMEis not the user's home, so the script walks every folder under/Usersitself and skipsShared,Guestand hidden folders. - A slow script slows every recon. Jamf waits for each attribute in turn. This one only tests whether paths exist, so it typically finishes in well under a second.
The script
Plain bash for the /bin/bash 3.2 that ships with macOS. It checks whether known paths exist and counts files; it never opens one, makes no network calls and so cannot leak prompts or API keys. The detection list is the shared one described in the endpoint discovery guide: AI desktop apps in /Applications and ~/Applications, Claude Code, Codex CLI and Gemini CLI (native, Homebrew and npm), Ollama models and LM Studio, ten AI extensions in VS Code and Cursor, and the MCP config files of Claude Desktop, Cursor, Claude Code, VS Code and Windsurf, counted but never read.
Open kuntur-ai-inventory-jamf.sh to copy it, or download it. SHA-256 of the published file:
faa1bd063cc1e84c5dce7b6bd337234fb9fc13cdcfa627f1c305ab4c96108510
shasum -a 256 kuntur-ai-inventory-jamf.sh
The Jamf-specific part is the last block, which turns everything found into the single value Jamf stores:
if [ -z "$found" ]; then
echo "<result>None</result>"
else
echo "<result>$(printf '%s' "$found" | tr '|' '\n' | sort | paste -sd ';' - | sed 's/;/; /g')</result>"
fi
The names are sorted, so the same set of tools always produces the same string, and a Smart Group or a CSV diff does not change just because the order did. A Mac with findings stores something like Claude Code; Cursor; GitHub Copilot extension; MCP configs (2); Ollama (3 models). A clean Mac stores None.
Test it on one Mac before it goes into Jamf: sudo bash kuntur-ai-inventory-jamf.sh. With sudo it can look into every home folder, the way it will under Jamf.
Add it to Jamf Pro
- Go to Settings › Computer management › Extension attributes (older versions call the section Computer Management – Management Framework) and click New.
- Name it AI tools (Kuntur). Smart Group criteria refer to it by this name, so pick it once and keep it.
- Set Data type to String. Integer or Date would reject the value.
- Under Inventory display, choose where it shows on the computer record, for example Extension Attributes.
- Set Input type to Script and paste the script.
- Save. On a test Mac, run
sudo jamf reconand open its inventory record to check the value.
How fresh the value is
The attribute is exactly as recent as each Mac's last inventory submission, so the frequency of your Update Inventory policy is the frequency of this inventory:
| Update Inventory policy frequency | What it means for AI tool data |
|---|---|
| Once every week | A tool installed on Monday may not show until next week. Fine for a quarterly access review, slow for anything else. |
| Once every day | A good default: one fresh value per Mac per day, at a cost of one recon per day. |
| Ongoing at recurring check-in | Near real-time, but every check-in runs every extension attribute. Avoid on large fleets. |
If you need fresher data on a few Macs only, scope a second, more frequent Update Inventory policy to a Smart Group of developer machines instead of changing it for everyone.
Smart Groups and searches
Because the value is one string, it works with the like and not like operators in Smart Computer Groups and Advanced Computer Searches:
| Smart Group | Criteria |
|---|---|
| Macs with any AI tool | AI tools (Kuntur) is not None |
| Coding agents installed | AI tools (Kuntur) like Claude Code, or like Codex CLI, or like Gemini CLI |
| Local models on disk | AI tools (Kuntur) like Ollama, or like LM Studio |
| MCP servers configured | AI tools (Kuntur) like MCP configs |
| No value yet | AI tools (Kuntur) is (blank): Macs that have not submitted inventory since you added the attribute |
One catch with like: it matches substrings, so like Claude Code also matches Claude Code extension. If you need the CLI only, add not like Claude Code extension and accept that a Mac with both will drop out, or use the advanced search below.
For a report, create an Advanced Computer Search with AI tools (Kuntur) is not None, add the attribute, computer name and last inventory update under Display, and export it as CSV. Save the search and export it on the same day each month if you need a history, since Jamf keeps only the current value on the record.
Use the groups to scope a Self Service item with your AI use policy, to send a notification, or as the scope for the restriction guides for Claude Code, Cursor and ChatGPT Desktop once you have decided what to restrict.
Where the Jamf approach stops
The gaps every fixed-path script shares (browser-only use, containers and VMs, unknown tools, install versus actual use) are listed once in the endpoint discovery guide. Jamf adds its own:
- Per Mac, not per user. The value says Claude Code is on this Mac, not in whose home folder. On a shared Mac, check by hand.
- Current value only. The computer record keeps the latest string; there is no first-seen or last-seen date unless you export and keep CSVs.
- Macs only. Jamf Pro does not cover your Windows laptops. For those, see the Intune guide.
- Leftovers count. An old
~/.claudefolder reports Claude Code even if the binary is gone.
Roll out the Kuntur agent with Jamf instead
The attribute costs nothing and is a good first look. When you need the user behind each tool, first and last seen dates, Windows and Linux machines, or detections inside containers and VMs, the Kuntur agent reports the same inventory continuously to one console and lets you mark each tool approved or unauthorized for the organization. In Jamf it takes a configuration profile plus a policy with the one-line install script; the steps are in the deploy guide. Kuntur detects and reports; it never blocks or uninstalls anything.
To try it on one Mac first, run the free scanner. It needs no account, uploads nothing, writes an HTML report of the same tools and ends with a link to the trial. Prefer to read it first? Download scan.sh, check it against the published hash and see what it does.
curl -fsSL https://app.kuntur.io/scan.sh | shFree for up to 5 endpoints. Pro is US$3 per endpoint per month (or US$30 per endpoint per year) for 10 to 30 endpoints. The trial needs no credit card.
FAQ
- How do I find AI tools installed on Macs managed by Jamf?
- Jamf's application inventory only lists app bundles, so add a script extension attribute that checks home folders, Homebrew, npm and config files. The value appears on each computer record after its next inventory update and can drive Smart Groups and CSV exports.
- Does the extension attribute slow down inventory updates?
- It checks whether a few dozen paths exist and counts files in one folder per user, so it typically finishes in well under a second. Jamf runs every script extension attribute at every inventory submission, so keep it free of network calls.
- Does it read prompts, chat history or API keys?
- No. It only tests whether files and folders exist and counts Ollama model manifests and MCP config files. It never opens a file.
- Why does a Mac show Claude Code when nobody uses it any more?
- The script reports what is on disk, including an old
~/.claudefolder. It cannot tell an active tool from a forgotten one; check modification times on the Mac, or use a tool that tracks first and last seen dates. - Can I use the result to block these tools?
- The attribute only reports. You can scope a policy or configuration profile to a Smart Group built on it, but blocking is up to your own policies, EDR or application control.
Sources
- Jamf Pro documentation: Computer extension attributes
- Jamf Pro API reference: computer extension attributes (data types, input types, script contents)
- Jamf blog: Unlocking the power of extension attributes
- JNUC 2025: Extension attribute performance audit (Dan K. Snelson)
More Jamf guides: