How to Discover Shadow AI on Company Endpoints

Shadow AI is no longer just a chatbot tab. It is coding agents in the terminal, MCP servers started by the IDE, models running on the laptop and API keys in shell profiles. This guide shows what to look for, how to check one machine, how to scale the checks across a fleet, and what to do with what you find.

By Kuntur team · Published · Updated

Short answer. Shadow AI on an endpoint is any AI tool that runs on, or is configured on, the laptop itself: desktop chat apps, terminal coding agents such as Claude Code or Codex CLI, AI extensions in the IDE and the browser, MCP servers, local model runtimes such as Ollama, and AI API keys left in config files, plus all of the above inside WSL, containers and VMs. Network and SaaS-discovery tools see some of its traffic but not the programs, configs and keys behind it. To find it: check one machine by hand, run the same read-only checks in every user profile with your MDM or RMM, then keep the inventory current with continuous discovery and decide, tool by tool, what is approved.

Looking for one product? The per-tool detection pages list the exact traces of each one.

What counts as Shadow AI on an endpoint

"Shadow AI" usually means AI use the company has not reviewed. On a laptop it takes a few concrete forms, and each leaves different traces:

CategoryExamplesWhere it shows upDetail
Desktop AI appsChatGPT, Claude, Microsoft Copilot, Perplexity, Doubao, Cherry StudioPer-user installs, Microsoft Store packages, /ApplicationsDesktop apps guide, ChatGPT, Cherry Studio, Doubao
Terminal coding agentsClaude Code, Codex CLI, Gemini CLI, GitHub Copilot CLI, Amp, Crush, Factory Droid, Auggie, OpenHandsGlobal npm packages, binaries in ~/.local/bin, config folders such as ~/.claude, ~/.codex, ~/.geminiCoding CLIs guide, Claude Code, Codex CLI, Gemini CLI, Amp, Crush, Factory Droid, Auggie, OpenHands
AI IDEs and IDE extensionsCursor, Windsurf, Kiro, Qoder, CodeBuddy; Copilot, Cline, Roo Code, Kilo Code, Continue in VS CodeEditor installs and the editor's extensions folder per userAI IDEs guide, IDE extensions, Cursor, Windsurf, GitHub Copilot, Kilo Code, Qoder, CodeBuddy
Browser AI extensions and AI browsersWriting assistants, meeting summarizers, sidebars; ChatGPT Atlas, Perplexity CometBrowser profile Extensions folders; browser installsBrowser extensions guide, AI browsers guide
MCP serversGitHub, filesystem, database, shell or browser-automation serversJSON, TOML or YAML config files of each AI client, user-level and inside projectsMCP server inventory, How to detect MCP servers, MCP security risks
Local modelsOllama, LM Studio, llama.cpp, Jan, GPT4All, Open WebUI; GGUF and safetensors filesRuntime installs, listening ports, model folders and cachesOllama and local LLMs, Model files, Ollama, LM Studio, Open WebUI
AI API keysOPENAI_API_KEY, ANTHROPIC_API_KEY, GEMINI_API_KEY and similarShell profiles, agent settings, MCP configs, app config folders, .env filesFind exposed AI API keys
Hidden environmentsAny of the above inside WSL, Docker or a local VMThe distro's or container's own file system; the hypervisorClaude Code and Codex in WSL, AI in Docker and VMs

Most of these install per user, without admin rights. Claude Code's documented native installer, for example, writes to the user's home folder. That is why the software inventory in your MDM, which mostly reads the list of installed programs, tends to miss them.

Why network and SaaS tools miss part of it

A proxy, secure web gateway, CASB or SaaS-discovery tool sees traffic and sign-ins. That is the right place to govern web chat use, and you should keep doing it. But much of the endpoint side never shows up as something those tools can attribute:

So endpoint discovery does not replace network controls; it covers the part they cannot attribute. The full technical explanation, including what EDR and WSL policies do cover, is in Why your CASB or SWG can't see Claude Code running in WSL. If you are weighing an inventory against runtime protection, AIDR vs AI inventory explains what each one sees. For a side-by-side of approaches see Kuntur vs AppLocker, App Control and EDR and Kuntur vs Microsoft Defender.

Step 1: decide what you are counting

Before running anything, write down the categories from the table above and, for each, what "found" means. A useful rule: an install or config file means "present", and a running process or recent session data means "in use". Record per user, not just per machine, because nearly all of these tools live in the user profile. Start a simple register with three columns: tool, decision (approved, approved with conditions, unauthorized) and owner. The AI coding agent policy template and the general AI acceptable use policy give you the wording.

Step 2: check one machine by hand

Pick a developer laptop and run these as the logged-in user. They only read: they list commands on the PATH, global npm packages, well-known config folders, key variable names (never values), WSL distros and containers.

Windows (PowerShell, as the user)

# 1. AI coding CLIs on the PATH
'claude','codex','gemini','copilot','cursor-agent','opencode','goose','aider','qwen','amp','crush','droid','auggie','ollama' |
  ForEach-Object { Get-Command $_ -ErrorAction SilentlyContinue } | Select-Object Name, Source

