How to Inventory AI Tools on Mac, Windows and Linux with JumpCloud
If your laptops are managed with JumpCloud, you can get a first AI inventory today with a JumpCloud Command, no new software. This guide gives you two read-only scripts (one for Mac and Linux, one for Windows), shows how to create and run the Commands, and where to read the results.
Why your device inventory misses these tools
Most AI coding tools install per user, without admin rights. Claude Code's native installer puts a binary in the user's home folder, Codex CLI and Gemini CLI usually arrive through npm, and Cursor or Windsurf can live inside a user profile instead of a system folder. None of that has to show up in the installed software list, so a device can look clean while several AI agents run on it.
JumpCloud Commands run a script on any number of Mac, Windows and Linux devices and keep the output with each result, which is enough to look where these tools actually live.
What the scripts check
On every home folder (/Users on macOS, /home on Linux, C:\Users on Windows) they look for:
| Category | Tools |
|---|---|
| AI coding CLIs | Claude Code, Codex CLI, Gemini CLI (native installs, npm, Homebrew and their data folders) |
| AI IDEs and desktop apps | Cursor, Windsurf, Claude desktop, ChatGPT desktop, Codex and Gemini desktop apps |
| Local models | Ollama (and its model folder), LM Studio |
| Editor extensions | GitHub Copilot, Claude Code, Codex, Cline, Roo Code, Kilo Code, Continue, Codeium, Gemini Code Assist, Amazon Q, Tabnine |
| MCP servers | Config files for Claude desktop, Claude Code, Cursor, VS Code and Windsurf |
Both scripts are read-only: they test whether files and folders exist and never print file contents, so API keys stored in MCP configs stay out of the output. They make no network calls. The Mac and Linux script prints one line per finding, for example:
Kuntur AI inventory (read-only) on mbp-ana, 2026-11-09 18:29 UTC
[machine] AI app: Cursor - /Applications/Cursor.app (review)
[ana] CLI agent: Claude Code - ~/.local/bin/claude (review)
[ana] IDE extension: GitHub Copilot - ~/.vscode/extensions/github.copilot-1.311.0 (approved)
[ana] MCP config: Cursor MCP servers - ~/.cursor/mcp.json (review)
Summary: 4 AI tool(s) found, 3 not on the allowlist.
Tools you already approve can go in the ALLOW variable at the top of the script, separated by |, so they show as approved instead of review.
Create the Mac and Linux Command
- In the JumpCloud Admin Portal, go to Device Management → Commands and create a new command.
- Name it, for example AI tools inventory (read-only). For Type, choose Mac (create a second, identical command with type Linux if you also manage Linux devices).
- Set Run As to root. A normal user can only read their own home folder.
- Paste the Mac and Linux script from below, or from the plain-text file, into Command.
- Leave Event as Run Manually for the first test, or pick a schedule to repeat it. Bind it to a device or a device group and click Save.
- Click Run Now. On macOS, if a result shows Operation not permitted, the JumpCloud agent needs Full Disk Access.
Create the Windows Command
- Create another command with Type set to Windows and check Windows PowerShell.
- Paste the Windows script, or the plain-text file. JumpCloud runs Windows commands as LocalSystem, so it can read every profile.
- Bind it to your Windows devices or group, save it and click Run Now.
Read the results
Go to Device Management → Commands → Results and click View on a result to see the script output for that device. JumpCloud keeps command results for 30 days. Both scripts exit 0, so a device with AI tools still shows as a successful run; the findings are in the output, not in the exit code. Start with MCP servers and AI coding CLIs: they read code and run commands with the user's permissions.
The scripts
Download kuntur-ai-inventory-jumpcloud.sh (macOS bash 3.2 and Linux bash).
SHA-256: 7afbcc505d7d23a29a9ae8c1ca2622778182653d5ec496f2883567947a548f06
#!/bin/bash
# Kuntur AI inventory: JumpCloud Command for Mac and Linux.
# https://kuntur.io/guides/jumpcloud-detect-ai-tools
#
# Read-only. Makes no network calls, changes nothing and never prints the
# contents of any file. It only checks whether known paths exist.
# Set "Run As" to root in the JumpCloud Command so it can walk every home
# folder (/Users on macOS, /home on Linux).
#
# Always exits 0 so JumpCloud shows the run as successful; read the result
# in Device Management > Commands > Results > View.
# Lines marked (review) are tools that are not on the allowlist.
#
# Allowlist: tool names exactly as printed below, separated by "|".
# Example: ALLOW="GitHub Copilot|Claude Desktop"
ALLOW="${ALLOW-}"
# Only change these to test the script on a fake directory tree.
if [ "$(uname -s)" = "Darwin" ]; then
USERS_ROOT="${USERS_ROOT:-/Users}"
BIN_DIRS="${BIN_DIRS:-/usr/local/bin /opt/homebrew/bin}"
NPM_DIRS="${NPM_DIRS:-/usr/local/lib/node_modules /opt/homebrew/lib/node_modules}"
else
USERS_ROOT="${USERS_ROOT:-/home}"
BIN_DIRS="${BIN_DIRS:-/usr/local/bin /usr/bin /snap/bin}"
NPM_DIRS="${NPM_DIRS:-/usr/local/lib/node_modules /usr/lib/node_modules}"
fi
APPS_DIR="${APPS_DIR:-/Applications}"
HT="~" # shown instead of the full home path
FOUND=0
REVIEW=0
SEEN="
"
is_allowed() {
local name="$1" item
local IFS='|'
for item in $ALLOW; do
[ "$item" = "$name" ] && return 0
done
return 1
}
# report SCOPE KIND NAME WHERE
report() {
local scope="$1" kind="$2" name="$3" where="$4" status key
key="$scope|$name"
case "$SEEN" in
*"
$key
"*) return 0 ;;
esac
SEEN="$SEEN$key
"
FOUND=$((FOUND + 1))
if is_allowed "$name"; then
status="approved"
else
status="review"
REVIEW=$((REVIEW + 1))
fi
printf '[%s] %s: %s - %s (%s)\n' "$scope" "$kind" "$name" "$where" "$status"
}
# First existing match of a glob pattern, or nothing.
first_match() {
local p
for p in "$@"; do
[ -e "$p" ] && { printf '%s' "$p"; return 0; }
done
return 1
}
check_app() { # SCOPE DIR APPNAME DISPLAYNAME
[ -d "$2/$3.app" ] && report "$1" "AI app" "$4" "$2/$3.app"
}
check_apps() { # SCOPE DIR
check_app "$1" "$2" "Claude" "Claude Desktop"
check_app "$1" "$2" "ChatGPT" "ChatGPT Desktop"
check_app "$1" "$2" "ChatGPT Atlas" "ChatGPT Atlas"
check_app "$1" "$2" "Codex" "Codex Desktop"
check_app "$1" "$2" "Gemini" "Gemini Desktop"
check_app "$1" "$2" "Cursor" "Cursor"
check_app "$1" "$2" "Windsurf" "Windsurf"
check_app "$1" "$2" "Ollama" "Ollama"
check_app "$1" "$2" "LM Studio" "LM Studio"
}
check_npm() { # SCOPE NODE_MODULES_DIR SHOWN_PREFIX
[ -d "$2/@anthropic-ai/claude-code" ] && report "$1" "CLI agent" "Claude Code" "$3/@anthropic-ai/claude-code (npm)"
[ -d "$2/@openai/codex" ] && report "$1" "CLI agent" "Codex CLI" "$3/@openai/codex (npm)"
[ -d "$2/@google/gemini-cli" ] && report "$1" "CLI agent" "Gemini CLI" "$3/@google/gemini-cli (npm)"
return 0
}
check_ext() { # SCOPE EXT_DIR SHOWN_DIR ID DISPLAYNAME
local hit
hit=$(first_match "$2/$4"-[0-9]*) && report "$1" "IDE extension" "$5" "$3/${hit##*/}"
return 0
}
check_extensions() { # SCOPE EXT_DIR SHOWN_DIR
[ -d "$2" ] || return 0
check_ext "$1" "$2" "$3" "github.copilot" "GitHub Copilot"
check_ext "$1" "$2" "$3" "github.copilot-chat" "GitHub Copilot Chat"
check_ext "$1" "$2" "$3" "anthropic.claude-code" "Claude Code for VS Code"
check_ext "$1" "$2" "$3" "openai.chatgpt" "Codex for VS Code"
check_ext "$1" "$2" "$3" "saoudrizwan.claude-dev" "Cline"
check_ext "$1" "$2" "$3" "rooveterinaryinc.roo-cline" "Roo Code"
check_ext "$1" "$2" "$3" "kilocode.kilo-code" "Kilo Code"
check_ext "$1" "$2" "$3" "continue.continue" "Continue"
check_ext "$1" "$2" "$3" "codeium.codeium" "Windsurf Plugin (Codeium)"
check_ext "$1" "$2" "$3" "google.geminicodeassist" "Gemini Code Assist"
check_ext "$1" "$2" "$3" "amazonwebservices.amazon-q-vscode" "Amazon Q"
check_ext "$1" "$2" "$3" "tabnine.tabnine-vscode" "Tabnine"
}
check_mcp() { # SCOPE HOME FILE_RELATIVE_TO_HOME LABEL
[ -f "$2/$3" ] && report "$1" "MCP config" "$4" "$HT/$3"
return 0
}
check_user() { # USERNAME HOME
local u="$1" h="$2" hit
if hit=$(first_match "$h/.local/bin/claude" "$h/.claude/local/claude" "$h/.local/share/claude/versions"); then
report "$u" "CLI agent" "Claude Code" "$HT${hit#"$h"}"
elif [ -d "$h/.claude" ]; then
report "$u" "CLI agent" "Claude Code" "$HT/.claude (data folder)"
fi
[ -d "$h/.codex" ] && report "$u" "CLI agent" "Codex CLI" "$HT/.codex"
[ -d "$h/.gemini" ] && report "$u" "CLI agent" "Gemini CLI" "$HT/.gemini"
check_npm "$u" "$h/.npm-global/lib/node_modules" "$HT/.npm-global/lib/node_modules"
local nvm
for nvm in "$h"/.nvm/versions/node/*/lib/node_modules; do
[ -d "$nvm" ] && check_npm "$u" "$nvm" "$HT${nvm#"$h"}"
done
check_apps "$u" "$h/Applications"
if [ -d "$h/.ollama/models" ]; then
report "$u" "Local model" "Ollama models" "$HT/.ollama/models"
elif [ -d "$h/.ollama" ]; then
report "$u" "Local model" "Ollama" "$HT/.ollama"
fi
if hit=$(first_match "$h/.lmstudio" "$h/.cache/lm-studio"); then
report "$u" "Local model" "LM Studio" "$HT${hit#"$h"}"
fi
check_extensions "$u" "$h/.vscode/extensions" "$HT/.vscode/extensions"
check_extensions "$u" "$h/.cursor/extensions" "$HT/.cursor/extensions"
check_extensions "$u" "$h/.windsurf/extensions" "$HT/.windsurf/extensions"
check_mcp "$u" "$h" "Library/Application Support/Claude/claude_desktop_config.json" "Claude Desktop MCP servers"
check_mcp "$u" "$h" ".claude.json" "Claude Code MCP servers"
check_mcp "$u" "$h" ".cursor/mcp.json" "Cursor MCP servers"
check_mcp "$u" "$h" "Library/Application Support/Code/User/mcp.json" "VS Code MCP servers"
check_mcp "$u" "$h" ".codeium/windsurf/mcp_config.json" "Windsurf MCP servers"
check_mcp "$u" "$h" ".config/Code/User/mcp.json" "VS Code MCP servers"
check_mcp "$u" "$h" ".config/Claude/claude_desktop_config.json" "Claude Desktop MCP servers"
if hit=$(first_match "$h"/Applications/Cursor*.AppImage "$h"/.local/share/cursor-ai "$h/.config/Cursor"); then
report "$u" "AI app" "Cursor" "$HT${hit#"$h"}"
fi
[ -d "$h/.config/Windsurf" ] && report "$u" "AI app" "Windsurf" "$HT/.config/Windsurf"
return 0
}
printf 'Kuntur AI inventory (read-only) on %s, %s\n' "$(hostname 2>/dev/null)" "$(date -u '+%Y-%m-%d %H:%M UTC')"
# Machine-wide installs.
check_apps "machine" "$APPS_DIR"
for d in $BIN_DIRS; do
[ -e "$d/claude" ] && report "machine" "CLI agent" "Claude Code" "$d/claude"
[ -e "$d/codex" ] && report "machine" "CLI agent" "Codex CLI" "$d/codex"
[ -e "$d/gemini" ] && report "machine" "CLI agent" "Gemini CLI" "$d/gemini"
[ -e "$d/ollama" ] && report "machine" "Local model" "Ollama" "$d/ollama"
done
for d in $NPM_DIRS; do
check_npm "machine" "$d" "$d"
done
# Linux system-wide app installs.
for d in /opt/cursor /opt/Cursor /usr/share/cursor; do
[ -d "$d" ] && report "machine" "AI app" "Cursor" "$d"
done
for d in /usr/share/windsurf /opt/windsurf; do
[ -d "$d" ] && report "machine" "AI app" "Windsurf" "$d"
done
# Every real user home (skips Shared, Guest and hidden folders).
for home in "$USERS_ROOT"/*/; do
home="${home%/}"
user="${home##*/}"
case "$user" in
Shared|Guest|lost+found|.*) continue ;;
esac
[ -d "$home" ] || continue
check_user "$user" "$home"
done
if [ "$FOUND" -eq 0 ]; then
echo "Summary: no AI tools found."
exit 0
fi
printf 'Summary: %d AI tool(s) found, %d not on the allowlist.\n' "$FOUND" "$REVIEW"
exit 0
Download kuntur-ai-inventory-jumpcloud.ps1 (Windows PowerShell 5.1 or later).
SHA-256: 863704abfe80b05588c7532d8404f3595706849f618340e6df0586a576bdc514
<#
.SYNOPSIS
Read-only inventory of AI tools on a Windows endpoint, for a JumpCloud Command.
.DESCRIPTION
Checks every user profile for AI coding CLIs, AI desktop apps and IDEs,
local model runners, AI editor extensions and MCP configuration files.
It only tests whether files and folders exist and counts MCP servers.
It never prints file contents, prompts, tokens or keys, and makes no
network calls.
JumpCloud runs Windows commands as LocalSystem, so it sees every profile.
Create the Command with Type Windows and "Windows PowerShell" checked.
The summary appears in Device Management > Commands > Results > View.
Always exits 0.
Source: https://kuntur.io/guides/jumpcloud-detect-ai-tools
Kuntur, November 2026. MIT licence.
#>
param(
# Folder that holds the user profiles.
[string]$ProfileRoot = $(if ($env:SystemDrive) { Join-Path $env:SystemDrive 'Users' } else { 'C:\Users' })
)
$ErrorActionPreference = 'SilentlyContinue'
$skip = @('Public', 'Default', 'Default User', 'All Users', 'defaultuser0', 'WDAGUtilityAccount')
function J { param([Parameter(ValueFromRemainingArguments = $true)][string[]]$Parts) [IO.Path]::Combine([string[]]$Parts) }
function Has { param([string]$Path) return (Test-Path -LiteralPath $Path) }
function HasLike {
param([string]$Parent, [string]$Filter)
if (-not (Has $Parent)) { return $false }
return [bool](Get-ChildItem -LiteralPath $Parent -Filter $Filter -Directory -Force -ErrorAction SilentlyContinue | Select-Object -First 1)
}
function McpCount {
# Counts servers in an MCP config without printing any of its values.
param([string]$Path)
if (-not (Has $Path)) { return -1 }
try {
$j = Get-Content -LiteralPath $Path -Raw -ErrorAction Stop | ConvertFrom-Json -ErrorAction Stop
$n = 0
foreach ($key in @('mcpServers', 'servers')) {
$node = $j.$key
if ($node) { $n += @($node.PSObject.Properties).Count }
}
return $n
} catch { return 0 }
}
$aiExtensions = @(
'github.copilot', 'github.copilot-chat', 'anthropic.claude-code', 'openai.chatgpt',
'continue.continue', 'saoudrizwan.claude-dev', 'rooveterinaryinc.roo-cline',
'codeium.codeium', 'tabnine.tabnine-vscode', 'amazonwebservices.amazon-q-vscode',
'google.geminicodeassist', 'sourcegraph.cody-ai'
)
$lines = New-Object System.Collections.Generic.List[string]
$profilesSeen = 0
$toolCount = 0
$profiles = Get-ChildItem -LiteralPath $ProfileRoot -Directory -Force -ErrorAction SilentlyContinue |
Where-Object { $skip -notcontains $_.Name -and -not $_.Name.StartsWith('.') }
foreach ($p in $profiles) {
$profilesSeen++
$u = $p.FullName
$roam = J $u 'AppData' 'Roaming'
$local = J $u 'AppData' 'Local'
$progs = J $local 'Programs'
$pkgs = J $local 'Packages'
$npm = J $roam 'npm' 'node_modules'
$found = New-Object System.Collections.Generic.List[string]
# AI coding CLIs
$how = @()
if (Has (J $u '.local' 'bin' 'claude.exe')) { $how += 'native' }
if (Has (J $npm '@anthropic-ai' 'claude-code')) { $how += 'npm' }
if ($how.Count -gt 0) { $found.Add("Claude Code ($($how -join '+'))") }
elseif (Has (J $u '.claude')) { $found.Add('Claude Code (data folder only)') }
if (Has (J $npm '@openai' 'codex')) { $found.Add('Codex CLI (npm)') }
elseif (Has (J $u '.codex')) { $found.Add('Codex CLI (data folder only)') }
if ((Has (J $npm '@google' 'gemini-cli')) -or (Has (J $roam 'npm' 'gemini.cmd'))) { $found.Add('Gemini CLI (npm)') }
# AI IDEs and desktop apps
if (Has (J $progs 'cursor')) { $found.Add('Cursor') }
if (Has (J $progs 'Windsurf')) { $found.Add('Windsurf') }
if ((Has (J $local 'AnthropicClaude')) -or (Has (J $progs 'Claude')) -or (HasLike $pkgs 'Claude_*') -or (HasLike $pkgs 'AnthropicPBC.Claude*')) { $found.Add('Claude desktop') }
if ((Has (J $progs 'ChatGPT')) -or (HasLike $pkgs 'OpenAI.ChatGPT-Desktop_*')) { $found.Add('ChatGPT desktop') }
# Local model runners
$models = @()
$manifests = J $u '.ollama' 'models' 'manifests' 'registry.ollama.ai' 'library'
if (Has $manifests) {
foreach ($m in Get-ChildItem -LiteralPath $manifests -Directory -Force) {
foreach ($t in Get-ChildItem -LiteralPath $m.FullName -File -Force) { $models += "$($m.Name):$($t.Name)" }
}
}
if ((Has (J $progs 'Ollama')) -or $models.Count -gt 0) {
if ($models.Count -gt 0) { $found.Add("Ollama (models: $(($models | Select-Object -First 8) -join ', '))") }
else { $found.Add('Ollama') }
}
if ((Has (J $progs 'LM Studio')) -or (Has (J $progs 'lm-studio')) -or (Has (J $u '.lmstudio'))) { $found.Add('LM Studio') }
# AI extensions in VS Code (and VS Code-based editors that share the layout)
$ext = @()
foreach ($dir in @((J $u '.vscode' 'extensions'), (J $u '.cursor' 'extensions'), (J $u '.windsurf' 'extensions'))) {
if (-not (Has $dir)) { continue }
foreach ($e in Get-ChildItem -LiteralPath $dir -Directory -Force) {
foreach ($id in $aiExtensions) {
if ($e.Name.ToLower().StartsWith("$id-")) { $ext += $id }
}
}
}
$ext = $ext | Sort-Object -Unique
if ($ext.Count -gt 0) { $found.Add("AI extensions: $($ext -join ', ')") }
# MCP configuration files (server count only)
$mcp = @()
$configs = [ordered]@{
'Claude desktop' = (J $roam 'Claude' 'claude_desktop_config.json')
'Claude Code' = (J $u '.claude.json')
'Cursor' = (J $u '.cursor' 'mcp.json')
'VS Code' = (J $roam 'Code' 'User' 'mcp.json')
'Windsurf' = (J $u '.codeium' 'windsurf' 'mcp_config.json')
}
foreach ($k in $configs.Keys) {
$n = McpCount $configs[$k]
if ($n -gt 0) { $mcp += "$k $n" }
}
if ($mcp.Count -gt 0) { $found.Add("MCP servers: $($mcp -join ', ')") }
if ($found.Count -gt 0) {
$toolCount += $found.Count
$lines.Add("$($p.Name): $($found -join '; ')")
}
}
$header = "Kuntur AI inventory $(Get-Date -Format 'yyyy-MM-dd HH:mm') | profiles: $profilesSeen | findings: $toolCount"
if ($lines.Count -eq 0) { $lines.Add('No AI tools found in user profiles.') }
$summary = (@($header) + $lines) -join "`n"
if ($summary.Length -gt 9500) { $summary = $summary.Substring(0, 9500) + "`n(truncated)" }
Write-Output $summary
exit 0
What it does not cover
- WSL, Docker and virtual machines. Tools inside a WSL distro or a container live in their own file systems. See How to find Claude Code and Codex CLI running in WSL and AI in Docker containers.
- Browser-only AI. ChatGPT or Claude used in a browser tab leaves no install to find.
- New tools. The script checks a fixed list. Anything released after you copied it, or installed in an unusual folder, is invisible to it.
- Point in time. It shows what was there at the last run, not what ran in between.
- Install versus use. A folder can be left over from an old install. Check modification times before acting on a single finding.
Keep the inventory current
The script is a good first pass. If you want the inventory to stay current without maintaining a list yourself, the Kuntur agent reports the same categories from Windows, macOS and Linux, including WSL distros and containers, with the environment each tool ran in. You mark each tool approved or unauthorized and keep a record of every decision. Kuntur's installers (MSI, DEB, RPM and a script for macOS) can be deployed with a JumpCloud Command or software policy.
To try it on one machine first, the free scanner writes the same kind of report locally and uploads nothing:
- Download scan.ps1.
- Read it. It's plain text; here's what it does.
- Check its SHA-256 against the published hash:
Get-FileHash .\scan.ps1 -Algorithm SHA256 - Run it:
powershell -ExecutionPolicy Bypass -File .\scan.ps1
Free 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. Kuntur detects and reports; it does not block or uninstall anything.
FAQ
- Which user should the JumpCloud Command run as?
- On Mac and Linux, set Run As to root so the script can read every home folder. Windows commands always run as LocalSystem, which can read every profile under C:\Users.
- Does the script send anything outside JumpCloud?
- No. It makes no network calls. It checks whether known files and folders exist and prints a summary, which JumpCloud stores with the command result.
- Does it read prompts, code or API keys?
- No. It never prints file contents. MCP configuration files are only checked for existence on Mac and Linux and counted on Windows, so tokens stored in them are not output.
- Why does it always exit 0?
- JumpCloud marks a non-zero exit code as a failed command. The script exits 0 so a device with AI tools does not look like an error; read the findings in the command result instead.
- What does it miss?
- Tools inside WSL distributions, Docker containers and virtual machines, AI used only in the browser, copies in unusual folders, and anything new that is not on the script's list. It also only shows what was there when it last ran.
Sources
- JumpCloud: Get started with Commands
- JumpCloud: Create a Command
- JumpCloud: Understand command results
More guides and tools:
- How to detect Claude Code on company laptops
- How to detect MCP servers
- How to detect Ollama and local LLMs
- Free tool: MCP config auditor
- Inventory AI Tools on Windows Endpoints with NinjaOne
- Detect AI tools with Iru (Kandji)
- Detect AI Tools on Windows with Configuration Manager (SCCM)
- Detect AI Tools on Windows with a Workspace ONE UEM Sensor
- Detect AI Tools on Windows with a Datto RMM Component
- Detect AI Tools on Windows with a ConnectWise Automate Script
- Detect AI Tools on Windows with CrowdStrike Real Time Response
- Detect AI Tools on Windows with PDQ Inventory and PDQ Deploy
- All guides