Shadow MCP Servers: Security Risks and How to Prevent Them Posted in Strategy Janet Wagner November 19, 2026 It’s been nearly two years since Model Context Protocol (MCP) was introduced by Anthropic. MCP is an open standard for connecting large language models (LLMs) and AI agents to external tools and data. MCP continues to gain traction with teams wanting to build AI applications, particularly AI agents. A recent survey by Stacklok found that nearly half of software companies currently use MCP in production, with 19% in broad production use. An independent researcher writing for Bloomberry found that the number of publicly reachable, company-operated MCP Servers had grown from 425 at the end of August 2025 to 1,412 by February 2026 — a 232% increase. As more companies deploy AI agents, they face a new governance problem: shadow MCP servers. Most AI agents need access to external tools and data to complete various tasks, and many developers use MCP to provide it. However, not all MCP servers, or the AI agents that use them, are company-approved or even known to exist. This article looks at what shadow MCP servers are, the risks they pose for organizations, and how to prevent them. What Are Shadow MCP Servers? A shadow MCP server is an unauthorized or ungoverned deployment of an MCP server that operates without full visibility by teams responsible for identity, access, or security. Shadow MCP servers are listed in the OWASP MCP Top 10 (MCP09:2025) as a security risk because they are often deployed with no credentials or default credentials and flawed configurations. Like Shadow IT, individuals or teams spin up instances outside the normal workflow or governance process. These instances typically run with the permissions of their host accounts, which may be overly broad. These servers are usually absent from asset inventories, so they tend to fall outside governance or monitoring, making them an attractive target for attackers. Key Risks of Shadow MCP Servers These hidden servers create risks for organizations building AI applications that rely on them. Three key risks are: 1. Flawed Configurations Unauthorized MCP servers often have configurations that don’t follow industry best practices. For example, credentials may be placed directly in configuration files, often in plaintext, as opposed to secure authentication mechanisms. If these plaintext files with credentials are accidentally copied to a public Git repository, anyone with access to the repository can read them. Consider this hypothetical scenario. A team creates an MCP server with a tool that has an endpoint that generates security incident reports involving company operations. The endpoint has no access scopes configured — credentials are stored in plaintext configuration files. This flawed configuration creates a doorway for hackers to see and take advantage of sensitive data. The lack of access scopes also means those stolen credentials grant broad access. Hackers could use those credentials to access company systems and deploy ransomware that disrupts operations. A recent GitGuardian study of Public GitHub identified 24,008 unique secrets exposed in configuration files related to MCP. This number includes 2,117 unique valid credentials, such as Google API keys, PostgreSQL database connection strings, and Firecrawl API keys. It should be noted that many of these files appear to be developers’ own MCP setups committed to public repositories. The study notes that popular MCP setup guides often recommend storing API keys directly in configuration files, making them a prime target for hackers. 2. Expanded Attack Surface LLMs decide which MCP server tools to call based on their descriptions and the context of each task. Many of these tools are powered by multiple APIs (internal and third-party) and introduce new AI-driven workflows, further expanding the surface area attackers can target. Unauthorized and unmonitored APIs, referred to as Shadow APIs, often contain undocumented endpoints that may be vulnerable to various attacks. In the context of AI agents, attacks can include prompt injections, which can trick agents into misusing tools, and remote code execution through vulnerable endpoints, which can lead to data breaches. Let’s say an application development team created an experimental autonomous AI agent to automatically read incoming customer emails and draft replies. The agent reads email through an unofficial MCP server tool that calls an unapproved internal API. It automatically sends email to external recipients using a different server tool, also unauthorized, calling an unapproved third-party API. An attacker could send an email with hidden instructions in a PDF attachment that indirectly prompts the agent to search the mailbox for account details and then send that data in its reply to an external address. Another scenario could be that an MCP server tool exposes the undocumented endpoint of an API that was never approved or monitored. The endpoint passes user input into a system command without proper validation. An attacker uses this vulnerability to run commands on the server hosting the agent. From there they can read the environment variables, which often hold API keys and database credentials, and use those credentials to reach other systems. Every MCP server adds to the attack surface, but ungoverned ones are more dangerous because they bring shadow APIs and unlogged tool calls that security teams can’t see or monitor. 3. Data Exposure Shadow MCP servers can have access to sensitive data that could be exfiltrated to unauthorized users. Also, many of them often begin and end as experiments, never moving into official production. Consider this hypothetical example. A team developing an ecommerce AI agent needs to create a demo for a conference they are attending in a week. Pressed for time, they spin up an MCP server with barely any configuration — no authentication, weak default admin password, and access via public internet. Once the conference is over, the team forgets about the demo and the MCP server running it. Fast forward a year later, a hacker discovers and then gains access to this forgotten server. The whole time the server was exposing credentials for several company internal databases. The hacker takes advantage of this hidden security vulnerability and exfiltrates sensitive customer data to a remote server and later sells the data on a dark web marketplace. The same independent study referenced earlier found that 38.7% of the company-operated MCP servers where the researcher could determine the authentication method had no authentication. “Anyone could connect, initialize a session, and enumerate every tool available — no credentials required,” Bloomberry’s author explains. The author notes that some of these servers may be development or staging environments where the developers haven’t added authentication yet. Servers like this are easily forgotten, becoming an unknown service that attackers can find and use for harmful purposes. Prevention Approaches What can organizations do to prevent shadow MCP servers from occurring or mitigate the risks if they already exist? Here are a few tips: Enable discovery: Implement an automated scanning system for uncovering unauthorized or ungoverned MCP servers and underlying APIs. Scan across all cloud environments, subnets, and networks. Establish ownership: Map all servers to a human or service owner. Check that each has an approved business purpose and a defined lifecycle, including sunsetting when the server is no longer needed. Automatically block any server installation on cloud or managed infrastructure that does not have a designated owner or attempts to bypass official approval. Enforce policies: Create policies regarding the implementation and governance of MCP servers and the APIs they rely on. Install an automated system for enforcing these policies, one with mandatory tags like mcp-server-approved and owner on all compute resources. Tags should be enforced through policies, such as cloud tag policies that block untagged resources, and checked against the registry rather than trusted on their own. Establish governance: Create a centralized governance process where all MCP servers must be registered, approved, and governed. Any MCP server that is unregistered and unauthorized should fail to deploy when attempted. All MCP servers must also undergo a risk assessment. Enable monitoring: Implement continuous monitoring to help identify unauthorized MCP-related API traffic from unknown hosts or services running on unusual ports. Review services running on development ports such as 8000 or 8080, which can indicate unapproved servers. Define configurations: Create templates that define baseline MCP server configurations based on security best practices. Remote MCP servers must require authentication and authorization, and local servers should supply credentials through secure environment configuration rather than hard-coded values. Unauthenticated tool calls should be disabled by default, and rate limits for APIs and LLM tokens should also be enforced. Following these recommendations will help you discover shadow MCP servers and prevent new ones. Baljeet Malhotra of TeejLab Inc. spoke at the Nordic APIs Summit 2026 about the key risks of shadow MCP servers and how to build a practical framework for discovering and securing them. AI Agents Need Authorized and Secure MCP Servers Shadow MCP servers are a predictable result of how quickly teams are adopting MCP. Teams turn to this protocol because it gives AI agents access to the tools and data they need to complete tasks for human users, and in some cases, other agents. The risks covered here — flawed configurations, expanded attack surface, and data exposure — all trace back to a critical gap: that organizations do not know what MCP servers they have. Teams need to close that gap through discovery, clear ownership, governance, proper configuration, and continuous monitoring. These steps will help them secure existing shadow MCP servers and prevent new ones from slipping through. Teams that start by inventorying every MCP server will be better positioned to build secure and reliable AI agents. AI Summary This article explains what shadow MCP servers are, the security risks they create for organizations adopting AI agents, and the practical steps teams can take to discover and prevent them. Shadow MCP servers are unauthorized or ungoverned Model Context Protocol (MCP) deployments that operate outside the visibility of identity, access, and security teams, and they appear as MCP09 in the OWASP MCP Top 10. Flawed configurations, such as credentials stored in plaintext configuration files and missing access scopes, can expose secrets and grant attackers broad access to company systems. Shadow MCP servers expand the attack surface by connecting AI agents to shadow APIs and unlogged tool calls, opening the door to prompt injection and remote code execution. Forgotten experimental or demo servers often lack authentication and can expose sensitive data long after teams stop using them. Prevention depends on automated discovery, clear ownership, enforced policies, centralized governance and registration, continuous monitoring, and secure baseline configurations that require authentication and authorization. Intended for API architects, security teams, platform engineers, and AI developers building or governing MCP servers and agent integrations. The latest API insights straight to your inbox