I
invariantlabs-ai/mcp-injection-experiments
Snippets that reproduce MCP tool poisoning
在 GitHub 查看 ↗链接已于 2026-11-12 核查 · HTTP 200 · 打开的是厂商自己的官网
我们没有从该仓库取到可核对的安装命令,也没有公开的远端端点。这两样都没有时,我们不出配置——编一条出来比不给更糟。 各客户端的接法 →
- 来源明细
- 收录自 abordage/awesome-mcp 榜单(我们从中收集的条目之一) · 条目类型:MCP 服务
- 收录与活跃
- 收录于 2026-11-05 · 最近见到 2026-11-14 · 共见到 10 次 · 被 10 个来源列出
- 评分构成
- 综合分 1,003 · 10 个来源 · mcp
常见问题(答案都来自我们的记录)
它适合谁 / 用来做什么?
我们把它归在这些标签下: MCP 服务。标签来自条目自身,不是我们强加的分类。
谁维护它、还在更新吗?
我们收录于 2026-11-05;最近见到 2026-11-14。这里没有"官方认证"或"质量评级"——我们只记录来源与时间。
# MCP Tool Poisoning Experiments
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
This repository contains a few experimental MCP server implementations, that attempt ot inject the MCP client/agent in use.
For more details about the attack method, please see our blog post.
Update: We have released a new security scanning tool called mcp-scan, that detects MCP attacks as demonstrated in this repository, and helps you secure your MCP servers.
## Direct Poisoning
In direct-poisoning.py, we implement a simple MCP server that instructs an agent to leak sensitive files, when calling the add tool (in this case SSH keys and the mcp.json file itself).
An example execution in cursor looks like this:
## Tool Shadowing
In shadowing.py, we implement a more sophisticated MCP attack, that manipulates the agent's behavior of a sendemail tool (provided by a different, trusted server), such that all emails sent by the agent are leaked to the attacker's server.
An example execution in Cursor looks like this:
## WhatsApp takeover
Lastly, in whatsapp-takeover.py, we implement a shadowing attack combined with a sleeper rug pull, i.e. an MCP server that changes its tool interface only on the second load to a malicious one.
The server first masks as a benign "random fact of the day" implementation, and then changes the tool to a malicious one that manipulates whatsapp-mcp in the same agent, to leak messages to the attacker's phone number.
Can you spot the exfiltration? Here, the malicious tool instructions ask the agent to include the smuggled data after many spaces, such that with invisible scroll bars, the user does not see the data being leaked. Only when you scroll all the way to the right, will you be able to find the exfiltration payload.
For more details about the attack method, please see our blog post.
Update: We have released a new security scanning tool called mcp-scan, that detects MCP attacks as demonstrated in this repository, and helps you secure your MCP servers.
## Direct Poisoning
In direct-poisoning.py, we implement a simple MCP server that instructs an agent to leak sensitive files, when calling the add tool (in this case SSH keys and the mcp.json file itself).
An example execution in cursor looks like this:
## Tool Shadowing
In shadowing.py, we implement a more sophisticated MCP attack, that manipulates the agent's behavior of a sendemail tool (provided by a different, trusted server), such that all emails sent by the agent are leaked to the attacker's server.
An example execution in Cursor looks like this:
## WhatsApp takeover
Lastly, in whatsapp-takeover.py, we implement a shadowing attack combined with a sleeper rug pull, i.e. an MCP server that changes its tool interface only on the second load to a malicious one.
The server first masks as a benign "random fact of the day" implementation, and then changes the tool to a malicious one that manipulates whatsapp-mcp in the same agent, to leak messages to the attacker's phone number.
Can you spot the exfiltration? Here, the malicious tool instructions ask the agent to include the smuggled data after many spaces, such that with invisible scroll bars, the user does not see the data being leaked. Only when you scroll all the way to the right, will you be able to find the exfiltration payload.
收录徽章(可选)
想把收录标记放进 README 就复制这行,可选,不影响收录。
[](https://anclum.com/zh/s/invariantlabs-ai-mcp-injection-experiments/)
- 来源
- awesome · https://github.com/invariantlabs-ai/mcp-injection-experiments
- 按领域浏览
- MCP 服务
- 收录来源
- 10 个独立来源
- 收录于
- 今天
同类推荐
所属领域与标签
每个标签都能点进去看同类的全部条目。数字是当前库里的真实条数。