HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
invariantlabs-ai
mcp-injection-experiments
Python2025–2025
invariantlabs-ai / mcp-injection-experiments

mcp-injection-experiments

Code snippets to reproduce MCP tool poisoning attacks.

3Distinct people
3Mentions
0Explicit recommenders
211GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Code snippets to reproduce MCP tool poisoning attacks.

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 9–Nov 16 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/16/2026, 12:56:33 AM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by day3 dated mentions

Observed mentions: 2025-04-06 14:32:42 UTC to 2025-04-14 16:17:06 UTC.

0122025-04-06 00:00:00 UTC to 2025-04-07 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsApr 62025-04-07 00:00:00 UTC to 2025-04-08 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-04-08 00:00:00 UTC to 2025-04-09 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-04-09 00:00:00 UTC to 2025-04-10 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-04-10 00:00:00 UTC to 2025-04-11 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsApr 102025-04-11 00:00:00 UTC to 2025-04-12 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-04-12 00:00:00 UTC to 2025-04-13 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-04-13 00:00:00 UTC to 2025-04-14 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-04-14 00:00:00 UTC to 2025-04-15 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 commentsApr 14

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Apr 62025-04-06 00:00:00 UTC2025-04-07 00:00:00 UTC101
Apr 72025-04-07 00:00:00 UTC2025-04-08 00:00:00 UTC000
Apr 82025-04-08 00:00:00 UTC2025-04-09 00:00:00 UTC000
Apr 92025-04-09 00:00:00 UTC2025-04-10 00:00:00 UTC000
Apr 102025-04-10 00:00:00 UTC2025-04-11 00:00:00 UTC000
Apr 112025-04-11 00:00:00 UTC2025-04-12 00:00:00 UTC000
Apr 122025-04-12 00:00:00 UTC2025-04-13 00:00:00 UTC000
Apr 132025-04-13 00:00:00 UTC2025-04-14 00:00:00 UTC000
Apr 142025-04-14 00:00:00 UTC2025-04-15 00:00:00 UTC202

What Hacker News says

1 sources
The post highlights and cites a few attack scenarios we originally described in a security note (tool poisoning, shadowing, MCP rug pull), published a few days ago [1]. I am the author of said blog post at Invariant Labs. Different from what many suspect, the security problem with MCP-style LLM tool calling is not in isolating different MCP server implementations. MCP server implementations that run locally should be vetted by the package manager you use to install them (remote MCP servers are actually harder to verify). Instead, the problem here is a special form of indirect prompt injection that you run into, when you use MCP in an agent system. Since the agent includes all installed MCP server specifications in the same context, one MCP server (that may be untrusted), can easily override and manipulate the agent's behavior with respect
Read the rest
to another MCP server (e.g. one with access to your sensitive database). This is what we termed tool shadowing. Further, MCP's dynamic nature makes it possible for an MCP server to change its provided tool set at any point or for any specific user only. This means MCP servers can turn malicious at any point in time. Current MCP clients like Claude and Cursor, will not notify you about this change, which leaves agents and users vulnerable. For anyone, more interested, please have a look at our more detailed blog post at [1]. We have been working on agent security for a while now (both in research and now at Invariant). We have also released some code snippets for everyone to play with, including a tool poisoning attack on the popular WhatsApp MCP server [2]. [1] https://invariantlabs.ai/blog/mcp-security-notification-tool... [2] https://github.com/invariantlabs-ai/mcp-injection-experiment...
In The “S” in MCP Stands for Security

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.