Shadow MCP: Find and Govern Rogue MCP Servers
Shadow MCP is the new shadow SaaS. How to find unapproved MCP servers through endpoint, egress and repo signals, tier their risk and enforce an allow-list.
On 15 April 2026, OX Security published an advisory with a deliberately loud title: "The Mother of All AI Supply Chains". The finding was simple. The official Model Context Protocol SDKs take the command from an STDIO server configuration and execute it on the host. OX estimated the reach at more than 150 million downloads and up to 200,000 vulnerable instances. A week later the Cloud Security Alliance counted at least 14 CVEs in downstream projects. Anthropic, as reported by The Register, called the behaviour expected and left sanitisation to developers.
Vulnerability or design choice, the conclusion is the same: every MCP configuration file on a developer laptop is a place where code runs, and most organisations cannot count them. This article is for CISOs, platform leads and architects. We show how to find shadow MCP, tier it and enforce an allow-list without killing the productivity that made people install the servers.
TL;DR / Key takeaways
- Shadow MCP is shadow SaaS with code execution. An unapproved server reads what the agent reads and acts with the user's permissions. A local STDIO server also runs on the endpoint.
- No single signal finds everything. Endpoint telemetry sees local servers, egress logs see remote ones, repo scans see what teams commit. Deduplicate all three into one registry.
- The registry is the control, not the scanner. One record per server, with owner, pinned version, transport, location and tier, lets you say yes quickly and no consistently.
- Enforcement now exists in the clients. GitHub Copilot (GA since August 2026) and Claude Code support managed MCP allow-lists. Match by command or URL. Names are labels users choose.
- Public registries are not vetting. OX Security found 15,465 servers across three public registries with no consistent governance signal. A listing is a pointer, not a review.
Download: Editable draw.io file · Open in diagrams.net · Chart data (CSV)
Why shadow MCP matters now
Shadow SaaS leaked data, but nothing ran inside your estate. With MCP, one line in a JSON file makes Cursor, VS Code or Claude Code start a server and call its tools. OWASP's MCP Top 10 lists "Shadow MCP Servers" as MCP09:2025 and names a central registry as the first mitigation.
The supply chain is real. JFrog disclosed CVE-2025-6514 in mcp-remote (CVSS 9.6) in July 2025. In September 2025 Koi Security found postmark-mcp, whose version 1.0.16 blind-copied every outgoing email to the attacker.
The registries are large and unvetted. The official MCP Registry launched in preview on 8 September 2025 with community moderation, not security scanning. OX Security's September 2026 study, summarised by the CSA, covered 15,465 servers in the official registry, the Cline marketplace and the GitHub MCP registry. Of 5,095 unique hostnames, 2.3% no longer resolved, and six referenced domains were unregistered and for sale. These are vendor-reported figures the CSA could not audit.
Controls finally ship. EDR products inventory agents and their MCP configurations, GitHub and Anthropic ship managed allow-lists, and the 2026-07-28 MCP specification adds Mcp-Method and Mcp-Name headers that let gateways filter without parsing bodies. Few organisations have wired these together.
The pipeline, step by step
The numbers match the callouts in the hero diagram. Steps ① to ③ find servers, ④ and ⑤ decide, ⑥ and ⑦ enforce.
① Endpoint telemetry
Local servers live in a handful of files: .mcp.json and ~/.claude.json for Claude Code, .vscode/mcp.json and the profile mcp.json for VS Code, ~/.cursor/mcp.json for Cursor, claude_desktop_config.json for Claude Desktop, ~/.codex/config.toml for Codex. A script pushed through Intune or Jamf that collects these, redacted, is a good first inventory.
If you run Microsoft Defender for Endpoint, check what you already own. Its local AI agent discovery, generally available on supported Windows and macOS devices, lists agents such as Claude Code, Cursor and GitHub Copilot with their MCP servers, including the launch command. MCP discovery needs antivirus active mode; native Linux is not covered. Whatever tool you use, capture the command, not just the name.
② Network egress
Remote servers appear in proxy and DNS logs: sessions to hosts from public MCP directories, OAuth flows to unfamiliar resources, tunnelling domains. With TLS inspection, the Mcp-Method header is a clean fingerprint. A local STDIO server produces no MCP traffic of its own.
③ Repository and configuration scan
Scan source control for MCP configuration files and launch commands such as npx -y, uvx and docker run. A pull request that adds an MCP server deserves dependency-level review, because that is what it is. Our AI coding agent security guide covers the wider workstation-to-CI picture.
④ Normalise and risk-tier
Fingerprint by what actually runs: the exact command and arguments for STDIO, the URL for remote servers. Names mean nothing; users choose them. Add owner, data reach and credentials, then score with the matrix below.
⑤ The internal MCP registry
The heart of the design: one record per server with owner, pinned version or digest, transport, hosting location, auth method, data classification, tier and status. Entries come from discovery and from self-service requests. If a request takes three weeks, shadow servers stay.
No new product is required. Azure API Center can serve the registry API GitHub Copilot expects (Microsoft's December 2025 walkthrough notes Copilot then required anonymous read access, so keep metadata non-sensitive), and a Git repository with one YAML file per server also works.
⑥ The MCP gateway for remote servers
Route remote MCP traffic through a gateway that enforces the URL allow-list, validates OAuth audience, applies per-tool policy and logs every call, for example Azure API Management. Our AI gateway pattern describes the architecture, and our MCP authorisation deep dive covers token audience and scopes.
⑦ Client policy for local STDIO servers
The gateway cannot see a process the agent starts on a laptop, so local servers need policy in the client.
- GitHub Copilot. Since 6 August 2026,
allowedMcpServersanddeniedMcpServersincopilot/managed-settings.json(in the.github-privaterepository) are GA, enforced in the Copilot app, CLI and VS Code. Registry-only mode is still in public preview. - Claude Code. An MDM-deployed
managed-mcp.jsongives a fixed server set. Alternatively,allowedMcpServerswithallowManagedMcpServersOnly: truecreates an approved catalogue users cannot broaden. Anthropic's documentation states that aserverNameentry "is not a security control"; useserverCommandandserverUrl.
When you approve a Tier 1 or 2 local server, pin the exact version and run it in a container or sandbox with restricted egress. Process isolation and egress restriction are also the CSA's short-term advice on the STDIO issue.
What the numbers say
We deliberately publish no "servers found" counts; they depend on estate size. What transfers is a way to rank what you find.
Both Tier 1 rows are local servers: they run code on the host, invisible to network controls. An unpinned npx launch adds unknown provenance, because tomorrow's version is not the one you reviewed. Pinning an internal build removes that risk but not the execution risk, so it stays in Tier 2, which is why we sandbox even our own local servers. Re-score every real server, because data reach depends on what it connects to.
Attacks came first; usable controls followed from late 2025, with GitHub's allow-list GA only in August 2026. Most policies have not caught up.
In a recent engagement…
During an AI platform review this year, a European client was sure they had "a few" MCP servers, all on a wiki list. We collected configuration files from a pilot group of laptops and scanned their main source-control organisation.
Most servers were harmless SaaS connectors. Three patterns were not: community packages launched with npx -y and no version, personal access tokens far broader than the task, and a committed .mcp.json pointing at a personal tunnelling domain left over from a hackathon.
Nobody had been reckless; the list simply had no enforcement and no fast request path. We built a registry in Git, deployed allow-lists in log-only mode, pinned and sandboxed the few local servers developers genuinely needed, and opened a fast request lane. The hardest question was who owns a server once its creator changes teams.
The decision table
Tiers come from the matrix above.
| Tier | Typical archetype | Default decision | Required controls | Review |
|---|---|---|---|---|
| T1 (score ≥ 13) | Local STDIO via npx/uvx, unpinned; local shell, file or browser server | Block until reviewed | Exact version pin, sandbox, egress restriction, named owner, serverCommand entry | Every version change |
| T2 (9–12) | Pinned internal local build; remote server, unknown operator | Approve with conditions | Sandbox for local; gateway plus OAuth for remote; no shared static secrets | Quarterly |
| T3 (5–8) | Vendor-hosted server, per-user OAuth | Standard approval | Gateway routing, least-privilege scopes, data classification, DPA | Semi-annually |
| T4 (≤ 4) | Internal remote server behind the gateway | Pre-approved catalogue | Registry entry, logging, owner | Annually |
| Any | Dead hostname, unidentified publisher, near-miss vendor name | Deny | Remove from configs, search for look-alikes | n/a |
Never allow-list by name, and pair every block with a fast request path.
Governance for European enterprises
No EU regulation names MCP. Several still make an ungoverned MCP estate an audit finding.
NIS2. Article 21(2) of Directive (EU) 2022/2555 lists asset management (point i) and supply-chain security (point d) among the minimum measures. An MCP server is both. In Germany these sit in Section 30 BSIG, applicable since 6 December 2025. See our NIS2 supply-chain guide.
DORA. Article 8 of Regulation (EU) 2022/2554 requires an ICT asset inventory, Article 28 a register of ICT third-party arrangements. A shadow MCP server is, by definition, missing from both.
GDPR. A remote MCP server receiving personal data is a processor or recipient (Articles 28 and 30, plus Chapter V outside the EU). MCP has no notion of region, so record hosting location in the registry.
A pragmatic adoption path
- Weeks 1–2: inventory. Collect configuration files, pull what your EDR already reports, scan source control. Block nothing yet.
- Weeks 3–4: registry and tiers. Fingerprint, assign owners, score. Remove dead hostnames and unknown publishers.
- Month 2: allow-lists in log-only mode. Deploy managed settings for Copilot, Claude Code and any other supported client. Watch what would be blocked and open the request lane.
- Month 3: enforce and route. Enforce allow-lists, route remote servers through the gateway, pin and sandbox approved local ones. Build internal servers to the standard in our enterprise MCP server design guide.
- Ongoing: close the loop. Feed logs, blocks and drift back into discovery; re-score on any change.
The verdict
Shadow MCP is not a reason to ban agents. It is a reason to treat MCP servers as dependencies that execute code and hold credentials. The organisations that handle it well have one registry, enforcement in client and gateway, and a request process fast enough that nobody needs a workaround.
If you do one thing this quarter, collect the configuration files and find every unpinned npx or uvx launch. If you do two, deploy a managed allow-list that matches by command and URL. The rest turns the next disclosure into a ticket rather than an incident.
If you want help, our zero-trust team runs this discovery and registry set-up as a short, fixed-scope engagement.
FAQ
What is shadow MCP?
Shadow MCP is any Model Context Protocol server running in your organisation without approval, an owner or monitoring: a community server added to a coding agent with npx, a remote endpoint picked from a public directory, or a server committed to a repository's .mcp.json. OWASP lists it as MCP09:2025 in its MCP Top 10.
Why are local STDIO MCP servers riskier than remote ones?
A local STDIO server runs on the developer's machine with that user's files and credentials, and is invisible to network controls. OX Security showed in April 2026 that the official MCP SDKs execute whatever command the configuration names. Remote servers expose data but do not run code on the endpoint.
How do we discover MCP servers that are already in use?
Combine three signals: endpoint telemetry for configured servers and agent processes (Microsoft Defender for Endpoint now inventories local AI agents and their MCP configurations on Windows and macOS), egress logs for remote MCP endpoints and tunnels, and a repository scan for committed MCP configuration files. Deduplicate all three into one registry.
Can we block unapproved MCP servers in GitHub Copilot and Claude Code?
Yes. Since August 2026 GitHub Copilot supports allowedMcpServers and deniedMcpServers in an enterprise managed-settings file, enforced in the Copilot app, Copilot CLI and VS Code. Claude Code supports a fixed set through managed-mcp.json, or an approved catalogue through allowedMcpServers with allowManagedMcpServersOnly. Match by command or URL, never by name.
Is an MCP gateway enough on its own?
No. A gateway governs remote servers that route through it. It cannot see a local STDIO server the agent starts as a child process on a laptop. You need client-side policy for local servers, the gateway for remote ones, and discovery for whatever slips past both.
Which EU regulations make shadow MCP a compliance issue?
Indirectly, several. NIS2 Article 21(2) requires asset management and supply-chain security (Section 30 BSIG in Germany). DORA Articles 8 and 28 require an ICT asset inventory and a third-party register. Under GDPR, a remote server receiving personal data needs a contract and, outside the EU, a transfer mechanism.
Sources
All sources checked on 15 November 2026. Scale figures from OX Security are the vendor's own estimates, as reported by the Cloud Security Alliance.
Tier A: primary, standards and regulatory
- OWASP MCP Top 10, MCP09:2025 Shadow MCP Servers: https://owasp.github.io/www-project-mcp-top-10/2025/MCP09-2025%E2%80%93Shadow-MCP-Servers
- MCP blog, 2026-07-28 specification release: https://blog.modelcontextprotocol.io/posts/2026-07-28/
- MCP blog, introducing the MCP Registry (8 Sep 2025): https://blog.modelcontextprotocol.io/posts/2025-09-08-mcp-registry-preview/
- MCP blog, MCP joins the Agentic AI Foundation (9 Dec 2025): https://blog.modelcontextprotocol.io/posts/2025-12-09-mcp-joins-agentic-ai-foundation/
- NVD, CVE-2025-6514 (mcp-remote): https://nvd.nist.gov/vuln/detail/CVE-2025-6514
- GitHub changelog, MCP allowlists in enterprise managed settings (Aug 2026): https://github.blog/changelog/2026-08-07-mcp-allowlists-in-enterprise-managed-settings
- GitHub changelog, internal MCP registry and allowlist controls for VS Code Stable (Nov 2025): https://github.blog/changelog/2025-11-18-internal-mcp-registry-and-allowlist-controls-for-vs-code-stable-in-public-preview/
- Anthropic, Claude Code documentation, control MCP server access: https://code.claude.com/docs/en/managed-mcp
- Microsoft Learn, local AI agent discovery with Defender for Endpoint: https://learn.microsoft.com/en-us/defender-endpoint/local-agent-discovery-overview
- Microsoft Learn, Defender for Endpoint AI agent support matrix: https://learn.microsoft.com/en-us/defender-endpoint/ai-agent-support-matrix
- Directive (EU) 2022/2555 (NIS2), Article 21: https://eur-lex.europa.eu/eli/dir/2022/2555/oj/eng
- Regulation (EU) 2022/2554 (DORA), Articles 8 and 28: https://eur-lex.europa.eu/eli/reg/2022/2554/oj/eng
- Regulation (EU) 2016/679 (GDPR): https://eur-lex.europa.eu/eli/reg/2016/679/oj/eng
Tier B: research and analysis
- Cloud Security Alliance, research note on the MCP STDIO design flaw (23 Apr 2026): https://labs.cloudsecurityalliance.org/research/csa-research-note-mcp-rce-design-vulnerability-20260423-csa/
- Cloud Security Alliance, research note on OX's MCP marketplace governance study (7 Oct 2026): https://labs.cloudsecurityalliance.org/research/csa-research-note-mcp-marketplace-governance-ox-20261007-csa/
- OX Security, "The Mother of All AI Supply Chains" (15 Apr 2026): https://www.ox.security/blog/the-mother-of-all-ai-supply-chains-critical-systemic-vulnerability-at-the-core-of-the-mcp
- Invariant Labs, MCP security notification: tool poisoning attacks (1 Apr 2025): https://invariantlabs.ai/blog/mcp-security-notification
- JFrog, CVE-2025-6514 critical mcp-remote RCE: https://jfrog.com/blog/2025-6514-critical-mcp-remote-rce-vulnerability/
Tier C: vendor and news, directional
- Microsoft All Things Azure, private MCP registry on Azure API Center enforced in GitHub Copilot (Dec 2025): https://devblogs.microsoft.com/all-things-azure/locking-down-mcp-create-a-private-registry-on-azure-api-center-and-enforce-it-in-github-copilot-and-vs-code/
- Microsoft Learn, MCP servers in Azure API Management: https://learn.microsoft.com/en-us/azure/api-management/mcp-server-overview
- The Hacker News, first malicious MCP server found, reporting Koi Security's discovery (Sep 2025): https://thehackernews.com/2025/09/first-malicious-mcp-server-found.html
Topics