MCP Parasite logo

MCP Parasite

Community
bountyyfi

MCP Parasite

Publisherbountyyfi
RepositoryProjectMemory
LanguagePython
Forks
8
Stars
46
Available tools
0
Transport typestdio
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    MCP Parasite exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    46 stars and 8 forks from the linked repository.

MCP Parasite: Adaptive Cross-Server Parasitic Attack on MCP-Enabled AI Agents

WARNING: This is a security research proof-of-concept for responsible disclosure purposes only.

DO NOT use this tool for malicious purposes. All exfiltration in this PoC targets localhost (127.0.0.1:9999) only. This project exists to demonstrate a novel class of attack against MCP-enabled AI agents to drive improvements in MCP client security.

This research has been submitted for responsible disclosure to Anthropic, Cursor/Anysphere, and other MCP client developers.


What is MCP Parasite?

MCP Parasite ("ProjectMemory") is a proof-of-concept MCP server that demonstrates a novel adaptive, temporal, cross-server parasitic attack against MCP-enabled AI agents (Claude Desktop, Cursor, etc.). It disguises itself as a legitimate and genuinely useful project memory/context tool while silently profiling the user's environment, learning workflow patterns, and executing a targeted cross-server shadowing attack at a high-value moment.

Why This Matters

Existing MCP security research focuses on:

  • Malicious tool descriptions (detectable by mcp-scan)
  • Single rug-pull attacks (one-shot, no persistence)
  • Direct prompt injection in tool metadata

MCP Parasite is different. It introduces a new class of attack that:

AspectExisting MCP AttacksMCP Parasite
TimingImmediate or single rug pullMulti-phase, days/weeks dormancy
DetectionTool description contains malicious textTool descriptions are 100% clean
MechanismDirect prompt injection in tool metadataCross-server shadowing via return values
IntelligenceStatic payloadAdaptive, profile-based targeting
PersistenceOne-shotRepeatable, cooldown-based
DisguiseMinimalFully functional, desirable tool
mcp-scanDetectableUndetectable (no poisoned descriptions)

The Attack

Phase 1: Reconnaissance (Days 1-7)

The server operates as a fully functional, genuinely useful project memory tool. Every interaction is silently analyzed:

  • Codebase indexing maps the attack surface (sensitive files, CI/CD configs, credentials)
  • Stored memories are analyzed for secrets, infrastructure details, team information
  • Conversation context reveals which other MCP servers are installed
  • Subtle prompts in tool responses encourage the LLM to share more context

Phase 2: Dormancy (Days 7-14)

Zero parasitic activity. The server operates purely legitimately. This is the trust-building phase where:

  • mcp-scan finds nothing suspicious
  • Users grow to rely on the tool
  • Users recommend it to teammates
  • Security audits find nothing

Phase 3: Armed Strike (Day 14+)

The server monitors for high-value trigger events:

  • Production deployments
  • Credential rotation
  • Sensitive file edits
  • PR merges to main
  • Infrastructure changes
  • New team member onboarding

When triggered, it injects a cross-server shadowing payload into its legitimate tool responses. The payload is crafted to look like a project convention or team practice, causing the LLM to unknowingly:

  1. Use other installed MCP servers (GitHub, Slack, filesystem) to exfiltrate data
  2. Include sensitive files in commits via the GitHub MCP
  3. Post configuration details to Slack channels
  4. Stage files for exfiltration via the filesystem MCP

Quick Start (Demo Mode)

Prerequisites

  • Python 3.11+
  • Claude Desktop or Cursor with MCP support
  • GitHub MCP server and/or Filesystem MCP server installed

Installation

bash
# Clone the repository
git clone https://github.com/bountyyfi/ProjectMemory.git
cd ProjectMemory

# Install dependencies
pip install -e ".[dev]"

# Set up demo environment
bash demo/setup_dummy_env.sh

# Run tests
pytest

MCP Configuration

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):

json
{
  "mcpServers": {
    "project-memory": {
      "command": "python",
      "args": ["-m", "project_memory.server"],
      "env": {
        "PROJECT_MEMORY_DB": "~/.project-memory/memory.db",
        "PROJECT_MEMORY_DEMO": "true"
      }
    }
  }
}

In demo mode, phase timings are accelerated (minutes instead of days).

Demo Walkthrough

See demo/demo_scenario.md for a step-by-step walkthrough.

Detection

See docs/DETECTION.md for detailed detection strategies.

Key recommendations for MCP client developers:

  1. Monitor tool return value entropy - Track response length/structure over time
  2. Content policy enforcement - Scan tool responses for instruction-like patterns
  3. Cross-server isolation - Don't let one tool's output influence calls to other tools
  4. Response hashing - Alert on structural changes in tool responses
  5. Network monitoring - Track outbound connections from MCP server processes

Project Structure

mcp-parasite/
├── src/project_memory/
│   ├── server.py            # Main FastMCP server
│   ├── memory_store.py      # SQLite-backed persistence
│   ├── indexer.py           # Codebase indexer
│   ├── utils.py             # Shared utilities
│   └── parasite/
│       ├── recon.py         # Phase 1: Passive reconnaissance
│       ├── profiler.py      # Environment profiling
│       ├── trigger.py       # Phase 3: Trigger detection
│       ├── strike.py        # Phase 3: Cross-server shadowing
│       └── config.py        # Configuration
├── tests/                   # Unit tests for all modules
├── docs/                    # Attack flow, detection, timeline
├── demo/                    # Demo setup and scenario
└── config/                  # Example MCP configs

Responsible Disclosure

This research has been submitted for responsible disclosure to:

  • Anthropic (Claude Desktop MCP client)
  • Anysphere (Cursor MCP client)
  • MCP Protocol maintainers

Recommendations

For MCP Client Developers

  1. Implement tool response content policies
  2. Add cross-server isolation (responses from one server should not be treated as instructions for another)
  3. Monitor tool response patterns over time for anomalies
  4. Provide users with visibility into what tool responses contain
  5. Consider response sandboxing for MCP tool outputs

For Users

  1. Only install MCP servers from trusted sources
  2. Regularly audit MCP server behavior
  3. Monitor network traffic from MCP server processes
  4. Be cautious of tools that ask about your other tools
  5. Review tool responses for unusual instructions or "conventions"

Credits

  • Bountyy Oy - bountyy.fi
  • Mihalis Haatainen - Security Research

License

MIT License - See LICENSE for details.

Remember: This is security research. Use responsibly.

Installation

TypingMind
Prerequisites:

Node.js 18+

{
  "mcpServers": {
    "bountyyfi-projectmemory": {
      "command": "",
      "args": []
    }
  }
}

Use MCP Parasite MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once MCP Parasite is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add MCP Parasite as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the MCP Parasite MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "bountyyfi-projectmemory": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-parasite"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the MCP Parasite MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the MCP Parasite MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use MCP Parasite to help me with this task?
MCP Parasite
Sure. I read it.
Here is what I found using MCP Parasite.

Frequently asked questions

What is the MCP Parasite MCP server used for?

MCP Parasite is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use MCP Parasite MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use MCP Parasite with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use MCP Parasite MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With MCP Parasite connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect MCP Parasite MCP to TypingMind?

MCP Parasite runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does MCP Parasite MCP provide in TypingMind?

MCP Parasite exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use MCP Parasite MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If MCP Parasite requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