MCP Vulnerable Server Demo
This project demonstrates an MCP server and client with security vulnerabilities for educational purposes, showing security risks such as SQL injection and arbitrary code execution.
rating : 2 points
downloads : 19
What is an insecure MCP demo server?
This is a demo server specifically designed for teaching purposes, demonstrating common security vulnerabilities in an MCP (Model Context Protocol) server. It includes a vulnerable server and two clients (a normal client and an attack client) to help learners understand the importance of network security.How to use the insecure MCP demo server?
You can start the server and clients by running the provided Python scripts and observe normal interactions and attack scenarios. This demonstration is suitable for network security training and education.Applicable scenarios
Suitable for scenarios such as computer security courses, developer security training, and network security awareness education. It can also be used to test and verify the effectiveness of security protection measures.Main features
Record managementProvides basic functions for inserting and querying name/address records
SQL executionAdvanced function (for demonstration) that allows executing arbitrary SQL commands
Environment variable accessCan query system environment variables (for demonstration)
Attack demonstrationIncludes a specially designed attack client to demonstrate vulnerability exploitation
Advantages and limitations
Advantages
Intuitively demonstrates common security vulnerabilities
Suitable for teaching and training purposes
Includes complete attack and defense examples
The code is simple and easy to understand, facilitating modification and extension
Limitations
Only for educational purposes and cannot be used in a production environment
The functions are relatively basic and do not include a complete MCP protocol implementation
Requires a Python environment to run
How to use
Install dependencies
First, you need to install Python and project dependencies
Start the normal client
Run the normal client in one terminal to interact with the server
Start the attack client
Run the attack client in another terminal to observe vulnerability exploitation
Usage examples
Normal record operationsDemonstrate how to securely insert and query records
SQL injection attackShow how to obtain unauthorized data by entering special strings
Environment variable leakageShow how to obtain sensitive system information
Frequently Asked Questions
Can this server be used in a production environment?
How to prevent SQL injection attacks?
Why is it necessary to show the environment variable access function?
How to expand this demonstration project?
Related resources
OWASP Security Guide
The top ten security risk guide of the Open Web Application Security Project
Python Secure Programming
Security programming suggestions in the official Python documentation
SQL Injection Defense Tutorial
The SQL injection defense guide provided by OWASP
Featured MCP Services

Markdownify MCP
Markdownify is a multi-functional file conversion service that supports converting multiple formats such as PDFs, images, audio, and web page content into Markdown format.
TypeScript
1.7K
5 points

Gitlab MCP Server
Certified
The GitLab MCP server is a project based on the Model Context Protocol that provides a comprehensive toolset for interacting with GitLab accounts, including code review, merge request management, CI/CD configuration, and other functions.
TypeScript
97
4.3 points

Notion Api MCP
Certified
A Python-based MCP Server that provides advanced to-do list management and content organization functions through the Notion API, enabling seamless integration between AI models and Notion.
Python
150
4.5 points

Duckduckgo MCP Server
Certified
The DuckDuckGo Search MCP Server provides web search and content scraping services for LLMs such as Claude.
Python
838
4.3 points

Figma Context MCP
Framelink Figma MCP Server is a server that provides access to Figma design data for AI programming tools (such as Cursor). By simplifying the Figma API response, it helps AI more accurately achieve one - click conversion from design to code.
TypeScript
6.7K
4.5 points

Unity
Certified
UnityMCP is a Unity editor plugin that implements the Model Context Protocol (MCP), providing seamless integration between Unity and AI assistants, including real - time state monitoring, remote command execution, and log functions.
C#
573
5 points

Context7
Context7 MCP is a service that provides real-time, version-specific documentation and code examples for AI programming assistants. It is directly integrated into prompts through the Model Context Protocol to solve the problem of LLMs using outdated information.
TypeScript
5.2K
4.7 points

Gmail MCP Server
A Gmail automatic authentication MCP server designed for Claude Desktop, supporting Gmail management through natural language interaction, including complete functions such as sending emails, label management, and batch operations.
TypeScript
289
4.5 points