Shadow IT discovery for AI agents and MCP servers needs five layers running together. Looking at network traffic alone catches less than half the exposure. A complete sweep must cover endpoints, browsers, code repositories, and sanctioned SaaS as well, then feed what it finds into ongoing ownership and access controls.
Why AI agents have made shadow IT structurally invisible to conventional tools
Previously, a shadow AI problem looked like a browser tab with an AI chatbot. In 2026, it can be an autonomous agent holding credentials on a developer laptop, connected to production systems through MCP. A passive application waits for someone to give it data, while an agent can read email, summarize a contract, and email a counterparty without a human in the loop.
That changes both the risk and the evidence. Agents initiate connections, execute code, and keep credentials, so discovery must find what can act and where employees send information. Traditional DLP that looks for file transfers can miss data that leaves inside a prompt. Qualys TotalAI’s 2026 analysis describes MCP servers as the wiring between agents and enterprise applications, often with no organizational visibility into their location or exposure. Because a server can bridge several agents and downstream systems, one compromised bridge can affect every agent connected to it.
The governance gap that makes this urgent now
The Ruflo MCP bridge flaw in July 2026 showed what happens during an incident when a server is missing from the inventory. The flaw let unauthenticated attackers run commands and poison AI memory through a server most organizations would never have inventoried. The maintainer patched quickly after disclosure. But a patch does not identify its audience. Only teams that already knew the server existed could know they were exposed and act on that knowledge.
The underlying gap is more than a missing application name. The Qualys analysis describes MCP servers as a new privileged execution tier, where existing weaknesses become easier to trigger and can spread as insecure reference patterns are copied. An inventory that records an approved agent but not its attached servers leaves that tier unaccounted for. Agents can also keep access credentials after the task that created them ends. Quarterly discovery is too slow for systems that act at machine speed, because the record can lose touch with both what is running and what still has access.
Why network traffic alone catches less than half the exposure
Network egress shows which AI providers are contacted, while OAuth grants show what access is tied to corporate identities. Verification emails can show who signed up, and expense claims can show what was bought. Browser sessions expose extensions and pasted content. Local processes show which agents and MCP servers are running, while machine-to-machine connections show integrations where there is no interactive user to watch.
These traces do not substitute for one another. An MCP server exposing an internal database or ticketing system may produce no interactive traffic visible to a CASB. An AI feature inside approved SaaS uses a network path that is already accepted. Logging the network connection alone does not show that either is an unauthorized integration.
Production code creates an especially misleading signal. An embedded LLM call can use legitimate credentials and normal corporate egress, making it look like a sanctioned API call. The request is visible, but its unreviewed purpose is not. Static code analysis must show the dependency and which data goes into prompts. The five-layer method follows from those gaps, with each layer answering questions the others cannot.
Layer 1 — Network telemetry: catching traffic to AI provider endpoints
Network telemetry is the broadest and fastest starting point. Traffic to known AI provider APIs and model endpoints can show which employees use which external services, how often they connect, and how much data they send. Inline tools can observe requests from managed devices across applications on the paths they cover. That gives security teams useful initial awareness. It does not establish that every agent or integration has been found.
To put that visibility to work, build an allowlist of approved AI service domains at the DNS or proxy layer. Alert on first-seen connections to provider domains outside that list, and use volume and off-hours timing as anomaly signals. Thousands of API calls at 2 a.m. warrant a different review from ordinary interactive use. Cloudflare Gateway documents detection and blocking of MCP traffic patterns, including calls that bypass approved portals. Cisco AI Defense provides an MCP gateway function to address agent connections that traditional Zero Trust architectures do not natively cover.
Those controls still need a network path they can see. They cannot inventory local processes that never use it, identify unreviewed code from legitimate credentials alone, or audit AI behavior inside approved SaaS. Endpoint and browser evidence fill different gaps.
Layer 2 — Endpoint discovery: finding agents and MCP servers running on workstations
Endpoint discovery starts with what is running inside. It surfaces workstation agents, MCP server processes, persistent memory or experience replay buffers, and skills or plugins installed from community marketplaces. Open-source agent runtimes spread rapidly in 2025–2026, bringing broad endpoint access and connections to external LLM providers and internal MCP servers. Standard EDR does not show the whole attack surface that needs to be checked. A process inventory needs to account for the agent’s executable, tools and access.
To build that picture, scan for MCP configuration files in home directory dotfiles, project configurations, and environment variable files. Alert on processes with persistent outbound connections to AI provider domains. Flag processes that hold tokens for more than one downstream service. Those checks connect software presence to the access it holds. The TotalAI framework brings host-level discovery together with views of the network and supply chain so that the inventory can help teams assess security.
Microsoft Agent 365 became generally available on May 1, 2026, with Shadow AI Discovery using Defender and Intune as a central capability. Microsoft’s guidance puts discovery before change review and DLP enforcement. An approved agent connected to an unvetted MCP server is still a shadow AI problem, even if the application inventory shows an approved name. The approval does not extend automatically to every plugin, skill, or server the agent can use.
Layer 3 — Browser monitoring: surfacing SaaS AI tool sessions employees don't report
Employees can use personal accounts or free tiers without leaving a corporate OAuth grant or a record of what they spent. Network logs may show the destination, but not the identity or content that distinguishes the session. Browser-level evidence can expose AI extensions and content pasted into chat interfaces. Verification emails and password resets sent to work addresses provide further sign-up evidence.
Microsoft Defender for Cloud Apps uses App Governance to surface grants registered in Microsoft Entra ID, Google Workspace, and Salesforce, complementing traffic-log analysis. For operational coverage, deploy browser visibility tooling or managed browser policy to capture AI-related extensions and session activity, and audit identity-provider OAuth grants quarterly. Use DNS-layer policy to redirect unrecognized AI domains to a sanctioned alternative. Blocking without an alternative pushes use underground, reducing the evidence available without removing the demand.
Layer 4 — Code repository scanning: finding embedded LLM calls that look like sanctioned traffic
Embedded LLM calls use legitimate credentials and normal egress paths, so other discovery layers cannot reliably tell them apart from what an approved application does. The API key may come from a secret manager. The destination may already be allowed. Neither fact proves that security or architecture teams reviewed the use. Repository scanning shifts the question from what traffic occurred to what engineers have shipped.
That distinction becomes consequential when code builds prompts from customer data, internal documents, or regulated records without logging or a retention policy. A dependency file can reveal the provider, but not the data being sent. MCP configurations are another specific target. A committed configuration pointing to an external MCP endpoint and containing an API key discloses both the integration and its credential. Finding it before production gives the team a chance to address both.
To make this a check on what gets deployed, add static analysis rules to CI/CD pipelines that look for AI provider SDK imports, known AI API domains, and MCP server initialization patterns. Require architecture review for any pull request that adds a new AI dependency. Scan committed files and environment configurations for API keys and tokens from providers. Then inspect how prompts are constructed through analysis of the code’s syntactic structure. A vendor name in requirements.txt or package.json shows a dependency, while the code shows how the data flows and what needs review.
Layer 5 — SaaS posture review: auditing AI features inside tools the organization already approved
Approved SaaS can perform unapproved AI processing. Salesforce Einstein, Microsoft 365 Copilot, Notion AI, Slack AI, and ClickUp AI illustrate why the application’s approval status is not enough. An admin-enabled feature may process corporate data under terms the security team has not reviewed for that use. The access is sanctioned, but the behavior may not be. Network monitoring cannot settle questions about what the feature processes, what it retains, or whether it can send data to a connected third-party model.
Extensions widen that gap further. A sanctioned Slack AI instance with an attached, unvetted MCP server introduces an integration that neither a network scan nor an endpoint scan will necessarily expose. SaaS posture review therefore needs to inventory enabled AI features and their MCP or plugin connections. Review data-handling terms for both the AI feature itself and the base product. Treat admin-level AI enablement as a new software procurement requiring a data processing addendum review, and audit attached integrations on the same cadence as the product.
This is both a legal and a security boundary. AI processing of HR data, financial records, or health information under terms not reviewed for AI use can constitute unauthorized processing under data protection obligations.
What to do with findings: turning a five-layer sweep into an ongoing governance posture
Classify each discovered agent and MCP server, assign ownership, scope its access, and keep it subject to certification and offboarding. Each entry needs an owner, a purpose, a permission set, and a policy. A remediation ticket alone is not enough. The inventory must stay up to date because every later decision depends on knowing what exists.
For MCP servers, use a registry-first deployment gate. No agent or server should receive credentials until it has joined the registry. Microsoft’s agent tools registry offers a registry, while enterprises need to set up the credential gate that enforces the rule. Authentication remediation should also follow the MCP specification’s requirements for protected resource metadata and rejection of tokens not issued for the specific server. Enterprise-Managed Authorization lets the corporate identity provider check admin policy at token exchange, so the enterprise can control which clients may reach which servers.
Credential cleanup must follow discovery without delay. Rotate static API keys found during the sweep, replace them with credentials that are short-lived and narrowly scoped, and remove credentials shared by unrelated agents. Keep tamper-proof, per-tool-call logs for compliance review and incident reconstruction. The NSA’s Cybersecurity Information Sheet on MCP security, published in May 2026, addresses this security domain. Logging needs to stay tied to identity and policy enforcement so that the audit trail connects to decisions about access.
Continuous endpoint scanning and real-time registry drift detection keep the baseline up to date. Enablement, control, and security need to work together, with identity attached to actions and policy enforced at tool-call depth. Detection must also address MCP-specific threats such as tool poisoning, prompt injection, and intent drift. A one-time sweep tells a team what existed on the day it ran. Governance needs to account for the agents that will be spun up next week, which makes discovery ongoing infrastructure.