The Model Context Protocol (MCP) standardizes how AI agents interact with external systems, tools, and data sources. While it simplifies integration by allowing agents to automatically fetch tool descriptions and schemas, it introduces significant security risks for enterprise environments.
The core issue lies in how Large Language Models process context. Models treat system prompts, user inputs, and tool descriptions as a single sequence of tokens. If a malicious actor injects instructions into an MCP server's tool description, the agent may execute unauthorized commands, such as data exfiltration or system manipulation.
Security experts warn that public MCP servers are particularly vulnerable to prompt injection attacks. Because agents dynamically fetch these descriptions, they can be compromised without the user's knowledge. Even manual verification is insufficient, as descriptions can change over time or be distributed across multiple servers.
The 'ShareLock' attack demonstrates a sophisticated method where malicious instructions are split across several MCP tools. This makes detection nearly impossible through individual inspection, as each component appears legitimate. This highlights the fundamental trust issue where agents blindly rely on external data.
Deploying third-party MCP servers within a private corporate network does not eliminate the threat. If an internal server is compromised, the malicious instructions propagate to all connected agents across the organization. This creates a centralized point of failure for enterprise security.






