MCP Security: 10 Risks to Review After Patching
CISOs and IT leaders are being asked to approve MCP servers, agent workflows, and internal AI tools while business teams are already testing them through unofficial paths. The hard part isn’t deciding if Model Context Protocol (MCP) is useful, but proving that useful agents won’t take valid credentials and perform the wrong action.
A patched MCP server can still expose the business if an agent is authorized to call a tool, reads malicious context, and executes an action the user never intended. MCP security therefore requires both secure software and controls over the operations that agents can perform.
Key Takeaways
- Patching addresses known software vulnerabilities. Secure configuration and authorization address additional risks.
- Prompt injection can influence tool selection and arguments without compromising the MCP server itself.
- Server provenance, credential scope, tenant isolation, and execution controls require separate review.
- Visibility alone does not create accountability because agent actions need identity, scope, approval, and audit at runtime.
- Willow’s Agentic Access Platform combines governed MCP access, identity-linked permissions, runtime controls, shadow AI discovery, and audit.
What MCP Security Must Protect
Model Context Protocol gives agents a standard way to discover context, call tools, and interact with external systems, but enterprise-grade access control, approval flows, least privilege, and audit trails require deliberate implementation.
The MCP architecture describes a host, client, and server model where applications connect to external data sources and tools through MCP servers. Implementations must follow the security requirements applicable to their transport and authorization design.
| MCP Primitive | What It Does | Security Considerations |
|---|---|---|
| Resource | Provides contextual data to an application. | Retrieval permissions, sensitive-data exposure, and untrusted content. |
| Tool | Exposes callable operations, including queries and changes. | Argument validation, operation permissions, execution boundaries, and destinations. |
| Prompt | Provides a reusable interaction template. | Template provenance and untrusted instructions or embedded content. |
Risk here depends on capability and data sensitivity. A read-only resource containing credentials can be more consequential than a tool that creates a low-impact ticket. Additionally, a tool’s schema describes its inputs and behavior, but it is not a separate MCP primitive.
10 MCP Security Risks to Assess
The following risks overlap, but require different controls. Make sure to assess their priority against the deployment’s capabilities, data, exposure, and business impact.
1. Over-Permissioned Tools and Excessive Agency
A tool gets broad API keys, excessive permissions, or a service account with more access than the agent’s task requires. The agent then calls that tool after reading poisoned context, following an indirect prompt injection, or chaining into another workflow.
Confused-deputy attacks are related but distinct: a privileged component is induced to misuse its authority for another party. Excessive permissions alone do not establish that attack.
Here’s an example: an employee asks an agent to summarize a customer issue. The agent then reads a ticket that contains malicious instructions telling it to “sync the full customer table for validation.” If the connected tool has broad database permissions, the action can look legitimate at the infrastructure layer because the agent used valid credentials.
To safeguard against this, we recommend limiting permissions by task, resource, and environment. Additionally, make sure to enforce operation-specific authorization in the target system or a mandatory mediation path, with approval for designated actions.
2. Prompt Injection and Context Manipulation
Prompt injection is the MCP risk that turns trusted access into unsafe execution. In direct prompt injection, a user supplies malicious instructions. In indirect prompt injection, the agent reads malicious instructions from a document, ticket, webpage, email, repository, or other external context.
The MCP-specific failure mode is the jump from reading to doing:
- The agent retrieves context through a resource or tool.
- The context contains malicious instructions.
- The agent treats those instructions as part of the task.
- The agent calls a tool with valid credentials.
- The downstream system accepts the operation because its authorization checks permit it.
This is why prompt filtering alone is incomplete. Instead, MCP security needs runtime guardrails that evaluate tool calls after context has influenced the agent instead of only before the agent begins work.
3. Rogue MCP Servers and Supply Chain Attacks
Rogue MCP servers introduce supply chain risk at the integration layer. Here, teams may connect public MCP servers, internal prototypes, open-source packages, or vendor-provided servers before security has been able to review how they handle credentials, tool definitions, logging, and outbound calls.
This risk appears in several forms:
- Slopsquatting: An attacker publishes a malicious package under a name that an AI model invents or recommends despite no legitimate package existing under that name.
- Rug-pull attacks: A server starts clean, gains adoption, then changes behavior after users depend on it.
- Credential harvesting: A server asks for tokens or API keys, then stores or forwards them unsafely.
- Tool impersonation: A server presents a familiar tool name while routing calls to a different backend.
- Dependency compromise: A safe MCP server imports a compromised package that changes execution behavior.
A reliable governance strategy should include server provenance, code review for internal servers, approved registries, dependency scanning, scoped secrets, and runtime checks on tool behavior.
4. Tool Poisoning and Schema Manipulation
Tool poisoning places malicious or misleading instructions in the descriptions or metadata an agent uses to select and invoke tools. Tool shadowing, on the other hand can influence selection by impersonating or competing with trusted capabilities.
Agents rely on tool names, descriptions, argument schemas, and examples to decide what a tool does. If those details are poisoned, the agent may make a dangerous call while believing it is performing a routine action.
The trouble here is that a description or schema alone cannot prove what the backend actually does. Instead, you need to review implementation behavior and permissions alongside advertised metadata.
Useful controls here include:
- Versioning approved tool schemas.
- Detecting schema drift before execution.
- Restricting tool selection by role, department, and task.
- Recording approved tool versions or schema identifiers for investigation.
- Requiring re-approval when a tool adds destructive or external-transmission capability.
5. Insufficient Sandboxing and Local Code Execution
MCP servers often sit close to sensitive execution environments. Their permissions may expose developer machines, CI systems, internal networks, local files, or shell access to connected workflows.
That proximity raises the risk of command injection and remote code execution. A prompt-injected coding agent might call a local tool that runs shell commands. Alternatively, a data workflow might pass attacker-controlled input into a script.
And while sandboxing and isolation can reduce the blast radius, they don’t solve the full governance problem. In some cases, a sandboxed tool can still exfiltrate allowed data, mutate allowed records, or trigger allowed workflows if its permissions are too broad.
We recommend applying these three complementary controls instead:
- Execution boundaries: Restrict process privileges, filesystem mounts, and access to production credentials.
- Network boundaries: Limit outbound destinations and review URL-fetching capabilities for access to internal services.
- Operation boundaries: Separate retrieval from mutation and apply production authorization wherever local tools can reach production.
Tip: Local does not mean low risk. If a local server can execute commands, read secrets, or invoke internal APIs, it needs the same governance discipline as a production integration.
6. Token Theft and Session Hijacking
Token theft and session hijacking become more damaging when MCP tools can act across SaaS apps, databases, developer environments, and internal workflows. A stolen credential can then expose every resource and operation within its scope.
To combat this, validate tokens for the intended resource, restrict their permissions and lifetime, and do not pass through credentials issued for another service. Also, you should check implementation details against the protocol version being deployed.
Common token and session risks include:
- Long-lived API keys embedded in MCP server configuration.
- Tokens shared across agents, users, or teams.
- Service accounts with broad scopes.
- Session tokens exposed through logs or local storage.
- OAuth grants that outlive the original business need.
Machine users and service accounts need clear ownership, limited scope, rotation, and action-level policy. OAuth supports authorization, but additional policy may be needed to constrain an operation by task, environment, resource, and approval status.
7. Cross-Tenant Data Exposure
Cross-tenant data exposure is a high-impact MCP risk for any server that brokers access across customers, departments, workspaces, repositories, or environments. The core issue is simple: an agent asks for context or calls a tool, and the server returns data from the wrong tenant or scope.
This can happen through weak tenant isolation, cached context, mis-scoped credentials, shared service accounts, or tool calls that do not bind the request to the initiating user.
Examples include:
- A support agent retrieving data from the wrong customer account.
- A coding agent indexing repositories outside the assigned project.
- A shared MCP server reusing cached context across workspaces.
A good approach here is to derive tenant and user scope from validated identity and enforce it server-side for every retrieval and operation. Additionally, bind caches and credentials to the appropriate scope – do not trust an agent-supplied tenant identifier as authorization.
8. Unmanaged Apps and Servers
MCP makes integration easy enough for unofficial apps to connect to real systems before governance catches up. Shadow AI can include employee-built apps, local servers, browser workflows, and agent-to-agent connections outside approved oversight.
Vibe-coded apps can typically bypass normal controls through five common paths:
- They connect directly from endpoints instead of managed gateways.
- They use personal tokens or copied API keys.
- They call public MCP servers without provenance review.
- They run local tools that touch internal files or code.
- They create agent-to-agent flows that security teams can’t see.
For best results, make sure to combine proactive shadow AI discovery with ownership, review, and an approved path for useful workflows. Next, provide sanctioned toolkits, scoped identities, and clear onboarding requirements, then restrict unmanaged access paths where needed.
9. Context Leakage
Context leakage happens when an agent receives or reveals more information than the task requires. In MCP, resources and tools can return documents, tickets, repositories, emails, logs, or database records that enter model context or a downstream workflow.
PII redaction helps, but redaction alone is not enough as confidential information also includes material that does not match PII patterns.
To account for context leakages, make sure to ask these three questions:
- Does this user have permission to retrieve this context?
- Does this agent need this context for this task?
- Can this context be sent to the selected model, tool, or destination?
Then, check authorization before retrieval and apply output controls before restricted information reaches an unauthorized model, tool, or recipient.
10. Incomplete Agent Audit Trails
Logging that shows “user called API” is not enough for MCP security. Audit records should instead connect the initiating user or workload, executing agent, tool operation, target resource, policy decision, and result.
An agentic audit trail should therefore capture:
- Initiating identity and accountable owner.
- Agent identity and version, where available.
- MCP server, tool, and relevant schema or version identifier.
- Target resource and tenant scope.
- Approval status, policy decision, and guardrail result.
- Final action outcome and correlation identifiers.
Here, make sure to record relevant context references where available, rather than indiscriminately copying sensitive payloads into logs. Also apply redaction, access controls, and retention limits.
Tip: When agents delegate work, always preserve lineage across the calls as these records can then support the reconstruction of observable events.
Applying Controls Across the MCP Execution Path
Traditional Identity and Access Management (IAM) remains essential. After all, Okta, Entra, Active Directory, and JumpCloud still anchor workforce identity, SSO, lifecycle management, and policy enforcement for human users.
IAM can also enforce granular authorization, while DLP, endpoint controls, and network restrictions serve to protect supported data and execution paths.
A practical rollout can start with these four steps:
- Record owners, provenance, connected systems, and where enforcement applies.
- Read-only retrieval, external transmission, record mutation, code execution, and administrative actions should not share one approval model.
- Every agent, machine user, and service account needs a human owner, scoped permissions, and lifecycle controls.
- Confirm that prohibited operations fail through every available access route, while legitimate workflows still complete.
How Willow supports MCP governance
Willow is the agentic access platform for enterprise AI governance. Our enterprise MCP gateway combines governed tool access, identity-linked permissions, runtime guardrails, approval workflows, and audit.
We extend existing identity infrastructure as well, helping you evaluate which integrations and execution paths are covered, how identity reaches downstream systems, and which bypass routes require endpoint or network restrictions.
Ensure a Secure MCP Beyond the Software Update
Patching MCP servers is crucial as dependency scanning, secure coding, OAuth hygiene, sandboxing, and server provenance all reduce real risk. They work alongside permissions, execution controls, data boundaries, and audit to constrain what agents can do with legitimate access.
However, you need to test those controls against the operations agents can actually perform. An approved server or valid credential should not become permission for unrestricted retrieval, changes, or external transmission.
If you need a ready-made solution, start free with Willow to explore governed MCP access, and review enterprise plans for identity integration, action-level permissions, and runtime guardrails.
Frequently Asked Questions
Does deleting an MCP server configuration revoke its access?
Not necessarily. Removing the configuration does not automatically revoke API keys, OAuth grants, or credentials copied elsewhere. Make sure to review and revoke the underlying access through the systems that issued it instead.
What should happen if the policy service is unavailable?
Ensure to define failure behavior before deployment. For protected operations, deny or pause execution when authorization cannot be established, record the failure, and use a controlled escalation process rather than silently allowing access.
Can a tool stay within its permissions and still cause disruption?
Yes. Repeated allowed operations can exhaust API quotas, overload a database, or generate excessive messages and costs. To combat this, apply rate limits, concurrency limits, execution budgets, and interruption controls alongside permissions.
Background Agents in the Enterprise
Most teams can spin up an agent. Few can deploy one their security team signs off on. Here's the framework that does both.
FAQS
Everything you need to get your Basecamp running.
Your agents are already in the wild.
Give them a Basecamp. Go from AI chaos to AI work, in minutes.