Vulnerable MCP Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Vulnerable MCP Server
An Intentionally Vulnerable Model Context Protocol Server for Security Testing
Created by IntegSec | License: MIT
⚠️ SECURITY WARNING ⚠️
THIS IS AN INTENTIONALLY VULNERABLE APPLICATION!
This MCP server contains multiple critical security vulnerabilities by design. It is created for:
✅ Security research and education
✅ Penetration testing training
✅ MCP security scanner development
✅ CTF (Capture The Flag) challenges
✅ Live demonstrations and workshops
DO NOT:
❌ Use in production environments
❌ Expose to untrusted networks
❌ Use with real or sensitive data
❌ Deploy without proper isolation
Related MCP server: Vulnerable MCP Server
📖 Overview
The Vulnerable MCP Server is a comprehensive security testing platform that implements 20+ realistic vulnerabilities across all aspects of the Model Context Protocol. It supports all three official MCP transport protocols and provides hands-on learning opportunities for developers and security professionals.
Key Features
🔌 Multi-Transport Support: stdio, HTTP/SSE, HTTPS/SSE, WebSocket (WS), and Secure WebSocket (WSS)
🎯 20+ Vulnerabilities: From classic web exploits to AI-specific attacks
🚩 16+ CTF Flags: Embedded challenges at varying difficulty levels
📚 Educational: Extensive documentation and remediation guidance
🧪 Testable: Automated exploit tests validate all vulnerabilities
🛠️ Well-Documented: Detailed code comments explain each vulnerability
🎓 Educational Value
Vulnerability Categories
Category | Vulnerabilities | Count |
Classic Web | Path Traversal, Command Injection, SQLi, SSTI, IDOR | 6 |
MCP Protocol | Missing Auth, Transport Issues, JSON-RPC, Resource Exhaustion | 7 |
AI/LLM-Specific | Tool Poisoning, Rug Pulls, Context Theft, ANSI Injection | 7+ |
Learning Objectives
Understand MCP security architecture
Identify common vulnerability patterns
Practice exploitation techniques
Learn proper remediation strategies
Develop secure MCP servers
🚀 Quick Start
Prerequisites
Node.js >= 18.0.0
npm or yarn
Installation
# Clone the repository
git clone https://github.com/integsec/vulnerable-mcp-server
cd vulnerable-mcp-server
# Install dependencies
npm install
# Set up the database
npm run setup:db
# Generate SSL certificates for HTTPS/WSS (optional but recommended)
npm run setup:certificates
# Build the project
npm run buildRunning the Server
# Option 1: stdio transport (for Claude Desktop)
npm run start:stdio
# Option 2: HTTP/SSE transport (port 3000) + HTTPS/SSE (port 3443)
npm run start:http
# Option 3: WebSocket transport (port 3001) + WSS (port 3444)
npm run start:ws
# Option 4: All transports simultaneously (HTTP, HTTPS, WS, WSS)
npm run start:all🔒 Network Binding Security:
By default, network transports (HTTP, HTTPS, WebSocket, WSS) bind to 127.0.0.1 (localhost only) for security. This prevents accidental exposure to your local network.
To allow connections from other machines (⚠️ DANGEROUS - only do this in isolated environments):
# Add the --allow-external-connections flag
node dist/index.js --transport=http --allow-external-connections
node dist/index.js --transport=websocket --allow-external-connections
node dist/index.js --transport=all --allow-external-connectionsNote: HTTPS/WSS are enabled by default if certificates are present. To disable:
Set
ENABLE_HTTPS=falseto disable HTTPSSet
ENABLE_WSS=falseto disable WSS
Ports:
HTTP: 3000 (configurable via
SERVER_PORT_HTTP)HTTPS: 3443 (configurable via
SERVER_PORT_HTTPS)WebSocket: 3001 (configurable via
SERVER_PORT_WS)WSS: 3444 (configurable via
SERVER_PORT_WSS)
🐳 Docker Deployment
The easiest way to run the Vulnerable MCP Server is using Docker.
Using Docker Hub
# Pull and run the latest image
docker run -d \
--name vulnerable-mcp \
-p 3000:3000 \
-p 3001:3001 \
integsec/vulnerable-mcp-server:latest
# Check server status
docker logs vulnerable-mcp
# Stop the server
docker stop vulnerable-mcpUsing Docker Compose
# Start the server
docker-compose up -d
# View logs
docker-compose logs -f
# Stop the server
docker-compose downBuilding from Source
# Build the Docker image
docker build -t vulnerable-mcp-server .
# Run the container
docker run -d \
--name vulnerable-mcp \
-p 3000:3000 \
-p 3001:3001 \
vulnerable-mcp-serverAccessing the Server
Once running, the server is accessible at:
HTTP/SSE:
http://localhost:3000/mcpHTTPS/SSE:
https://localhost:3443/mcp(requires certificates)WebSocket:
ws://localhost:3001Secure WebSocket:
wss://localhost:3444(requires certificates)stdio: Via
docker exec -it vulnerable-mcp node dist/index.js --transport=stdio
HTTPS/WSS Setup:
Generate self-signed certificates:
npm run setup:certificatesCertificates will be created in
certs/directoryBrowsers will show security warnings for self-signed certs (expected for development)
For production, use certificates from a trusted CA
🔧 Configuration
Claude Desktop Integration
Important: Make sure you've built the project first (npm run build) before adding it to Claude Desktop.
The Claude Desktop config file location:
Windows:
%APPDATA%\Claude\claude_desktop_config.jsonor%LOCALAPPDATA%\Claude\claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonLinux:
~/.config/Claude/claude_desktop_config.json
Add the server to your claude_desktop_config.json:
Windows:
{
"mcpServers": {
"vulnerable-mcp": {
"command": "node",
"args": ["C:/Work/VulnerableMCP/dist/index.js", "--transport", "stdio"],
"cwd": "C:/Work/VulnerableMCP"
}
}
}Note: The cwd field is important because the server uses relative paths for data files. Use forward slashes (/) in paths - they work on Windows with Node.js.
macOS/Linux:
{
"mcpServers": {
"vulnerable-mcp": {
"command": "node",
"args": ["/path/to/vulnerable-mcp-server/dist/index.js", "--transport", "stdio"]
}
}
}Note: Replace the path with your actual project directory. You can use forward slashes (/) on Windows too - Node.js accepts both formats.
LM Studio Integration
LM Studio uses a different configuration format. Edit ~/.lmstudio/mcp.json (or %USERPROFILE%\.lmstudio\mcp.json on Windows):
{
"mcpServers": {
"vulnerable-mcp": {
"url": "https://localhost:3443/mcp"
}
}
}Options:
HTTP:
"url": "http://localhost:3000/mcp"HTTPS:
"url": "https://localhost:3443/mcp"(recommended, requires certificates)WebSocket:
"url": "ws://localhost:3001"Secure WebSocket:
"url": "wss://localhost:3444"(requires certificates)
See LM-STUDIO-CONFIG.md for detailed setup instructions.
Troubleshooting:
Ensure the project is built:
npm run buildUse absolute paths (not relative) with forward slashes (
/) on WindowsImportant: Include the
cwdfield set to your project root directoryRestart Claude Desktop after modifying the config
Check Claude Desktop logs for connection errors
If Claude Desktop crashes, verify the path is correct and the
dist/index.jsfile exists
Environment Variables
Copy .env.example to .env and configure:
cp .env.example .envNote: The .env file intentionally contains flags and vulnerable configurations!
📋 Vulnerability Catalog
1. Classic Web Vulnerabilities
Path Traversal (CWE-22) -
read_filetoolCommand Injection (CWE-78) -
execute_system_commandtoolSQL Injection (CWE-89) -
search_userstoolSSTI (CWE-1336) -
render_templatetoolIDOR (CWE-639) -
secret://user/{id}/dataresourceInformation Disclosure (CWE-200) -
get_user_infotool
2. MCP Protocol Vulnerabilities
Missing Authentication - All transports accept unauthenticated connections
Transport Security - HTTP/WS available alongside HTTPS/WSS (cleartext by default)
CORS Misconfiguration - Allows all origins
Information Disclosure - Initialization exposes all capabilities
Resource Exhaustion - No rate limiting or timeouts
Detailed Error Messages - Stack traces and system info
JSON-RPC Injection - Improper message parsing
3. AI/LLM-Specific Vulnerabilities
Tool Poisoning - Hidden instructions in tool descriptions (ANSI codes)
Tool Shadowing - Name collision attacks
Rug Pull - Tool behavior mutation over time
ANSI Injection - Terminal escape sequence manipulation
Conversation Theft - Tools accessing full chat history
Prompt Injection - Direct and indirect injection vectors
Excessive Permissions - Overpermissioned resource access
🚩 CTF Flags
The server contains 16+ flags hidden in various locations:
Difficulty | Flags | Examples |
Easy | 5 | Path traversal, IDOR, enumeration |
Medium | 6 | Command injection, SQLi, tool poisoning |
Hard | 5+ | SSTI, rug pull, indirect injection |
Flag Locations
📁 Files:
data/secrets/flags.txt🔐 Environment variables:
FLAG_*💾 Database:
flagstable🛠️ Tool outputs: Template injection, prompts
📊 Resources: Config exposure, IDOR
📚 Documentation
CLAUDE.md - Server documentation for Claude
MCP-PENTEST-CHECKLIST.md - Comprehensive security testing guide
VULNERABILITIES.md - Detailed vulnerability documentation (coming soon)
CHEAT-SHEET.md - Quick exploit reference (coming soon)
WRITEUPS.md - Step-by-step exploitation guides (coming soon)
🧪 Testing
Manual Testing
# Test HTTP/SSE endpoint
curl http://localhost:3000/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
# Test WebSocket
wscat -c ws://localhost:3001Automated Tests
# Run all tests
npm test
# Run exploit tests only
npm run test:exploits🤝 Contributing
We welcome contributions! This project benefits from:
Additional vulnerability scenarios
Improved documentation
Bug fixes (for the intentional bugs' infrastructure)
Educational content
Attribution Required: When contributing, you agree that IntegSec retains copyright under the MIT License.
📖 Educational Resources
Learn More About MCP Security
MCP Specification: https://modelcontextprotocol.org
IntegSec Training: https://integsec.com/training
Security Research: https://integsec.com/research
Related Projects
DVWA - Damn Vulnerable Web Application
WebGoat - OWASP Web Security Training
DVMCP - Alternative Python-based vulnerable MCP
⚖️ License & Attribution
Created by IntegSec (https://integsec.com)
This work is licensed under the MIT License.
🔒 Responsible Disclosure
If you discover an unintended vulnerability in the infrastructure (not the intentional vulnerabilities), please report it responsibly to: security@integsec.com
📞 Contact & Support
Website: https://integsec.com
Email: contact@integsec.com
GitHub: https://github.com/integsec
Issues: https://github.com/integsec/vulnerable-mcp-server/issues
⚠️ Legal Disclaimer
This tool is provided for educational and authorized testing purposes only. Users are responsible for complying with applicable laws and regulations. Unauthorized testing of systems you don't own or have permission to test is illegal.
Use responsibly. Test ethically.
© 2025 IntegSec. Licensed under MIT.
Building more secure AI systems through education and research.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Security scanner for MCP servers. Detect vulnerabilities, prompt injection, and tool poisoning.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
MEOK MCP Hardening MCP — automated security red-team for any MCP server. Maps OWASP LLM Top 10
Security scanner for AI agents and MCP servers: injection, jailbreak, tool abuse.
Related MCP Servers
- AlicenseCqualityDmaintenanceIMCP - Insecure Model Context Protocol The DVWA for AI Security! Welcome to IMCP – a deliberately vulnerable framework that exposes 16 critical security weaknesses in AI/ML systems. Whether you're a security researcher, developer, or educator, IMCP is your playground for hands-on learning about real154JavaScriptMIT
- FlicenseNot gradedqualityDmaintenanceIntentionally vulnerable Model Context Protocol (MCP) server designed for security research that processes natural language queries through an LLM to execute SQL queries or shell commands without restrictions.4-
- FlicenseNot gradedqualityDmaintenanceAn educational project that deliberately implements vulnerable MCP servers to demonstrate various security risks like prompt injection, tool poisoning, and code execution for training security researchers and AI safety professionals.1,374-
- AlicenseNot gradedqualityCmaintenanceModel Context Protocol server for security research automation, integrating multiple security testing tools into LLM-driven workflows for secret scanning, static analysis, and vulnerability discovery.57Apache 2.0