# 2. Global npm packages from AI vendors
npm ls -g --depth=0 2>$null | Select-String 'claude-code|@openai/codex|gemini-cli|@github/copilot|qwen-code|opencode|@ampcode|@sourcegraph/amp|auggie|kilocode|codebuddy|qoder'

# 3. Agent, MCP and model folders in the profile
'.claude','.claude.json','.codex','.gemini','.cursor','.codeium\windsurf','.copilot','.continue','.kiro','.qwen','.ollama','.lmstudio','.cache\huggingface' |
  ForEach-Object { Join-Path $env:USERPROFILE $_ } | Where-Object { Test-Path $_ }
"$env:APPDATA\Claude\claude_desktop_config.json", "$env:APPDATA\Code\User\mcp.json" | Where-Object { Test-Path $_ }

# 4. AI key variables: names only, never values
Get-ChildItem Env: | Where-Object Name -match '(OPENAI|ANTHROPIC|GEMINI|GROQ|MISTRAL|DEEPSEEK|OPENROUTER)_API_KEY' | Select-Object Name
Select-String -Path $PROFILE.CurrentUserAllHosts, $PROFILE -Pattern '_API_KEY' -ErrorAction SilentlyContinue | Select-Object Path, LineNumber

# 5. Hidden environments
wsl -l -q 2>$null
docker ps --format '{{.Image}}  {{.Names}}  {{.Ports}}' 2>$null

macOS and Linux (bash or zsh, as the user)

# 1. AI coding CLIs on the PATH
for b in claude codex gemini copilot cursor-agent opencode goose aider qwen amp crush droid auggie ollama; do command -v "$b"; done

# 2. Global npm packages from AI vendors
npm ls -g --depth=0 2>/dev/null | grep -E 'claude-code|@openai/codex|gemini-cli|@github/copilot|qwen-code|opencode|@ampcode|@sourcegraph/amp|auggie|kilocode|codebuddy|qoder'

# 3. Agent, MCP and model folders; AI apps on macOS
ls -d ~/.claude ~/.claude.json ~/.codex ~/.gemini ~/.cursor ~/.codeium/windsurf ~/.copilot ~/.continue ~/.kiro ~/.qwen ~/.ollama ~/.lmstudio ~/.cache/huggingface 2>/dev/null
ls /Applications 2>/dev/null | grep -iE 'chatgpt|claude|cursor|windsurf|perplexity|lm studio|ollama|kiro|antigravity|comet|atlas'

# 4. AI key variables in shell profiles: file, line and name only
grep -nE '^[^#]*(OPENAI|ANTHROPIC|GEMINI|GROQ|MISTRAL|DEEPSEEK|OPENROUTER)_API_KEY=' \
  ~/.bashrc ~/.bash_profile ~/.profile ~/.zshrc ~/.zprofile ~/.zshenv 2>/dev/null | cut -d= -f1

# 5. Local model listeners and containers
lsof -nP -iTCP -sTCP:LISTEN 2>/dev/null | grep -E ':(11434|1234) '
docker ps --format '{{.Image}}  {{.Names}}  {{.Ports}}' 2>/dev/null

This takes a minute and is usually enough to prove the point internally. It is not a complete inventory: it misses tools not on the list, Node versions managed by nvm or Volta (each has its own global folder), MCP servers declared inside project folders, other user profiles, anything inside WSL distros and containers, and extensions. The per-tool pages (Claude Code, Cursor, MCP servers and others) go deeper on each one.

Step 3: run the checks across the fleet

The same checks scale through the tools you already use to run scripts. The mistakes that make results look clean when they are not are always the same:

Ready-made, read-only scripts for each platform:

For MCP specifically, How to inventory MCP servers across your fleet covers which config files to collect and how to normalise them so the same server on two machines counts once.

What the per-MDM scripts check

The platform guides above share one detection list, taken from the paths in Kuntur's public detection catalog. Each guide only changes how the result is reported back to that tool (an exit code, a custom field, an extension attribute, one line of output). The Windows and macOS lists differ slightly, and each script file is the exact list. The common checks:

CategoryExamplesSignal the scripts test for
AI desktop appsClaude, ChatGPT, ChatGPT Atlas, Codex, Gemini, Cursor, Windsurf, Ollama, LM StudioApp bundle in /Applications or ~/Applications; install folder under %LOCALAPPDATA%\Programs on Windows
Coding agents (CLI)Claude Code, Codex CLI, Gemini CLINative binary in ~/.local/bin, global npm packages (including every nvm version), Homebrew, and the data folders ~/.claude, ~/.codex, ~/.gemini
Local modelsOllama, LM Studio~/.ollama/models, ~/.lmstudio, ~/.cache/lm-studio
IDE extensionsGitHub Copilot, Claude Code, Codex, Cline, Roo Code, Kilo Code, Continue, Codeium, Gemini Code Assist, Amazon Q, TabnineExtension folders of VS Code, Cursor and Windsurf
MCP configsClaude Desktop, Claude Code, Cursor, VS Code, WindsurfWhether the config file exists. The scripts never open it, because these files often hold API tokens in plain text; review one with the free MCP config auditor, which runs in the browser.

