All ArticlesRuntime Truth
Visibility & Shadow AI
Threat Explainer

Shadow MCP Servers: The Hidden Infrastructure Powering Unauthorized Agents

Shadow MCP servers are Model Context Protocol servers connected to AI agents without security team review, inventory, or approval.

Obsidian Editorial Team
Security Research
·
Obsidian Security
·
May 20, 2026
May 28, 2026
Key Takeaways
  • Shadow MCP servers are ungoverned MCP connections attached to AI agents by developers and business users, outside any security review process.
  • Standard posture tools see agent configuration but cannot see which MCP servers are actually connected or what tools those servers expose at runtime.
  • The OWASP MCP Top 10 formally identifies shadow MCP server sprawl as a direct amplifier of over-permissive tool access, malicious package injection, tool shadowing, and sensitive data exfiltration.
  • Detection requires looking across multiple surfaces: n8n workflow configs, Cursor project files, Copilot Studio connectors, and Bedrock agent tool configurations.
  • Governance requires a sanctioned MCP server registry, agent-to-server visibility mapping, and lifecycle policies tied to agent ownership.

What Shadow MCP Servers Are and How They Get Created

Security teams cannot govern infrastructure they do not know exists. Shadow MCP servers exist precisely because no approval process required their registration.

A shadow MCP server is any Model Context Protocol server that an AI agent connects to without having been reviewed, approved, or added to a sanctioned inventory by the security team. The MCP specification itself does not enforce security controls. Any developer, data analyst, or business user with access to an agent-building platform can attach an MCP server to a workflow in minutes. No change management ticket required. No security review triggered.

Three common origins account for most shadow MCP server sprawl.

The first origin is developer tooling. Developers using AI coding assistants configure MCP servers locally inside project directories, typically in a .cursor/mcp.json file or equivalent. These configurations grant the coding assistant access to databases, internal APIs, shell execution, and file systems. The developer installs a community MCP package, adds the connection string, and the agent starts using it. The security team has no visibility into this activity because it happens entirely outside any sanctioned platform.

The second origin is business user workflows. Platforms like n8n allow non-technical users to build automation workflows that connect to MCP servers. A marketing analyst building a lead enrichment workflow or an HR coordinator automating onboarding tasks can add an MCP server connection with no more friction than adding a new browser bookmark. These workflows often carry embedded credentials and broad API access scopes.

The third origin is community installations. The MCP ecosystem has grown rapidly, with hundreds of community-published MCP packages available for installation. These packages provide access to everything from internal Slack channels to cloud storage buckets to production databases. Users install them because they solve immediate problems. Security teams learn about them, if at all, after an incident.

Why does this proliferation continue? Because the platforms that enable it treat MCP server connections as a feature, not a risk surface. The agent builder's job is to make the agent more capable. The security team's job is to understand what that capability actually means in terms of data access and blast radius. Those two goals are not yet connected in most enterprises.

For a foundational understanding of the protocol itself and its security implications, see the complete guide to MCP security.

Why Shadow MCP Servers Are the Hidden Infrastructure Layer

Security teams know they have an AI agent problem. Most do not yet know they have an MCP infrastructure problem underneath it.

The visibility gap is structural, not accidental. Existing security tools were built to see users, applications, and network traffic. MCP server connections sit in none of those categories cleanly. They are not SaaS applications with OAuth grants that appear in an identity provider's connected apps list. They are not network endpoints that generate recognizable traffic signatures. They are configuration-level connections between an agent runtime and a tool provider, and they only become observable when an agent actually invokes a tool call at runtime.

The growth rate makes the gap worse every week. In environments where AI agent adoption is active, the number of MCP server connections is not growing linearly. One enterprise security team reported their MCP connection count in Cursor alone doubling every quarter. Each new connection represents a new tool set, a new credential surface, and a new potential blast radius expansion. The security team's inventory, if one exists at all, is stale before it is finished.

Posture tools miss shadow MCP servers for a specific reason. A posture-based tool scans configuration files and policy settings. It can tell you what an agent is theoretically configured to do. It cannot tell you which MCP servers that agent has actually connected to at runtime, what tools those servers exposed during the session, or what data moved through those tool calls. The theoretical configuration looks clean. The runtime reality is a different picture entirely. This is the core distinction between theoretical configuration and effective authority, and it is the reason MCP security vulnerabilities are so difficult to surface with static analysis alone.

The accountability gap compounds the visibility gap. When a shadow MCP server is eventually discovered, the question of who owns it rarely has a clean answer. The developer who installed the community package may have left the company. The business user who added the connection to an n8n workflow may not understand that the workflow is still running. The agent itself may be an orphaned agent whose creator account is disabled. No owner means no one to notify, no one to remediate, and no one accountable for the access that server has been providing.

Understanding how MCP authentication gaps enable unauthorized access is essential context for appreciating why shadow MCP servers carry such high inherent risk.

The Specific Risks Shadow MCP Servers Create

Shadow MCP servers do not create new attack categories. They amplify existing ones by expanding the number of poorly governed, over-privileged entry points attached to agents that are already operating with more access than they need.

Risk 1: Unauthorized Data Access

An MCP server connected to an internal database or cloud storage bucket gives any agent using that server read access to the data those systems contain. When the connection was never reviewed, no one verified that the agent's use case actually requires access to that data. A business user building a customer summary workflow may have connected an MCP server with broad CRM read permissions. Every user who invokes that agent, including users without direct CRM access, can now retrieve CRM records through the agent. This is the machine insider risk in its most direct form: the agent bypasses the access controls that govern direct human access.

Risk 2: Credential Exposure

MCP server configurations frequently contain embedded credentials. Connection strings, API keys, and service account tokens appear directly in configuration files because that is the path of least resistance for getting the server to work. When those configuration files live in developer project directories, shared workflow platforms, or community-installed packages, the credentials are exposed to anyone with access to the configuration. Hardcoded secrets in n8n workflow nodes and Cursor MCP config files represent one of the most common credential exposure vectors in agentic environments today.

Risk 3: Malicious Tool Injection

Community-published MCP packages are not subject to the same vetting process as enterprise software. A malicious actor can publish an MCP package that appears to provide legitimate functionality while also exfiltrating data, executing unauthorized commands, or establishing persistence. When a developer installs an unreviewed community package and attaches it to an agent with production access, the blast radius of a compromised package extends to everything that agent can reach. The OWASP MCP Top 10 formally identifies malicious MCP packages as a critical risk category for exactly this reason.

Risk 4: Action Chain Expansion

A single shadow MCP server rarely operates in isolation. Agents using one unreviewed MCP connection often use several. Each additional tool connection extends the action chain available to the agent and to any user who can invoke it. Action chaining is the mechanism by which an agent sequences multiple tool calls across systems, compounding access with each step. An agent that can read from a database, write to a file system, and call an external API through three separate MCP servers can execute data movement sequences that no single-tool access review would have flagged. The blast radius grows with each shadow connection added.

Risk 5: Compliance Gaps

Regulated industries require audit trails for data access. An MCP server connection that was never inventoried produces no sanctioned audit record. When a compliance audit asks which systems accessed a particular data set, the answer cannot include tool calls made through shadow MCP servers because those calls were never logged in any governed system. This is not a theoretical configuration problem. It is an evidence gap that directly undermines compliance posture for frameworks including SOC 2, HIPAA, and financial services regulations.

For a broader view of how these risks manifest across the AI agent attack surface, the AI security risks overview provides useful context.

Detection: How to Find Shadow MCP Servers in Your Environment

Knowing shadow MCP servers exist is not the same as knowing where to find them. Detection requires looking in specific places across multiple platforms, and manual discovery has hard limits.

Where to look by platform:

PlatformWhere Shadow MCP Servers HideWhat to ExamineCursorProject-level config files.cursor/mcp.json, ~/.cursor/mcp.json (global)n8nWorkflow node configurationsMCP client nodes, credential blocks, webhook trigger configsCopilot StudioConnector configurationsCustom connectors, maker mode connector authentication settingsAmazon BedrockAgent action group definitionsTool configurations, Lambda function ARNs, knowledge base connections

For Cursor environments, the starting point is the MCP configuration files in developer project directories. A search across active repositories for mcp.json files surfaces declared server connections. Each entry should be reviewed for the server endpoint, the credential used, and the tool set the server exposes. Pay particular attention to servers using filesystem, shell, or database access tools, as these carry the highest blast radius.

For n8n workflows, the MCP client node is the primary indicator. Export workflow JSON files and search for MCP client node types. Each instance represents an MCP server connection. Check the credential block associated with each node for hardcoded values versus properly managed credential references. Workflows with public webhook endpoints and MCP connections represent a compounding risk: anyone with the webhook URL can trigger the workflow and invoke the MCP tool calls.

For Copilot Studio, connector configurations are the surface to examine. Custom connectors using maker mode authentication (fixed author credentials rather than invoker credentials) represent the highest-priority finding. Any connector pointing to a domain not registered in the organization's approved application list is a shadow connection by definition.

For Amazon Bedrock, agent action group definitions specify which tools the agent can call. Review action group configurations for Lambda functions or API schemas that connect to external endpoints. Supervisor agents that forward full conversation context to sub-agents represent a specific high-risk pattern where shadow MCP connections in a sub-agent can receive data the supervisor agent was never intended to share.

The limits of manual discovery are significant. Manual review across these surfaces requires access to each platform, knowledge of each configuration format, and the time to correlate findings across systems. In an environment with dozens of active developers and hundreds of business user workflows, manual discovery produces a point-in-time snapshot that is outdated before the review is complete. It also produces no runtime evidence. A configuration file can declare an MCP server connection, but only runtime observation can tell you whether that connection was used, what tools were called, and what data was accessed.

Cross-platform visibility that correlates agent configurations with runtime tool call activity is the only approach that produces operational intelligence rather than a static list of theoretical connections.

You can also use Obsidian's free tool to discover shadow AI and GenAI apps as a starting point for understanding your current exposure.

Governance: Bringing Shadow MCP Servers Under Enterprise Control

Detection without governance produces a list of problems with no path to resolution. Enterprise MCP server governance requires three connected components: a sanctioned registry, agent-to-server visibility mapping, and lifecycle policies tied to agent ownership.

Build a sanctioned MCP server registry first. The registry is the prerequisite for all other governance activity. It should document every approved MCP server connection with the following fields: server endpoint or package identifier, the agent or workflow it is attached to, the owner responsible for it, the credential used, the tool set it exposes, and the date it was last reviewed. Any MCP server connection not present in the registry is, by definition, a shadow MCP server. The registry does not need to be sophisticated to be effective. A governed spreadsheet is better than no registry. A purpose-built inventory integrated with agent platform APIs is better than a spreadsheet.

Map agent-to-server relationships to understand effective authority. Knowing that a sanctioned MCP server exists is not the same as knowing which agents connect to it, who invokes those agents, and what data those tool calls can reach. The effective authority of an MCP server connection is the product of the server's tool set, the agent's access scope, and the identity of the users who can invoke the agent. A single MCP server with database read access attached to an org-wide accessible agent represents a different risk level than the same server attached to an agent restricted to a named user group. Mapping these relationships produces the single pane of glass that makes prioritization possible.

Implement lifecycle policies tied to agent ownership. Orphaned agents with shadow MCP server connections are among the highest-risk configurations in any environment. When an agent's creator account is disabled, the agent continues running with its inherited credentials and MCP connections intact. Lifecycle policies should require that every MCP server connection has a named owner, that ownership transfers are documented when personnel change, and that agents with disabled owner accounts are automatically flagged for review. Quarterly access reviews should include MCP server connections alongside OAuth grants and service account permissions.

The operational starting point for most teams is the inventory. Security teams that have not yet built an MCP server inventory should start there before attempting to enforce policies. You cannot govern what you cannot see. The inventory process itself often surfaces the most critical findings: shadow connections with production database access, community packages with no organizational vetting, and agent configurations that have been running unreviewed for months.

For a comprehensive view of how AI agent security governance fits into a broader enterprise security strategy, the AI security across SaaS overview provides the full framework. Teams looking to understand how shadow AI governance connects to the broader SaaS security posture should also review the shadow AI management resources available for security teams at different maturity levels.

The actionable path forward has three steps:

  1. Start with inventory. Run a discovery pass across Cursor configs, n8n workflows, Copilot Studio connectors, and Bedrock action groups. Document every MCP server connection found, sanctioned or not.
  2. Build the sanctioned registry. Establish the baseline of approved connections with named owners, reviewed tool sets, and documented credentials. Everything outside that registry is a shadow MCP server requiring remediation.
  3. Map effective authority. For each sanctioned connection, understand which agents use it, who can invoke those agents, and what data the tool calls can reach. Prioritize remediation based on the combination of access scope and agent accessibility.

Configuration is not reality. The only way to govern shadow MCP servers is to see them at runtime, correlate them with agent identity and access scope, and enforce policies based on what agents actually do, not what their configurations suggest they should do.

Frequently Asked Questions

No items found.