All posts
AI
November 17, 2026

MCP Tool Poisoning: How It Works and How to Stop It

MCP Tool Poisoning: How It Works and How to Stop It

A developer connects a new MCP server to their coding assistant. It offers a simple tool called add that adds two numbers. The assistant shows the tool name, the developer approves it, and everything works.

What the developer never sees is the rest of the tool’s description. Hidden inside it are instructions telling the model to read the user’s SSH private key and MCP configuration file and pass their contents in an extra parameter, while explaining the arithmetic so nothing looks unusual. That’s not a hypothetical. It’s the attack Invariant Labs disclosed in April 2025, and it’s the clearest example of MCP tool poisoning.

This guide explains how MCP tool poisoning works, where poisoned instructions can hide, the variants to watch for, and the layered controls that stop it.

What is MCP tool poisoning?

MCP tool poisoning is an attack in which malicious instructions are hidden in the metadata of an MCP tool, such as its description, parameter schema, or outputs. The AI model reads and follows those instructions, while the user sees only the tool’s name or a short summary.

It’s a form of indirect prompt injection. The attacker doesn’t need to talk to the model directly. They only need a tool the model will load.

How tool poisoning works

The attack exploits a gap between what the model sees and what the user sees.

  1. The attacker publishes or compromises an MCP server. The server offers tools that look useful and harmless.
  2. Hidden instructions sit in the tool metadata. In the Invariant Labs example, they were wrapped in an <IMPORTANT> tag inside the description, which the model treated as authoritative.
  3. The client loads the full definition into the model’s context. Every tool description becomes part of what the model reads before it acts.
  4. The user sees a summary. The interface shows a tool name and, at best, a short confirmation. Invariant Labs noted that “the user is only shown a simple summarized tool name.”
  5. The model follows the hidden instructions. It reads files, sends data, or calls other tools, using the user’s own permissions, so each action can look authorized.

The Cloud Security Alliance sums up the root cause: “MCP mixes instructions and data in the same channel.” Tool metadata carries almost as much influence over an agent as its system prompt.

Where poisoned instructions can hide

Descriptions get the most attention, but they aren’t the only place.

Location How it’s used Why it’s easy to miss
Tool description Hidden instructions in the text the model reads to decide when and how to use the tool Users see a name or summary, not the full text
Parameter schema Instructions in parameter names, descriptions, or default values, or extra parameters that collect data Schemas look like technical plumbing, so few people read them
Tool outputs Instructions embedded in results or error messages returned to the model They arrive at runtime, after any review of the definition

Three variants to watch for

Rug pulls

A server can change a tool’s description after a user or admin has already approved it. Invariant Labs put it directly: “a malicious server can change the tool description after the client has already approved it.” A tool that passed review last month can carry new instructions today.

Tool shadowing

A poisoned tool doesn’t have to be the one that does the damage. Its description can tell the model how to use a different, trusted tool. In Invariant Labs’ example, a malicious tool’s description told the agent to send every email from a trusted email tool to an attacker’s address, and the agent did so even when the user named a different recipient.

Supply chain poisoning

Many MCP servers are installed from public package registries. A malicious or compromised package can ship poisoned tools to every organization that installs it. The Cloud Security Alliance recommends treating every MCP server as a supply chain dependency, because “every connected tool is a live software dependency.”

Why tool poisoning is hard to catch

  • Models are built to follow instructions. The MCPTox benchmark, cited by the Cloud Security Alliance, tested 20 models against tools from 45 live MCP servers and found a 36.5 percent average attack success rate. Even the most cautious models refused in under 3 percent of cases.
  • The actions look legitimate. The agent uses real tools with the user’s real permissions, so network and endpoint controls often see nothing unusual.
  • Reviews happen once. Most approval flows check a tool when it’s added, not when it changes or when it returns output.
  • Shadowing crosses server boundaries. A malicious server can influence a trusted one without ever being called itself.

How to stop MCP tool poisoning

No single control is enough. The goal is to make poisoning hard to introduce, quick to detect, and limited in what it can do.

Before a server is connected

  • Allowlist servers. Replace “allow all” settings with an explicit list of approved servers and publishers. Treat each new server as a dependency that needs review.
  • Read the full definition. Review complete tool descriptions and schemas, not just names, before approval.

When tools are loaded

  • Scan every definition. Check tool names, descriptions, and schemas for hidden instructions, unusual tags, and requests to read files or send data before a model ever sees them.
  • Pin and review changes. Record the approved version of each tool definition, and require a human to review the difference whenever it changes. Invariant Labs recommends verifying tool descriptions with a hash or checksum so unauthorized changes are detected.

When tools run

  • Apply least privilege per tool. Give each agent only the tools it needs, with only the parameters it needs. A poisoned tool can only reach what the agent is allowed to reach.
  • Inspect inputs and outputs. Check tool arguments for sensitive data on the way out, and tool results for injected instructions on the way back.
  • Require approval for high-impact actions. Send destructive or sensitive actions to a human, with the full inputs visible.
  • Set boundaries between servers. Don’t let one server’s tools quietly change how another server’s tools are used.

Over time

  • Log every call. Record which agent called which tool, for which user, with what inputs and result.
  • Red team your agents. Test agents against tool manipulation and chained attacks before and after deployment.

A checklist for MCP tool poisoning defense

  1. Is every MCP server on an approved list?
  2. Are full tool descriptions and schemas reviewed, not just names?
  3. Are tool definitions scanned for hidden instructions before exposure?
  4. Is a change to any approved tool caught and reviewed?
  5. Does each agent see only the tools it needs?
  6. Are tool outputs checked before they reach the model?
  7. Do high-impact actions require human approval?
  8. Is every tool call logged?

How Airia helps stop tool poisoning

Airia puts these controls at the gateway, between agents and the MCP servers they use.

With the Airia MCP Gateway, admins approve which MCP servers can be used at all, including custom ones. Every tool’s name and description is scanned for hidden prompt injection before it’s exposed, and each tool carries a scan status. Admins assign access at the app, tool, and parameter level by role, so an agent only sees the tools its task requires, and can filter tools by read-only or destructive annotations. Every tool call, whether it succeeded, was denied, or errored, is logged and searchable.

Airia Secure adds runtime protection. It detects and blocks direct and indirect prompt injection with sub-300ms enforcement latency, and blocks sensitive data from leaving through agent outputs, model API calls, and MCP server responses. Agent Constraints validate tool inputs before actions proceed and route high-impact actions to human review. Agentic Red Teaming tests agents against prompt injection, tool manipulation, and chained attacks. And Airia Discover finds MCP servers that were connected without review, so poisoned tools don’t hide in servers nobody knew about.

Conclusion

MCP tool poisoning works because models trust the tools they’re given and users can’t see what the model reads. The fix isn’t to stop using MCP. It’s to control what reaches the model and what the model can do with it: approve servers, scan every definition, review every change, give each agent only the tools it needs, inspect what flows in and out, and log everything.

Stop poisoned tools before your agents read them. Request a demo to see Airia scan, scope, and log every MCP tool your agents use.

Put these ideas to work.

Schedule a 30-minute walkthrough with our team.

Talk through your use case