Track MCP LogoTrack MCP
Track MCP LogoTrack MCP

The world's largest repository of Model Context Protocol servers. Discover, explore, and submit MCP tools.

Product

  • Categories
  • Top MCP
  • New & Updated
  • Submit MCP

Company

  • About

Legal

  • Privacy Policy
  • Terms of Service
  • Cookie Policy

© 2026 TrackMCP. All rights reserved.

Built with ❤️ by Krishna Goyal

    Mcp Injection Experiments

    Code snippets to reproduce MCP tool poisoning attacks. Python-based implementation.

    183 stars
    Python
    Updated Oct 14, 2025

    Table of Contents

    • Direct Poisoning
    • Tool Shadowing
    • WhatsApp takeover

    Table of Contents

    • Direct Poisoning
    • Tool Shadowing
    • WhatsApp takeover

    Documentation

    MCP Tool Poisoning Experiments

    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](./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:

    Cursor executes tool poisoning

    Tool Shadowing

    In [shadowing.py](./shadowing.py), we implement a more sophisticated MCP attack, that manipulates the agent's behavior of a send_email 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:

    Cursor executes tool shadowing

    WhatsApp takeover

    Lastly, in [whatsapp-takeover.py](./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.

    Cursor executes WhatsApp MCP attack

    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.

    Similar MCP

    Based on tags & features

    • VI

      Video Editing Mcp

      Python·
      218
    • AS

      Aseprite Mcp

      Python·
      92
    • DA

      Davinci Resolve Mcp

      Python·
      327
    • PL

      Playwright Plus Python Mcp

      Python·
      154

    Trending MCP

    Most active this week

    • PL

      Playwright Mcp

      TypeScript·
      22.1k
    • SE

      Serena

      Python·
      14.5k
    • MC

      Mcp Playwright

      TypeScript·
      4.9k
    • MC

      Mcp Server Cloudflare

      TypeScript·
      3.0k
    View All MCP Servers

    Similar MCP

    Based on tags & features

    • VI

      Video Editing Mcp

      Python·
      218
    • AS

      Aseprite Mcp

      Python·
      92
    • DA

      Davinci Resolve Mcp

      Python·
      327
    • PL

      Playwright Plus Python Mcp

      Python·
      154

    Trending MCP

    Most active this week

    • PL

      Playwright Mcp

      TypeScript·
      22.1k
    • SE

      Serena

      Python·
      14.5k
    • MC

      Mcp Playwright

      TypeScript·
      4.9k
    • MC

      Mcp Server Cloudflare

      TypeScript·
      3.0k