Skip to main content

    How to Inventory AI Agents, CLIs, and MCP Servers on Developer Machines

    Coding agents install through package managers, read keys from the environment, and call tools through MCP servers. Here is how to record what is on each machine and how it is set up.

    The short version

    How do I inventory AI agents on developer machines?

    Record three things per developer machine: which AI agents and CLIs are installed, how each is configured (MCP servers, permission mode, API key source), and which AI services they reach. Package managers, config folders, and MDM or osquery cover the first two; Behest Radar is one option for the third.

    Looking for usage and cost instead? See which AI coding tools your developers use and what that usage costs.

    Before you start

    Every command here is read-only and prints names, not secrets. Checking developer machines can count as employee monitoring, so agree the scope with HR, legal, or your privacy team, tell developers what you collect, and report by tool and team rather than by person. Never collect key values or session transcripts. The shadow AI detection guide has the full caveat. This is general information, not legal advice.

    Why agents need their own inventory

    An AI agent inventory is a record of the AI agents, command-line tools, and MCP servers installed on an organization's machines, with each one's version, configuration, credential source, and owner.

    • They act, not just chat: they run shell commands, edit files, and call tools through MCP servers that reach SaaS apps and data.
    • They read credentials from environment variables and configuration files.
    • They install through npm, Homebrew, pip, or install scripts, so an app-catalog inventory can miss them.
    • New versions ship every week or two.

    What to record for each agent

    One record per agent per machine. These fields map onto the inventory template in the shadow AI audit guide.

    Fields to record for each AI agent in an inventory
    FieldWhat to record
    AgentThe tool's name, such as Claude Code or Codex CLI
    VersionThe output of the tool's --version flag
    Install methodnpm, Homebrew, pip, pipx or uv, a vendor installer, or an app
    Config locationUser, project, and managed settings files in use
    MCP serversEach server's name; the program or package it runs (not its arguments), or the URL's host only, because the path and query string can hold tokens; and its scope (user or project)
    Credential sourceSubscription sign-in, a named environment variable, or a cloud provider; never the value
    Permission modeAuto-approve or command-execution settings, where the tool has them
    Managed settings or telemetryWhether organization settings or telemetry export are present
    Model providersWhich AI providers the agent is set up to call
    TeamThe team that uses it, not the person
    DecisionApproved, under review, or not allowed
    OwnerThe role accountable for the agent

    Where each agent leaves traces

    Paths change as these tools ship. Check each vendor's current documentation before you script against them.

    Where common AI coding agents keep their command, install, configuration, and MCP server settings
    AgentCommandTypical installUser configMCP config
    Claude CodeclaudeNative installer, Homebrew cask claude-code, WinGet, or npm @anthropic-ai/claude-code~/.claude/settings.json; project .claude/settings.json; organization managed-settings.json (docs)~/.claude.json (user and per-project), .mcp.json (shared project)
    Codex CLIcodexnpm @openai/codex or Homebrew cask codex~/.codex/config.toml, moved by CODEX_HOME (docs)[mcp_servers.<name>] tables in config.toml
    Gemini CLIgemininpm @google/gemini-cli or Homebrew gemini-cli~/.gemini/settings.json; project .gemini/settings.json; system-wide settings files set by administrators (docs)mcpServers in settings.json
    GitHub Copilot CLIcopilotnpm @github/copilot or Homebrew cask copilot-cli~/.copilot, moved by COPILOT_HOME (docs)~/.copilot/mcp-config.json
    CursorThe app; the command-line agent installs agentApp installer; install script for the CLI~/.cursor/~/.cursor/mcp.json, project .cursor/mcp.json (docs)
    Aideraiderpip, pipx, or uv package aider-chat.aider.conf.yml in the home folder, repository root, or current folderNot applicable
    Claude DesktopThe app, including CoworkApp installerThe app's settingsclaude_desktop_config.json, opened from Settings, Developer, Edit Config (MCP docs)

    Windsurf, Zed, Cline, Continue, and OpenCode keep their own configuration too; check each one's documentation for current locations.

    Check one machine by hand

    Five read-only checks for a terminal running zsh or bash. On machines without one, run the same checks through your fleet tools, such as osquery or your device management inventory.

    Commands on the PATH

    Check which agent commands are on the PATH, then run each one with --version to record its version.

    In a terminal (zsh or bash)

    command -v claude codex gemini copilot aider
    claude --version

    Cursor's command-line agent installs a command named agent, so check for it by path as well as by name.

    Packages

    List globally installed packages from the package managers developers use, because many agents install through npm, Homebrew, pip, pipx, or uv rather than as apps.

    In a terminal (zsh or bash)

    npm ls -g --depth=0
    brew list
    pipx list
    uv tool list

    Config folders

    Check which agents have a configuration folder in the home directory. A folder means the tool has run at least once, even if it has since been removed from the PATH.

    In a terminal (zsh or bash)

    ls -d ~/.claude ~/.codex ~/.gemini ~/.copilot ~/.cursor 2>/dev/null

    MCP servers

    List MCP server names from each agent's user and project configuration. For each server, record its name, the program or package it runs (not its arguments) or the URL's host only, because the path and query string can hold tokens, and its scope. Note the names of the environment variables and headers it needs, never their values.

    In a terminal (zsh or bash)

    jq '.mcpServers // {} | keys' ~/.claude.json .mcp.json ~/.cursor/mcp.json ~/.gemini/settings.json 2>/dev/null
    jq '[.projects[]?.mcpServers // {} | keys[]] | unique' ~/.claude.json
    grep -E '^\[mcp_servers\.' ~/.codex/config.toml

    These print server names only. GitHub Copilot CLI keeps its servers in ~/.copilot/mcp-config.json, and Claude Desktop in claude_desktop_config.json, which its Settings, Developer, Edit Config button opens.

    Credential source, without the secret

    Record where each agent's key comes from, such as a subscription sign-in or a named environment variable, by listing variable names only.

    In a terminal (zsh or bash)

    env | awk -F= '/^[A-Za-z_][A-Za-z0-9_]*=/{print $1}' | grep -E 'ANTHROPIC|OPENAI|GEMINI|GOOGLE_API|AZURE_OPENAI'

    What not to collect

    • Session histories and transcripts, such as those under ~/.claude/projects, Codex's history.jsonl under ~/.codex, or ~/.copilot/session-state. They hold prompts, code, and command output.
    • Aider's .aider.chat.history.md files.
    • Any key value. Record the name of a variable or header, never the value.

    Inventory the fleet

    The tools named here are examples, not endorsements, listed in no particular order. Use the ones you already run.

    Device management scripts

    Most device management tools can run a custom inventory or remediation script. Run the checks above and report agent names, versions, and MCP server names only.

    osquery

    The npm_packages, python_packages, homebrew_packages, processes, and file tables cover installs, running agents, and config folders. For example:

    SELECT name, version, directory FROM npm_packages
    WHERE name IN ('@anthropic-ai/claude-code', '@openai/codex',
                   '@google/gemini-cli', '@github/copilot');

    It reads the package folders osquery knows about, so per-user Node.js setups may need a directory constraint. Elastic's osquery integration ships prebuilt packs that inventory AI coding agents and MCP servers.

    Open-source and commercial scanners

    The open-source scanner SafeDep vet has a vet ai discover command that reads the local file system, makes no network calls, and records environment variable names but not their values (docs).

    Commercial options with agent and MCP inventories include GitGuardian, Runlayer, and StepSecurity.

    Turn on the agents' own telemetry where you license them

    • Claude Code: administrators can turn on OpenTelemetry export through managed settings. Metrics include sessions, tokens, and cost, and prompt content is redacted by default (monitoring docs).
    • Codex CLI: the [otel] section of config.toml is opt-in, and user prompts are redacted unless you turn them on.
    • Gemini CLI: a telemetry block in settings.json controls logging and metrics export. Telemetry is off until you enable it, and once enabled it includes prompts by default; set telemetry.logPrompts to false to leave them out (telemetry docs).

    This covers installs you manage and license. A personal install on a personal account will not report to you.

    Installed is not the same as in use

    An inventory shows what could run. To see which agents actually reach AI services, Behest Radar is one option.

    • Behest Radar is a free, observe-only app that recognizes 20+ coding agents and AI apps by name, such as Claude Code, Codex CLI, Gemini CLI, Cursor, Aider, Copilot CLI, and Windsurf, when they connect to AI services. An agent it does not recognize still appears under its process name.
    • Default counts are per connection, not per request.
    • With the optional certificate, it reads model and token counts for CLIs and SDKs that don't pin their certificates.
    • With permission, it adds token counts for Claude Code, Codex CLI, and Claude Cowork, and list-price cost for Claude models.
    • Radar does not read MCP configuration. With permission, it shows which MCP tools Claude Code called, by name and size, never their arguments or results.
    • It does not replace an installed-software or configuration inventory. A standalone install makes no network connections of its own, and machines your organization connects to Behest Control appear in one device inventory.

    From inventory to policy

    • Approved agents and their minimum versions.
    • Managed settings where the vendor offers them.
    • An allowlist of approved MCP servers.
    • API keys issued through a sanctioned path, not personal keys.

    Route sanctioned model calls through Behest, the control plane for enterprise AI. AI Token FinOps, its cost-control layer, gives each agent a budget and attributes its spend, and AI Governance adds model allowlists and an audit trail.

    See how to cap AI agent spend, and write the rules into your AI usage policy.

    Frequently asked questions

    How do I find which AI agents are installed on developer machines?
    Check three places: commands on the PATH (claude, codex, gemini, copilot, aider), packages installed with npm, Homebrew, pip, or uv, and the agents' configuration folders in the home directory, such as ~/.claude, ~/.codex, and ~/.gemini. At fleet scale, run the same checks through your device management tool, osquery, or a dedicated scanner.
    Where do AI coding agents keep their configuration?
    Mostly in a folder in the user's home directory, plus optional project files in each repository. Claude Code uses ~/.claude and ~/.claude.json, Codex CLI uses ~/.codex/config.toml, Gemini CLI uses ~/.gemini/settings.json, and GitHub Copilot CLI uses ~/.copilot. Organizations can also deploy managed settings that override a developer's own. Check each vendor's current documentation, because locations change.
    How do I find MCP servers on developer laptops?
    Read the MCP sections of each agent's configuration, at user and project level, such as ~/.claude.json, .mcp.json in a repository, and ~/.cursor/mcp.json. Record each server's name, the program or package it runs (not its arguments) or the URL's host only, and which agent uses it. Note the names of environment variables and headers it needs, never their values: MCP configurations can hold credentials.
    Should an AI agent inventory collect API keys or prompts?
    No. Record where a key comes from, such as a subscription sign-in, a named environment variable, or a cloud provider, but never the key itself. Skip the agents' session histories too: they hold prompts, code, and command output. An inventory needs what is installed and how it is configured, not what people typed.
    Does Behest Radar inventory installed AI agents?
    Behest Radar shows the agents that connect to AI services: it recognizes 20+ coding agents and AI apps by name, and an unknown agent still appears under its process name. Radar does not read MCP configuration, and it does not replace an installed-software or configuration inventory. With permission, it adds token counts for Claude Code, Codex CLI, and Claude Cowork, and list-price cost for Claude models.
    How is an agent inventory different from tracking AI coding tool usage?
    Usage tracking answers which tools developers use and what that costs. An agent inventory answers what is installed, how each agent is configured, which MCP servers and credentials it can use, and who owns it. Security teams usually need both, so start with the inventory and add a usage view.

    See which agents are actually in use

    Behest Radar is a free download. Pair it with your inventory, then see how shadow AI discovery leads to governed, budgeted AI.

    Behest Radar: Find the shadow AI on your machines. Free download.

    Get Radar free