Find MCP Servers on Employee Laptops: Config Paths per AI Client
An MCP server is a program or URL an AI assistant can call, configured in a JSON or TOML file in the user's profile. Nothing is installed, so software inventory never sees it. Here is where every common client keeps its servers, a read-only MCP finder script for one machine, and how to collect the list from every laptop. For a register with owners, versions and approvals, see MCP server inventory across your fleet.
Inventory first, then vet. Once you have the list, how to vet MCP servers covers what to check before approving each one, and the free MCP config auditor flags risky entries in a pasted config without uploading it. Rolling the inventory out through Intune, Jamf or an RMM is covered in How to inventory MCP servers across a fleet.
What MCP servers are and why security teams care
The Model Context Protocol lets an AI client call tools. A local (stdio) server is a command the client starts, usually npx, uvx, python or docker, and it runs with the user's full permissions. A remote server is a URL, often with a token stored next to it in the same file.
That gives security teams three concrete problems:
- Code execution and supply chain.
"command": "npx", "args": ["-y", "some-package"]downloads and runs the latest release of a package every time the client starts. A malicious release runs automatically, as has already happened with a package in the wild. - Data access. Filesystem, database, email and ticketing servers are popular because they reach data. The model decides when to call them, and a prompt injection in a document can steer that decision.
- Secrets in plain text. API keys and tokens are commonly pasted into the
envorheadersblock of the config, readable by anything running as the user and copied by every backup.
Developers often use two or three clients, each with its own file, and projects can bring servers with them when a repository is cloned.
Where MCP servers are configured
| Client | User-level config | Project-level config |
|---|---|---|
| Claude Desktop | %APPDATA%\Claude\claude_desktop_config.json (Store install: under %LOCALAPPDATA%\Packages\Claude_*\LocalCache\Roaming\Claude); ~/Library/Application Support/Claude/claude_desktop_config.json on macOS | - |
| Claude Code | ~/.claude.json (user servers, and per-project servers under projects) | .mcp.json |
| Cursor | ~/.cursor/mcp.json | .cursor/mcp.json |
| VS Code and forks (Copilot agent mode) | Code/User/mcp.json and settings.json in the editor's user folder (key servers) | .vscode/mcp.json |
| Cline, Roo Code, Kilo Code | Extension storage under the editor's User/globalStorage/<extension-id>/settings/ | - |
| Windsurf | ~/.codeium/windsurf/mcp_config.json | - |
| GitHub Copilot CLI | ~/.copilot/mcp-config.json | - |
| Gemini CLI | ~/.gemini/settings.json | .gemini/settings.json |
| Kiro | ~/.kiro/settings/mcp.json | .kiro/settings/mcp.json |
| Amazon Q Developer | ~/.aws/amazonq/mcp.json | .amazonq/mcp.json |
| Google Antigravity | ~/.gemini/antigravity/mcp_config.json | - |
| LM Studio | ~/.lmstudio/mcp.json | - |
| Zed | Zed settings.json (context_servers) | - |
~ is %USERPROFILE% on Windows. The editor user folder is %APPDATA%\Code\User on Windows, ~/Library/Application Support/Code/User on macOS and ~/.config/Code/User on Linux (replace Code with Cursor, Windsurf and so on for the forks). Most clients use the mcpServers key; VS Code uses servers. Claude Code also keeps project servers inside ~/.claude.json, so a clean repository does not mean a clean machine.
Check one machine
Both checks only read files, the process table and, where relevant, the local listener table. They send nothing over the network and change nothing.
Windows (PowerShell)
# Read-only, no network. Run as the user. Prints file, server name, and the command or the
# remote host only: arguments, env, headers and URL paths can carry tokens, so they are skipped.
$files = "$env:APPDATA\Claude\claude_desktop_config.json", "$env:USERPROFILE\.claude.json",
"$env:USERPROFILE\.cursor\mcp.json", "$env:APPDATA\Code\User\mcp.json",
"$env:USERPROFILE\.codeium\windsurf\mcp_config.json", "$env:USERPROFILE\.copilot\mcp-config.json",
"$env:USERPROFILE\.gemini\settings.json", "$env:USERPROFILE\.kiro\settings\mcp.json",
"$env:USERPROFILE\.aws\amazonq\mcp.json", "$env:USERPROFILE\.lmstudio\mcp.json"
foreach ($f in $files) {
if (-not (Test-Path $f)) { continue }
try { $j = Get-Content $f -Raw | ConvertFrom-Json } catch { Write-Warning "Cannot parse $f"; continue }
$sets = @($j.mcpServers, $j.servers)
if ($j.projects) { $sets += $j.projects.PSObject.Properties.Value | ForEach-Object { $_.mcpServers } }
foreach ($s in $sets | Where-Object { $_ }) {
foreach ($p in $s.PSObject.Properties) {
$url = @($p.Value.url, $p.Value.serverUrl, $p.Value.httpUrl) | Where-Object { $_ } | Select-Object -First 1
$target = if ($url) { 'remote: ' + ([uri]$url).Authority } else { $p.Value.command }
[pscustomobject]@{ File = $f; Server = $p.Name; Target = $target }
}
}
}
macOS and Linux (bash)
# Read-only, no network. Run as the user; needs jq.
# Prints file, server name, and the command or the remote host only (tokens hide in the rest).
q='def host: sub("^[A-Za-z]+://"; "") | split("/")[0] | split("?")[0] | split("@")[-1];
def target: if (.url // .serverUrl // .httpUrl) then "remote: " + ((.url // .serverUrl // .httpUrl) | host)
else (.command // "") end;'
for f in \
"$HOME/Library/Application Support/Claude/claude_desktop_config.json" \
"$HOME/.config/Claude/claude_desktop_config.json" \
"$HOME/.cursor/mcp.json" \
"$HOME/Library/Application Support/Code/User/mcp.json" \
"$HOME/.config/Code/User/mcp.json" \
"$HOME/.codeium/windsurf/mcp_config.json" \
"$HOME/.copilot/mcp-config.json" \
"$HOME/.gemini/settings.json" \
"$HOME/.kiro/settings/mcp.json" \
"$HOME/.aws/amazonq/mcp.json" \
"$HOME/.lmstudio/mcp.json"; do
[ -f "$f" ] || continue
jq -r --arg f "$f" "$q"'(.mcpServers // .servers // {}) | to_entries[]
| "\($f)\t\(.key)\t\(.value | target)"' "$f" 2>/dev/null
done
# Claude Code: user servers plus per-project servers kept in ~/.claude.json
[ -f ~/.claude.json ] && jq -r "$q"'[(.mcpServers // {}), (.projects // {} | .[] | .mcpServers // {})]
| add | to_entries[] | "~/.claude.json\t\(.key)\t\(.value | target)"' ~/.claude.json
Project-level files live in repositories, so the user-level list is a floor, not a total. The MCP detection guide shows how to search a profile for .mcp.json and .cursor/mcp.json in seconds and how to catch servers running right now as child processes of an AI client. To review a config in full without copying tokens anywhere, paste it into the MCP config auditor.
What to flag
Once you have the list, these are the patterns worth a finding. Each is a Kuntur finding with the same name:
| Pattern | Why it matters | Finding |
|---|---|---|
npx, uvx or bunx without a pinned version | A new release of the package runs on the next start. | MCP_UNPINNED_PACKAGE |
Literal token in env, headers or args | A credential in a plain-text file. Kuntur never sends the value, only the fact that one is there. | MCP_PLAINTEXT_SECRET |
| Remote URL | Context leaves the endpoint for that host. | MCP_REMOTE_SERVER |
Remote URL over http:// | Prompts and tokens travel unencrypted. | MCP_REMOTE_INSECURE |
Filesystem server rooted at /, C:\ or a whole home folder | The model can read and write anything the user can. | MCP_BROAD_FILESYSTEM |
| Shell, terminal or desktop-control server | The model can run commands on the machine. | MCP_COMMAND_EXECUTION |
autoApprove, alwaysAllow or trust | Tools run without the user confirming each call. | MCP_AUTO_APPROVE |
Docker with --privileged, the Docker socket or host networking | The container can control the host. | MCP_DOCKER_PRIVILEGED |
For the reasoning behind each one, see MCP server security risks; to approve servers before they spread, use the MCP vetting checklist.
Find them across a fleet
The commands above answer the question for one laptop. Across a fleet, run the same read-only checks from the management tool you already use and collect one line per device. Each of these guides has a tested script that already includes MCP servers:
- Windows with Intune: Detect AI tools with Intune Remediations (detection-only script, results in the device status column).
- Windows with NinjaOne: Inventory AI tools with NinjaOne (writes a summary to a device custom field).
- macOS with Jamf Pro: Find AI tools with a Jamf Pro extension attribute (plus a Smart Group to act on it).
- macOS with Iru (Kandji): Detect AI tools with an Iru custom script (with an allowlist).
Those scripts walk every profile under C:\Users or /Users, because MDM scripts usually run as SYSTEM or root, where %USERPROFILE% and ~ point at the wrong home folder. On Linux, run the bash checks through whatever configuration management you have (Ansible, Salt, a cron job) and loop over /home/* the same way.
How Kuntur detects MCP servers
Kuntur reads the MCP configuration of Claude Desktop (including Store installs), Claude Code, Cursor, VS Code and its forks, Cline, Roo Code, Kilo Code, Windsurf, GitHub Copilot CLI, Gemini CLI, Kiro, Amazon Q, Antigravity, LM Studio, Zed, Continue, Goose, opencode and Qwen Code, at user level and in the projects it finds, for every user profile. It also reports MCP servers seen running as children of an AI client, which catches servers configured in places no file check covers. Each server gets the findings above, and secret values never leave the endpoint.
To check one machine now, the free Kuntur scanner lists MCP servers together with every other AI tool, extension, local model and MCP server it finds:
- 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
Windows shortcut, if you trust the source (PowerShell)
irm https://app.kuntur.io/scan.ps1 | iexmacOS and Linux (Terminal)
curl -fsSL https://app.kuntur.io/scan.sh | shIt 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 reports the same inventory for every user profile on Windows, macOS and Linux. You mark MCP servers approved or unauthorized once for the organization, the dashboard shows which machines carry it, and every decision lands in an audit log.
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
- Where are MCP servers configured?
- In a JSON file per client: for example
claude_desktop_config.jsonfor Claude Desktop,~/.claude.jsonand.mcp.jsonfor Claude Code,~/.cursor/mcp.jsonfor Cursor andmcp.jsonin the VS Code user folder. The table above lists every common client. - Do MCP servers show up in software inventory?
- No. A local MCP server is a command such as
npx some-packagethat the AI client starts on demand, and a remote one is a URL. Nothing is installed, so only the config files and running child processes reveal them. - Is it safe to collect MCP configs with an MDM script?
- Only if the script does not print the files. They often hold API tokens, which would end up in MDM logs. Print server names and commands only, as the scripts above do, or just count the entries.
- What is the riskiest MCP configuration?
- An unpinned package run through
npxoruvx, combined with auto-approved tools or a shell-capable server. That lets a malicious package release or a prompt injection run commands without anyone confirming them.
Sources
- Model Context Protocol: Security best practices
- VS Code docs: MCP configuration reference
- Cursor docs: Model Context Protocol
- Claude Code docs: MCP
- The Hacker News: First malicious MCP server found in the wild (postmark-mcp)
Detect other AI tools:
Related guides: