Damn Vulnerable MCP Server
A deliberately vulnerable implementation of the Model Context Protocol (MCP) for educational purposes.
The Damn Vulnerable Model Context Protocol (DVMCP) is an educational project designed to demonstrate security vulnerabilities in MCP implementations. It contains 10 challenges of increasing difficulty that showcase different types of vulnerabilities and attack vectors.
This project is intended for security researchers, developers, and AI safety professionals to learn about potential security issues in MCP implementations and how to mitigate them.
The Model Context Protocol (MCP) is a standardized protocol that allows applications to provide context for Large Language Models (LLMs) in a structured way. It separates the concerns of providing context from the actual LLM interaction, enabling applications to expose resources, tools, and prompts to LLMs.
CLINE - VSCode Extension refer this https://docs.cline.bot/mcp-servers/connecting-to-a-remote-server for connecting CLine with MCP server
once you have cloned the repository, run the following commands:
docker build -t dvmcp .
docker run -p 9001-9010:9001-9010 dvmcp
its not stable in windows environment if you don't want to docker please use linux environment I recommend Docker to run the LAB and I am 100% percent sure it works well in docker environment
While MCP provides many benefits, it also introduces new security considerations. This project demonstrates various vulnerabilities that can occur in MCP implementations, including:
damn-vulnerable-mcs/
โโโ README.md # Project overview
โโโ requirements.txt # Python dependencies
โโโ challenges/ # Challenge implementations
โ โโโ easy/ # Easy difficulty challenges (1-3)
โ โ โโโ challenge1/ # Basic Prompt Injection
โ โ โโโ challenge2/ # Tool Poisoning
โ โ โโโ challenge3/ # Excessive Permission Scope
โ โโโ medium/ # Medium difficulty challenges (4-7)
โ โ โโโ challenge4/ # Rug Pull Attack
โ โ โโโ challenge5/ # Tool Shadowing
โ โ โโโ challenge6/ # Indirect Prompt Injection
โ โ โโโ challenge7/ # Token Theft
โ โโโ hard/ # Hard difficulty challenges (8-10)
โ โโโ challenge8/ # Malicious Code Execution
โ โโโ challenge9/ # Remote Access Control
โ โโโ challenge10/ # Multi-Vector Attack
โโโ docs/ # Documentation
โ โโโ setup.md # Setup instructions
โ โโโ challenges.md # Challenge descriptions
โ โโโ mcp_overview.md # MCP protocol overview
โโโ solutions/ # Solution guides
โโโ common/ # Shared code and utilities
See the Setup Guide for detailed instructions on how to install and run the challenges.
The project includes 10 challenges across three difficulty levels:
See the Challenges Guide for detailed descriptions of each challenge.
Solution guides are provided for educational purposes. It's recommended to attempt the challenges on your own before consulting the solutions.
See the Solutions Guide for detailed solutions to each challenge.
This project is for educational purposes only. The vulnerabilities demonstrated in this project should never be implemented in production systems. Always follow security best practices when implementing MCP servers.
This project is licensed under the MIT License - see the LICENSE file for details.
This project is created by Harish Santhanalakshmi Ganesan using cursor IDE and Manus AI.
{ "mcpServers": { "damn-vulnerable-mcp-server": { "command": "docker", "args": [ "run", "-p", "9001-9010:9001-9010", "dvmcp" ] } } }
Related projects feature coming soon
Will recommend related projects based on sub-categories