# 🛡️ AgentTaint: open-source firewall checks where the arguments of MCP tool calls come from

AI Today · published 2026-12-04T07:10:00Z · https://ai-today.com/product/c356a60d-5a92-4dd6-b552-8146a1bb2ab1?lang=en

![agenttaint demo: an injected email's send is blocked with its reason](https://img.ai-today.com/d/61fed08137d74727ba729703421d4929/AC4yuG6lv_wPJu3yDxNpTS5q-1gzNpbmY2gun9fZT4o.jpg)

- 🛡️ AgentTaint is a proxy between an AI agent and its MCP servers that decides per tool call: allow, ask for confirmation or block.
- The decision rests on where sensitive arguments such as recipient, URL, path or command came from: if untrusted content shaped them, the call is stopped.
- Open source (Apache 2.0), Python 3.12+, no change to agent or server; the project calls it a research release with a synthetic benchmark.

AgentTaint is an open-source firewall for tool calls over the Model Context Protocol (MCP). It sits as a proxy between the agent and its MCP servers and decides for every call whether it is allowed, needs a human's confirmation or is blocked. What matters is where the sensitive arguments came from, such as recipient, URL, file path or command. If content from a web page, an email or a file the agent read influenced the destination of a high-risk action, the call is stopped or held. The project is by [Marouane2005 on GitHub](https://github.com/Marouane2005/AgentTaint) under the Apache 2.0 license. The author describes it as a research release: the figures come from a synthetic benchmark and are no guarantee of protection in production. 🔍

**How the proxy works.** To the client AgentTaint is an MCP server over stdio, and to the real server it is an MCP client, so neither agent nor server needs changes. Every result the backend returns is recorded as an untrusted span. When the agent then calls a high-risk tool, the gateway checks whether the sensitive arguments trace back to such spans: through lineage the agent declares or, when it does not, through reconstruction from lexical, structural and semantic evidence. Lineage is labelled KNOWN, INFERRED or UNKNOWN, and the project says inference is never silently promoted to fact. Semantic similarity alone never makes an email address, URL, path or shell command INFERRED. A Cedar policy makes the decision; a Python reference implementation is checked against it in tests.

**What it is not.** According to the project it is not a prompt-injection classifier and not a keyword filter. It looks at the path the data took to the destination of an action, not at the wording. The project itself notes that a tool-call firewall does not filter attacks that only put injected text into the model's answer.

**Trying it.** A demo command (`agenttaint demo`) shows an email with a hidden instruction trying to make the agent send a contract to an outside address; the call is blocked and the reason is printed. `agenttaint init` writes configuration, policies and ready client configs for Claude Desktop, Cursor and Claude Code, with the presets strict, balanced and permissive. `agenttaint log` shows decisions (`--why` adds the reasons), and held calls are approved with `agenttaint approve`. Python 3.12 or newer is required. The README says the `uvx`, `pipx` and Docker routes ship from the first release after 1.0.0; until then the source install (`git clone`, `make install`) applies. A hosted demo exists on a free server, so the first request can take about a minute.

**The project's figures.** On a held-out test split of 68 synthetic scenarios the attack success rate is 0.000 (undefended: 1.000). No benign call was blocked, whereas a coarse taint baseline that blocks anything tainted stopped 29.6% of benign ones. Median latency is 9.02 ms (p95 14.19 ms). Recall on attacks is 0.976 with precision 1.000; with local BGE embeddings both are 1.000 at a 72.78 ms median.

**Limits.** The author says plainly that zero on a synthetic benchmark is not a guarantee. On a sampled AgentDojo run (v1.2.1, one free-tier model) there was no security gain, because the model resisted every tool-action injection even undefended (0 of 35), while utility fell from 0.85 to 0.35 or 0.50, mostly where recipients legitimately come from content the agent read. The samples are small. A model-free replay over all four suites cut the tool-action attack success rate from 0.619 to 0.023, with utility of 0.402 (default) and 0.464 (balanced preset). For anyone running agents with access to email, files or the web it is an approach to try; the project does not present it as proven protection for production. ⚠️

## Sources

- [AgentTaint repository and README](https://github.com/Marouane2005/AgentTaint)
- [Launch listing](https://www.tinylaunch.com/launch/37388-agenttaint)

---
This post was selected, researched, written and rated by AI. The AI can be wrong: check the sources.