All of them are read-only: they test whether paths exist, make no network calls and print tool names and paths only.

What every MDM inventory script misses

Those gaps are the honest case for an agent with a maintained catalog. If a fixed list is enough for you, the scripts are free to keep using.

Step 4: keep it current with continuous discovery

A script run is a snapshot. New agents and MCP servers appear every month, and a developer can install one in a minute without admin rights. Whatever you use for the ongoing inventory, it should do at least this:

You can build this from scripts and a spreadsheet; Kuntur vs inventory scripts is an honest look at when that is enough. The Kuntur agent does it continuously; see what it covers below.

What to do with the findings

  1. Decide per tool, not per machine. Mark each tool approved, approved with conditions (for example "Claude Code, company account, managed settings deployed") or unauthorized. Most of the work is a handful of decisions that then apply to everyone.
  2. Fix the high-severity findings first. A plaintext API key means rotate the key, then move it to a secret manager or the OS keychain. A model runtime listening on all interfaces means bind it to localhost. An MCP server with a token in its config means rotate and switch to a reference.
  3. Use the controls the vendors ship. Coding agents have admin policy: Claude Code managed settings, Codex requirements.toml, Gemini CLI system settings, Cursor team settings. The policy template lists the keys for each clause, and Cursor and Claude Code security goes deeper.
  4. Restrict what is unauthorized with the tools you already own. Discovery is not enforcement. To stop an app from running, use application control: Claude Code with Intune, Claude Code with Jamf Pro, Cursor with Intune, Cursor with Jamf Pro, ChatGPT Desktop with Intune and ChatGPT Desktop with Jamf Pro. Browser extensions are managed with browser policy (see the extensions guide), and EDR can block by hash or path where you have it.
  5. Write it down and re-check. Put the decisions in your policy and register, then re-run discovery to confirm the change actually landed on every machine.

What Kuntur covers, and what it does not

Kuntur is an endpoint agent for Windows, macOS and Linux with a web console. What it reads, all of it from disk, process lists and local APIs, read-only:

What it does not do, plainly:

Automate it

To see the inventory for one machine right now, run the free Kuntur scanner. It covers the categories above for that computer and the user running it.

  1. Download scan.ps1.
  2. Read it. It's plain text; here's what it does.
  3. Check its SHA-256 against the published hash: Get-FileHash .\scan.ps1 -Algorithm SHA256
  4. Run it: powershell -ExecutionPolicy Bypass -File .\scan.ps1

Windows shortcut, if you trust the source (PowerShell)

irm https://app.kuntur.io/scan.ps1 | iex

macOS and Linux (Terminal)

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

It needs no account and no admin rights, writes an HTML report to the Desktop (or home folder) and uploads nothing. You can read scan.ps1 or scan.sh before running it; what it collects is documented.

Across a fleet, the Kuntur agent keeps the same inventory current for every user on every enrolled endpoint, records where each detection ran (host, WSL distro or container), and lets you mark each tool approved or unauthorized for the whole organization, with alerts and an audit log of every decision. Rolling it out: deployment guides.

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

What is Shadow AI on an endpoint?
AI tools installed or configured on the laptop without review: desktop chat apps, terminal coding agents such as Claude Code or Codex CLI, AI extensions in the IDE and the browser, MCP servers, local model runtimes such as Ollama, and AI API keys stored in plain text, including inside WSL distros, containers and virtual machines.
Can a CASB or a proxy find AI coding agents and MCP servers?
Only partly. A proxy or CASB can log connections to AI provider APIs, but not which program made them, which MCP servers it loaded, whether approval prompts are off, which keys sit in config files, or a local model that never touches the network. Keep network controls for web chat use and add an endpoint inventory for the rest.
Do I need admin rights to find AI tools on a laptop?
No, to check your own profile: the commands on this page run as the user and only read. Across a fleet you either run the check in each user's context or run it as an administrator and loop over every profile folder, and you check WSL distros separately, because a Linux install inside a distro is invisible from Windows paths.
Does Kuntur block Shadow AI tools?
No. Kuntur detects and reports: you mark each tool approved or unauthorized and get findings when an unauthorized one is in use. To stop a tool from running, use your MDM, application control (AppLocker, App Control for Business, Jamf Restricted Software), browser policy or EDR; the restrict guides show how.

Sources

  1. Model Context Protocol specification: Transports (stdio and Streamable HTTP)
  2. Claude Code documentation: Advanced setup (install methods and locations)
  3. Ollama FAQ: default bind address and OLLAMA_HOST
  4. Claude Code documentation: Deploy managed settings
  5. OpenAI Codex: Managed configuration (requirements.toml)
  6. Gemini CLI for the enterprise: system settings

More guides and tools: