The rapid rise of Large Language Models (LLMs) has created a new architectural bottleneck: the integration gap. While models like Claude, GPT-4, and Gemini are increasingly capable, they remain isolated from the proprietary data and specialized tools that reside within enterprise firewalls. The Model Context Protocol (MCP) emerged as the industry’s answer to this problem, quickly earning the moniker “the USB-C of AI.” By providing a standardized, open-source interface, MCP allows any AI client to connect seamlessly to any data source—be it a Google Drive, a PostgreSQL database, or a local filesystem.

However, this unprecedented convenience has come at a steep price. In our rush to build “agentic” workflows, we have prioritized interoperability over integrity. The current MCP ecosystem is characterized by a “move fast and break things” mentality that has left a massive security vacuum. Recent empirical scans of public MCP server indices reveal a landscape rife with unvetted code, exposed infrastructure, and critical governance blind spots. We are essentially plugging unverified “USB devices” into the heart of our corporate data environments without a basic antivirus scan. As we move toward more autonomous AI agents, securing this bridge is no longer an optional architectural enhancement; it is a prerequisite for enterprise survival.

Anatomy of the Model Context Protocol: How It Works

To understand the security risks, we must first understand the protocol’s mechanics. MCP operates on a Client-Server-Model architecture. In this ecosystem, the “Client” is typically an AI application (like Claude Desktop or a custom-built agent) that wants to access external information. The “Server” is a lightweight connector that exposes specific capabilities to that client.

The protocol defines three primary primitives that servers can expose:

  1. Resources: Static or dynamic data that the model can read (e.g., log files, API documentation, or database schemas).
  2. Prompts: Pre-defined templates that guide the LLM’s interaction with the server, often used to standardize common tasks.
  3. Tools: Executable functions that allow the AI to perform actions in the real world, such as sending an email, querying a database, or modifying a file.

Communication and Transport

MCP primarily relies on JSON-RPC 2.0 for messaging. The transport layer is flexible, supporting both stdio (standard input/output) for local processes and HTTP/SSE (Server-Sent Events) for remote connections.

// Example of an MCP Tool Call Request
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "name": "query_customer_db",
    "arguments": {
      "customer_id": "12345"
    }
  },
  "id": 1
}

While local stdio connections are relatively contained, the rise of remote MCP servers has introduced significant complexity. Developers often use tunneling services like ngrok to expose local development servers to the cloud-based LLM providers. This creates a direct, often unmonitored path from a public endpoint into a developer’s local machine or an internal staging environment. When an AI agent invokes a tool, it isn’t just “talking” to the server; it is triggering code execution that can have side effects across the entire network.

The Numbers Don’t Lie: A Security Analysis of 15,000+ Public MCP Servers

The scale of the MCP adoption is impressive, but the lack of governance is alarming. A recent security analysis of publicly indexed MCP servers provides a data-driven look at the current state of the ecosystem. By scanning public repositories and community indices, researchers identified 15,465 publicly indexed MCP servers. After deduplication and verification, this number reduced to 5,095 unique hostnames.

The findings highlight three critical areas of concern: data residency, infrastructure stability, and the lack of automated vetting.

Data Residency and Jurisdictional Risk

One of the most significant findings involves where these servers are physically hosted. In an era of strict GDPR and CCPA compliance, data residency is a top-tier security concern. However, the analysis found that 15.6% of analyzed MCP hostnames resolve to infrastructure outside the United States.

For enterprises in regulated industries, this is a non-starter. If an AI agent is configured to use a “community-contributed” MCP server for summarizing documents, and that server is hosted in a jurisdiction with lax data protection laws, the enterprise has effectively bypassed its own data egress controls. The “USB-C” convenience makes it trivial for a developer to pull in a remote server without realizing that their proprietary data is now being routed through a third-party server in a high-risk region.

The Danger of Dangling Domains

Perhaps more alarming is the discovery of “dangling domains.” The scan identified that 2.3% of indexed MCP servers sit on expired domains.

In the world of traditional web security, an expired domain is a prime target for hijacking. In the context of MCP, it is a backdoor waiting to be opened. An attacker can purchase an expired domain that was previously a trusted MCP server endpoint. Any AI agent still configured to call that endpoint will now be sending its data—and its tool execution requests—directly to the attacker. This is not a theoretical risk; it is a known vector for supply chain compromise.

Comparison: Managed vs. Community MCP Servers

Feature Managed/Enterprise MCP Community/Public MCP
Vetting Internal Security Review None (User-vetted)
Hosting Private Cloud / VPC Public Internet / ngrok tunnels
Data Residency Controlled / Defined Unpredictable (15.6% non-US)
Auth Mechanism IAM / OAuth / mTLS Often None or Hardcoded Keys
Updates Centralized Patching Ad-hoc / Abandoned (2.3% expired)

Vectors of Compromise: Supply Chain and Execution Risks

The MCP security crisis is not just about where servers are hosted; it’s about what the code inside them actually does. Because MCP servers are essentially small applications, they inherit all the vulnerabilities of the modern software supply chain.

The Marketplace Blind Spot

