MCP Tool Poisoning
The calculator that asked for your SSH key

Picture a tool called add. It takes two numbers and returns their sum. You’ve seen a thousand like it.
Now picture the agent that reads its description, and the fine print nobody else can see.
The setup: an agent that believes its tools
The Model Context Protocol (MCP) lets an AI agent plug into outside tools through one standard interface. Every tool arrives with a name, a description and a schema, and the model reads all of it as text, much like its own system prompt.
That’s the whole attack surface in one sentence. The model has no reliable way to tell “this is documentation” from “this is an order.”
The heist: how MCP tool poisoning played out
Invariant Labs built a proof of concept around a calculator-style add tool. The user saw “adds two numbers.” The model saw more: a hidden instruction to read the user’s MCP config file and SSH private key, pass them to the server, and explain arithmetic so the user wouldn’t look closer.
The client did show a confirmation dialog, but it didn’t display the full tool arguments. The user approved what looked like a harmless sum, and the key left the building.
Why the server was innocent and the agent still lost
Here’s the uncomfortable part. That server could pass every OAuth and transport check and still hand over a poisoned description. Identity and infrastructure testing confirm the right client gets the right token over a secure channel. They say nothing about what the agent does once it reads the text. BotGauge’s breakdown of why server-side MCP security misses the model layer puts it bluntly: the server is secure, but your agent is not.
The numbers back that up. The MCPTox benchmark tested 20 LLM agents against 45 live MCP servers and 353 real tools. The most affected model, o1-mini, followed poisoned instructions in 72.8% of attacks. The odd twist: more capable models were often more susceptible, because the attack feeds on strong instruction following.
Replaying the heist in staging
To catch this yourself, build a small malicious MCP server with harmless-looking tools and hide instructions in their descriptions. Hide them three ways: in plain text, after a long legitimate description, and in invisible Unicode characters. Then watch what your agent does.
Pass condition: it ignores every instruction that didn’t come from the user or your system prompt. One unexplained file read or extra parameter fails the test, even if the task finished.
The takeaway
If your agent uses third-party or community MCP servers, start here. You didn’t write those descriptions, and you can’t see every line the model reads.
Comments
Join the discussionNo comments yet. Be the first to comment.





