Security

Defender AI Agent Discovery: Finding Claude Code, Copilot CLI and Their MCP Servers on Staff Machines

A green night-vision trail camera photograph of a forest floor at night with a fox, two rabbits and a raccoon caught mid-step among ferns and fallen logs, eyes glowing in grainy infrared, a visual for Defender AI agent discovery, which spots the coding agents and other local AI tools moving quietly across staff computers

Defender AI agent discovery is now generally available, Microsoft said at Ignite on November 17, 2026. Microsoft Defender can list the local AI agents installed on staff computers, such as Claude Code and GitHub Copilot CLI. It also lists the MCP servers each agent is set up to use, and ties every entry to a device and a user.

Developers, web staff and power users often install coding agents without asking IT. Until now, most small teams had no built-in way to see them. This post covers what Defender finds, which license it needs, how to turn it on, and how a small IT team should use the list. Facts are as of November 20, 2026.

The short version: Defender AI agent discovery needs Defender for Endpoint Plan 2, per Microsoft Learn. Microsoft 365 E5 and E7 include it. Business Premium includes Defender for Business instead, and Microsoft does not say whether discovery works there. If you have Plan 2, there is nothing to switch on. Open the Local agents tab, export the list, and compare it with your AI use policy.

What Microsoft announced

The Agent 365 team’s Ignite 2026 post says Defender and Global Secure Access "now discover more than 60 local AI agents, such as Claude Code and GitHub Copilot CLI." Discovery also covers the MCP servers those agents are configured to use. It works on managed Windows and macOS devices.

The post says: "Local agent discovery in Microsoft Defender is now generally available." Several related pieces are still in preview:

  • Network-level discovery through Global Secure Access.

  • Shadow AI discovery in the Agent 365 registry.

  • Entra Agent ID for local agents, starting with GitHub Copilot CLI and Claude Code.

  • Purview data loss prevention for local agents, including Claude Code, Claude Desktop and GitHub Copilot CLI.

  • Intune controls that mark devices with unapproved agents as noncompliant.

We sorted the rest of the Ignite news by license in our Microsoft Ignite 2026 guide for small organizations.

Which license Defender AI agent discovery needs

This is the part small IT teams need to check first. Microsoft Learn’s Discover local AI agents page is direct: "Microsoft Defender for Endpoint Plan 2 is the minimum license for local AI agent discovery." The same page says Microsoft 365 E5 and E7 both include Plan 2.

Capability License Microsoft Learn names Status as of Nov 20, 2026
Agent inventory, MCP servers, advanced hunting Defender for Endpoint Plan 2 Generally available
Risk level, risk indicators, recommendations Microsoft 365 E7, or Agent 365 with Plan 2 Listed on the same page
Runtime protection (Audit or Block) Plan 2, Microsoft 365 E5, Agent 365 or E7 GA per Microsoft’s post; Learn still says preview
Local agents page in the Microsoft 365 admin center Microsoft 365 E3, plus Intune and Frontier opt-in Public preview

Business Premium is unconfirmed. Microsoft’s Defender for Business overview says "Business Premium includes Defender for Business." It describes Defender for Business as Plan 1 features plus "some features" from Plan 2. Its comparison table marks advanced hunting for Plan 2 only. None of the pages we read say whether Defender AI agent discovery reaches Defender for Business tenants. Until Microsoft says so, assume it does not, and check your own portal.

One route for Business Premium tenants is Microsoft’s Defender Suite add-on, which includes Defender for Endpoint Plan 2. Microsoft’s September 2025 announcement priced it at $10 per user per month, capped at 300 seats. The same post warns that Defender for Business "does not support mixed licensing." Confirm the current price and that caveat with your reseller before buying.

What Defender AI agent discovery finds

Microsoft’s local agent discovery overview says Defender counts "a combination of a user, a device, and an agent type" as one agent. So Claude Code used in 15 project folders by one person on one laptop shows up once.

The AI agent support matrix lists command-line agents, desktop apps, agentic IDEs and VS Code extensions. Names include Claude Code, Claude Desktop, Codex CLI, Cursor, Gemini CLI, GitHub Copilot CLI, Windsurf, Ollama Desktop, LM Studio and OpenClaw. Some VS Code extension entries on macOS are still marked preview.

For each entry, the Local agents list shows:

  • Agent name and version.

  • Device name and operating system.

  • The user account.

  • Counts of remote MCP servers and local MCP servers.

  • When Defender first saw it.

The details pane adds the MCP server names, types and endpoints. It also shows two settings worth your attention: whether the agent auto-approves actions, and whether it runs from a trusted host process.

Microsoft is careful about limits. The overview says: "An inventory entry isn’t proof of active use or successful access to an AI service." It also says discovery "isn’t a complete inventory of installed software." Treat the list as a strong lead, not an audit.

How to turn it on and where to look

