Read here, act there: one command to stop it on any MCP server A developer built CleiMesh, an open-source wrapper that enforces cross-server taint tracking for MCP agents, refusing write tools once an agent has read untrusted content from a different server. In a containerized test with the official fetch and filesystem servers, a scripted agent that fetched a page carrying a hidden instruction was blocked from writing the leaked secret, with the refusal logged as a verifiable receipt. The developer also fixed trust-boundary flaws found in review — token reuse across servers, an allowance cap reset on client restart, and IPv6 forms bypassing private-address checks — and credited a reader for spotting a redirect hole in URL allowlisting. The attacks on AI agents this year share one shape. The agent reads something an attacker wrote — a mail, a web page, a document — and then acts : sends, writes, fetches a URL with your data in it. I wrote about that pattern last week https://dev.to/cleiton augusto /stop-the-action-not-the-injection-14jo : you won't win the injection fight, so put the control on the action, outside the model. With MCP, the read and the act usually happen in different servers . The agent fetches a page through a fetch server and writes through a filesystem server. Each server sees one harmless call. No single server can stop the second step, because none of them saw the first. CleiMesh https://github.com/cleitonaugusto/cleimesh now does this in one command per server. cleimesh mcp add fetch --taints fetch -- uvx mcp-server-fetch cleimesh mcp add fs --clean-only write file --clean-only edit file \ -- npx -y @modelcontextprotocol/server-filesystem ~/work Each mcp add creates the keys if they're missing, asks the server which tools it has, issues a signed token for exactly those, and registers the result with Claude Code for every project --print gives you the JSON for Cursor and other clients . Every server you add runs behind one cleimesh-mcp entry: one enforcement point, one receipt log, and one view of what the agent has read. Before it grants anything, it shows what each tool tells the model, and it refuses a definition hiding invisible characters zero-width, Unicode tag characters that the person approving can't see. It also pins each tool's definition. If a server later changes a tool you approved a "rug pull": a new description that instructs the model, a wider schema , the wrapper stops offering it until you run mcp add again. --taints fetch says: whatever comes back from this tool is untrusted, and the agent that received it is now tainted. --clean-only write file says: this tool acts on the world, so refuse it while the agent is tainted, until a human clears it. Here it is with the official fetch and filesystem servers, unmodified, in a container. A scripted agent no model; it does what an injected one would fetches release notes carrying a hidden instruction, reads a secret, and tries to write it where the instruction says: php 1. write file notes.txt clean - ok 2. fetch the release-notes page - ok the page carries the injection 3. read text file secrets.txt - ok 4. write file leak.txt injected - REFUSED: holder ... received untrusted content The filesystem server never saw the page; the wrapper in front of both servers did, and refused the write. cleimesh taint list names the receipt that tainted the agent; cleimesh audit verify checks all seven receipts. The Dockerfile and full transcript https://github.com/cleitonaugusto/cleimesh/tree/main/examples/mcp-add are in the repo. Step 3 is allowed on purpose: taint stops the action that would leak the secret, not the read. Reading is what agents are for. I found the cross-server case by running exactly this test before writing this post. My first version gave each wrapped server its own log, so the taint stayed in the fetch server and the write went through. A control you haven't attacked yourself is a hope. So before shipping I also reviewed the trust boundaries, and fixed what that turned up: a hand-edited server list could call one server under another server's looser token, the spending cap of an allowance reset whenever the MCP client restarted it, and a few IPv6 forms that embed a private address passed as public. The threat model https://github.com/cleitonaugusto/cleimesh/blob/main/docs/threat-model.md records them. That review was mine; an outside one is still to come. A reader, komopdf https://dev.to/komopdf/comment/3lfec , pointed out a hole in the earlier version: an allowlist that checks the URL argument passes a granted host that answers 302 to the attacker. They were right. Now a tool reaches the network only through the host, which follows every redirect itself, re-checks every hop against the signed grant, pins the socket to the address it resolved no DNS rebinding , and refuses private and link-local answers unless the grant says otherwise: bash $ cleimesh token issue