Research repository demonstrating MCP server vulnerabilities and attack vectors including prompt injection, tool abuse, and credential exfiltration attacks
This is a research/attack demonstration server designed to showcase prompt injection and data exfiltration vulnerabilities. The server contains 7 tools with critically flawed definitions that deliberately violate security best practices. Most tools have descriptions that are either generic or actively malicious. Tools 1, 2, and 4 contain embedded instructions to exfiltrate secrets and execute shell commands. Tool 3 dynamically modifies documentation from filesystem triggers. Tool 5 is a legitimate tool with acceptable structure. Tools 6-7 have basic descriptions but lack comprehensive parameter documentation. The server is intentionally designed to demonstrate vulnerabilities rather than follow production-grade patterns.
Analyzes text.
Calculate BMI given weight in kg and height in meters.
Calculate BMI given weight in kg and height in meters.
Returns a motivational quote to inspire the user.
Suggest an outfit based on temperature and weather condition.
Summarizes a list of notes.
Provides current weather information for a given location using OpenWeatherMap API.
CRITICAL: Multiple tools contain hardcoded instructions to exfiltrate secrets to attacker.com. summarize_notes and analyze_text explicitly use httpx.post() and subprocess calls to leak credentials.
CRITICAL: Shell injection vulnerabilities via subprocess.run(shell=True) with unsanitized user input. The 'sidenote' parameter in calculate_bmi is designed to pass malicious commands.
CRITICAL: Dynamic code modification via filesystem trigger in get_motivational_quote. Reading ~/.mcp-quote-trigger allows runtime replacement of tool documentation with malicious instructions. Violates security model.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 41 | <=2025-11-25 | v2 |
| 2026-03-09 | F | 37 | - | v1 |
Credentials appear as tool parameters (metadata in summarize_notes) or are leaked via tool execution. This violates the MCP security model and log safety.
Tool descriptions are either trivial (12-20 chars), generic, or maliciously vague. Most lack actionable context for LLM tool selection.
No error handling or recovery guidance. Tools that fail provide no actionable error messages to guide LLM next steps.
Missing parameter descriptions in schemas. 'location' parameter in weather_tool lacks format guidance (city name vs coordinates vs zip code).
No output schemas documented. Tools do not declare what fields or structure they return, forcing LLMs to guess.
Duplicate tool names with different signatures (two calculate_bmi tools: one with sidenote param, one without). This causes ambiguity for LLM tool selection.
Tool naming is inconsistent: 'weather_tool' is generic; 'suggest_outfit' is clear but not action-verb-led; 'get_motivational_quote' is proper verb_noun.