There is no switch. Microsoft Learn says you need no extra deployment, configuration or scripts beyond these prerequisites:

  1. A commercial cloud tenant. Sovereign and national clouds are not supported.

  2. Defender for Endpoint Plan 2.

  3. Devices onboarded to Defender for Endpoint.

  4. Microsoft Defender Antivirus in active mode with real-time protection. MCP server discovery needs this. Some VS Code extension entries do not.

  5. Windows devices on Defender Antivirus platform 4.18.26090.9 or later. Macs on Defender for Endpoint 101.26072.0017 or later.

To view the list, sign in to the Microsoft Defender portal. Go to Assets, then AI agents, then the Local agents tab. Viewers need the Security data basics read permission with Security for AI as a data source.

If you use advanced hunting, the data sits in the AgentsInfo table. Filter it on the LocalAgents platform. Microsoft’s page includes sample queries, including one for agents set to auto-approve.

How a small IT team should use the inventory

Defender AI agent discovery is most useful as the start of a conversation with staff. Here is a simple order of work.

1. Export the list and sort by agent. Count devices per agent. Two or three tools usually cover most installs.

2. Compare it with your AI use policy. Mark each agent as approved, allowed with conditions, or not allowed. If you do not have a policy yet, our guide on how to write an AI use policy has a short template.

3. Review every MCP server. Each one gives an agent a path into another system. Look at the remote endpoints. Look at the commands that start local servers. Ask the owner what each one is for. Our MCP explainer covers how these connections work.

4. Flag auto-approve first. An agent that approves its own actions on a laptop with admin rights is your highest risk. Talk to that user this week.

5. Look for keys and secrets. Coding agents often sit next to API keys. Check for the leak patterns in our post on Claude Code’s settings.local.json. If staff run their own AI gateway, read our checklist on exposed AI gateways and API keys.

6. Repeat monthly. New tools show up fast. Put a recurring reminder on the calendar.

Blocking is still limited. Microsoft’s Local agents admin page, updated October 23, lists blocking as not available for Claude Code, Cursor and Codex CLI. Blocking applies only to Intune-managed Windows devices. For now, the inventory is mainly for policy and conversation, not enforcement.

Runtime protection: a separate setting

Discovery only lists agents. Runtime protection watches them. Microsoft’s post says Defender runtime protection for local agents is generally available on Windows. Microsoft Learn’s setup page still carries a preview label as of its November 17 update.

It runs in Audit or Block mode. Microsoft recommends Audit on a few devices for one to two weeks before Block. You set it with an Intune antivirus profile named "Microsoft Defender AI agent runtime protection," or with the AiAgentProtection PowerShell setting on one machine.

Two cautions from Microsoft’s page. Prompt snippets in alerts are not redacted, so secrets can show up there. And in Block mode, Claude Code "might continue processing a tool response despite a reported post-tool-response block."

How Anthropic, Google and OpenAI handle unmanaged AI

The other platforms are adding similar controls from their side. Anthropic’s November 5 post lets Claude Enterprise admins block personal accounts in Claude Desktop on managed computers. It also lets Team and Enterprise admins run their own EDR sensor inside the Cowork virtual machine, in beta. We covered both in Claude Enterprise security controls. Google’s November 10 Workspace update lets admins turn off Gemini skills by domain, organizational unit or group. OpenAI’s dots admin article lets workspace admins limit dots by custom role. None of these find agents a person installed on their own. Defender AI agent discovery works on the device itself.

Frequently Asked Questions

What is Defender AI agent discovery?

It is a Microsoft Defender for Endpoint feature that lists local AI agents and their configured MCP servers on onboarded Windows and macOS devices. Each entry is tied to a device and a user.

Is Defender AI agent discovery generally available?

Yes. Microsoft’s Agent 365 post of November 17, 2026, says local agent discovery in Defender is generally available. Network discovery, shadow AI discovery and Intune controls are in preview.

Which license does Defender AI agent discovery need?

Microsoft Learn says Defender for Endpoint Plan 2 is the minimum. Microsoft 365 E5 and E7 include Plan 2.

Does Microsoft 365 Business Premium include it?

Unconfirmed. Business Premium includes Defender for Business, which has some Plan 2 features. Microsoft does not say whether agent discovery is one of them.

Which agents does it find?

Microsoft says more than 60. Its support matrix includes Claude Code, Claude Desktop, Codex CLI, Cursor, Gemini CLI, GitHub Copilot CLI, Windsurf, Ollama Desktop, LM Studio, OpenClaw and several VS Code extensions.

Do I need to turn anything on?

No. Once devices meet the prerequisites, including Plan 2, onboarding and Defender Antivirus in active mode, agents appear under Assets, AI agents, Local agents.

Does it show what the agent did?

No. Microsoft says an inventory entry is not proof of active use. Runtime protection, a separate setting, inspects and can block agent actions on Windows.

Can I block Claude Code from the admin center?

Not as of Microsoft’s October 23 Local agents page, which lists blocking as not available for Claude Code. Blocking works only on Intune-managed Windows devices.

Does Defender AI agent discovery work on Linux?

Discovery covers Windows and macOS. The support matrix lists a preview for some agents in Windows Subsystem for Linux.

What should I do with the list?

Compare it with your AI use policy, review every MCP server, check agents set to auto-approve, look for exposed keys, and repeat the review monthly.

Digital Matters

Security Desk