Currently, MCP community marketplaces lack automated security scanners. Unlike the GitHub Marketplace or the VS Code Extension Marketplace, which have (varying levels of) automated malware detection and vulnerability scanning, MCP server registries are largely “wild west” environments. A developer looking for a “Jira Integration” might find five different MCP servers on GitHub. Without a standardized way to vet these servers, the developer is forced to manually audit the source code—a task that is often skipped in favor of speed.

This creates a massive opening for supply chain propagation. If a popular MCP server is compromised—either through a direct hack of the maintainer’s account or through a malicious pull request—the compromise can spread to every enterprise using that server. For more on how to manage these types of dependencies, see our guide on Dependabot default cooldown policies, which discusses the nuances of automated dependency management.

Indirect Prompt Injection and Tool Hijacking

MCP servers act as a bridge, but they also act as a filter. When an AI agent reads a resource from an MCP server, it is consuming data that could be malicious. If an MCP server is tasked with reading external websites or unverified emails, it can become a vector for Indirect Prompt Injection.

An attacker could place a malicious instruction inside a document that the MCP server reads. When the LLM processes that document via the MCP resource, it might follow the hidden instructions to exfiltrate data or execute a tool with malicious parameters. This is particularly dangerous in “agentic” systems where the AI has the authority to perform actions without human-in-the-loop approval. We have previously detailed how these vulnerabilities manifest in enterprise environments in our analysis of Microsoft 365 Copilot indirect prompt propagation.

“The risk isn’t just that the MCP server is malicious; it’s that the MCP server is a gullible middleman. If the server fetches data that contains instructions for the LLM, the entire security model of the agent collapses.”

Furthermore, as agents become more autonomous, the risk of data exfiltration through these connectors increases. We’ve explored the broader implications of these leaks in our deep dive on AI agent security model exfiltration leaks.

Securing the Bridge: Hardening Your Enterprise MCP Deployment

Securing MCP requires a shift from a “plug-and-play” mindset to a Zero Trust architecture. Engineering teams must treat every MCP server—even those developed internally—as a potential threat vector.

Strict Origin Verification and Cryptographic Signing

The most immediate fix for the “dangling domain” and hijacking risk is the implementation of cryptographic signing. Every MCP server should have a verifiable identity.

  1. Code Signing: Enterprises should only allow the execution of MCP servers that are signed by a trusted internal CA or a verified third-party provider.
  2. Origin Verification: Clients must verify the identity of the server before establishing a connection. This can be achieved through mTLS (Mutual TLS) for remote servers or by verifying the checksum of the local binary for stdio servers.

Enforcing Zero Trust and Network Segmentation

MCP servers should never have unfettered access to the network. Instead, they should operate within a strictly defined sandbox.

  • Filesystem Scoping: If an MCP server needs to read files, it should be restricted to a specific directory using OS-level constructs (like chroot or Docker volumes). It should never have access to the root directory or sensitive configuration files.
  • Database IAM: MCP servers should use dedicated service accounts with the principle of least privilege. If a tool only needs to read customer names, the service account should not have DELETE or UPDATE permissions.
  • Egress Filtering: Remote MCP servers should be monitored for unusual outbound traffic. If a “Salesforce MCP Server” suddenly starts sending data to an unknown IP address in a different country, it should be automatically throttled.

Auditing Local Server Configurations

For developers using local MCP servers via stdio, the configuration file (often claude_desktop_config.json or similar) is the primary target.

// Example of a Hardened MCP Configuration
{
  "mcpServers": {
    "secure-local-tool": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "--network=none", // No network access for local processing
        "-v", "/path/to/safe/data:/data:ro", // Read-only mount
        "my-trusted-mcp-image"
      ]
    }
  }
}

By wrapping the MCP server in a container with disabled networking and read-only mounts, you significantly reduce the blast radius of a potential compromise. For teams building their own testing frameworks, using an AI agent harness for prompt injection testing is a critical step in the CI/CD pipeline.

The Road Ahead: Building a Resilient Ecosystem

The Model Context Protocol is a massive step forward for AI interoperability, but its current “Wild West” state is unsustainable. To prevent a catastrophic supply chain failure, the industry must move toward a more mature governance model.

The future of MCP security lies in centralized, vetted registries. We need the equivalent of a “Verified Publisher” program for MCP servers. This would involve:

  • Automated Scanning: Every server submitted to a public registry should undergo static and dynamic analysis to detect hardcoded credentials, malicious network calls, and known vulnerabilities.
  • Standardized Security Manifests: MCP servers should include a security.json file that explicitly declares what resources it accesses, what network permissions it requires, and where its data is hosted.
  • Community Vetting and Reporting: A robust mechanism for reporting hijacked domains or malicious updates, similar to how the NPM ecosystem handles security advisories.

For security leaders and AI architects, the message is clear: the convenience of the “USB-C of AI” is a trap if it isn’t backed by rigorous security standards. As we integrate LLMs deeper into our business logic, the connectors we choose will determine the integrity of our entire AI stack. We must build the guardrails now, before the first major “MCP-native” breach forces our hand. The goal is not to slow down development, but to ensure that when we plug in our AI agents, we aren’t inadvertently powering up a Trojan horse.