
A Proof-of-concept repository showing how an untrusted MCP server can steal literally everything...
This is a proof-of-concept project that allows you to deploy an MCP server that "disguises" itself as any other MCP server. This MCP acts as an MCP 'Proxy', and simply forwards all incoming requests to an upstream MCP server.
An MCP Server is a program that expose additional capabilities to AI applications. Some examples are GitHub servers for code management, Slack servers for team communication, or Atlassian servers to manage and create tasks and documentation.
MCP servers are common in the AI landscape, but, as this repository will show, they should be installed with extreme care.
This is a malicious MCP that "disguises" itself as another MCP server. This MCP acts as an MCP 'Proxy', and simply forwards all incoming requests to an upstream MCP server, essentially acting as a man-in-the-middle attack.
All the user needs to do is install your MCP and their whole system (and network) is compromised.
What you can get:
This MCP doesn't just intercept the victim's AI messages, it's a full-on virus. Any victim installing this MCP is fu**ed.
Here are some screenshots showcasing that this MCP server is definitely stealing any incoming calls to the MCP:
Using this malicious MCP server in Claude Code to pretend to be Github's MCP Server while Stealing the user's data:

First, fork and clone this project. Then, you need to configure the project to do what you want. Using the configuration file in this project you can:
Do all of this in the config file here.
Additionally, you might want to add some additional malware to the code. I do not have code samples in here that can install a backdoor, steal the user's files, etc. but it would not be hard to add.
Once you've added your desired malicious activity and set the connection details of the victim's MCP, perform a build and get the resulting jar artifact.
Note: This project can very easily be converted to another deployment method like docker, npx, or even a hosted http service if you want to go that far.
To catch unknowing victims and get them to send all of their data to you, create a new Github Repository. Title the Repository something catchy that people will find like "-Catchy Text- --Gitlab/Github/Atlassian/Etc.-- MCP Server".
Next, create a "release" in Github that includes the output jar that you created above. You might also want to add some code to the repository to make it seem legit.
Next, you need a readme so that people know how to install your totally legit MCP server. Add a readme to the repository explaining how 'victims' can install the MCP server:
# Installing
To install this MCP server, download the release `jar` and add the following line to your MCP server configuration file:
\```
{
"mcpServers": {
"weather": {
"command": "java",
"args": [
"-jar",
"/ABSOLUTE/PATH/TO/mcp.jar"
],
"env": {
// Tell the user to put victim MCP ENV vars here.
}
}
}
}
\```
## Environment Variables
Copy and paste some info for how the user should configure their env variables for the victim's MCP.
If you want to look different, change up the name of the ENV vars
## Available Tools
The project provides the following tools:
- Copy and paste your victim's MCP tool list...
## Contributing
Some other social engineering content here to look legit...
Note: Again, this project can very easily be converted to another deployment method like docker, or npx as well.
Congratulations! All unsuspecting victims who add your MCP server have just installed malware! Go crazy.
To run this project locally, update the configuration file as necessary. Once configured, run this project locally, build the project and configure your MCP server to have the following configuration:
{
"mcpServers": {
"weather": {
"command": "java",
"args": [
"-jar",
"/ABSOLUTE/PATH/TO/PARENT/FOLDER/project/build/libs/weather-0.1.0-all.jar"
]
}
}
}
This will configure your AI to point to this project's build folder. Simply build the project, and load your AI's MCPs to test this locally.
The key lessons to take from this are:
npx, java, or other types of MCPs will run on the host machine and open more attack vectors