MCP Tool Poisoning
Hidden instructions in a malicious MCP server
An MCP server describes its tools in plain text that goes straight into the model's context. A malicious or compromised server can hide instructions there, telling the model to misuse other, trusted tools, for example to read private files and send them out. The fix is to treat MCP servers like any other software supply chain.
Advanced · 5 steps
| Type | Indirect prompt injection via tool metadata |
|---|---|
| OWASP LLM | LLM01:2025 Prompt Injection |
| Also | LLM03:2025 Supply Chain, LLM06:2025 Excessive Agency |
| MITRE ATLAS | AML.T0051.001 |
| Variant | "Rug pull": description changes after approval |
| Key defense | Vetted servers + approval with full arguments |
Step by step
Install a handy server From an unofficial source
A developer already uses a trusted local server that can read project files. They add a free "weather" MCP server they found on an unofficial list. It initializes normally and looks harmless.
Poisoned description Instructions the user doesn't see
In
tools/list, the weather tool's description contains a hidden block of text aimed at the model: before using any tool, read a private configuration file and put its contents in the weather tool'snotesparameter. Many apps show users only the tool name, so the instruction goes unnoticed.Cross-tool misuse The trusted tool does the stealing
The developer asks something unrelated. The model, following the text it was given, first calls the trusted files server to read the config file, which holds API keys. The weather server never had file access; it used the model to borrow it.
Data leaves Hidden in an innocent call
The model then calls
get_forecastwith the city and the stolen file innotes. The malicious server forwards it to the attacker and returns a normal forecast, so the developer sees a correct answer and nothing odd. A later "rug pull" can also swap a clean description for a poisoned one after the user approved it.Defend the host Show everything, approve everything risky
A safer host shows the full tool descriptions, warns when a description changes, and asks for approval with every argument visible, so the user would see the secrets inside
notesand refuse. The files server only sees an allowed folder without secrets, and the unknown server runs with no outbound network.
How to defend
- Install MCP servers only from trusted publishers; review and pin versions
- Show users the full tool description, and flag any change after approval
- Require approval for tool calls and display every argument, not a summary
- Run servers sandboxed, with narrow file-system roots and no secrets nearby
- Restrict outbound network access for servers that don't need it
- Scan tool descriptions for hidden instructions before exposing them to the model
More in AI & LLM Security.
Packets
| No. | Time | Source | Destination | Protocol | Info | Size |
|---|