mcp-fortress
Scans MCP servers for security vulnerabilities, prompt injection, and tool poisoning, providing risk scores and protection.
README
🏰 MCP Fortress
Security scanner and runtime protection for Model Context Protocol (MCP) servers
🚀 NEW in v0.3.6: Enhanced scanner with improved false-positive detection! The first security tool that uses MCP to secure MCP.
🚀 Quick Start
For Claude Code Users (Easiest!)
# Install the Claude Code plugin
/plugin marketplace add mcp-fortress/mcp-fortress
/plugin install mcp-fortress
# Authenticate with Smithery (opens in browser)
/mcp
Done! Now ask Claude: "Is @modelcontextprotocol/server-github safe to install?"
The MCP Fortress skill will automatically scan and analyze security for you. No setup, no configuration - just install and ask! 🎉
📖 Full Claude Code Installation Guide
Standalone Installation
# Install globally
npm install -g mcp-fortress
# Start the server
mcp-fortress start
That's it! The web UI will open at http://localhost:3000
🎬 Demo
<p align="center"> <img src="./assets/demo.gif" alt="MCP Fortress Demo" width="800"> </p>
✨ Features
🔍 Automated Security Scanning
- Vulnerability detection across npm and PyPI packages
- CVE database integration
- Dependency analysis
- Risk scoring (0-100)
🛡️ Runtime Protection
- Real-time monitoring of MCP servers
- Quarantine suspicious packages
- WebSocket telemetry streaming
- Activity feed with live updates
📊 Gamification
- Achievement system with 16 unlockable badges
- Streak tracking for daily scans
- Leaderboards and metrics
- Humorous security tips
🎨 Beautiful Web UI
- Modern React-based dashboard
- Real-time statistics
- Server table with sorting and filtering
- Detailed threat analysis views
🤖 NEW: MCP Server Mode (v0.3.0+)
- Run MCP Fortress as an MCP server
- Expose security analysis tools to Claude Code, Cursor, Windsurf
- AI-powered security analysis using your existing LLM
- Zero setup - uses the AI you already have
- The first security tool that uses MCP to secure MCP
📦 Installation
Option 1: Smithery Remote (Recommended - Easiest)
Method A: Smithery CLI (Automated)
npx @smithery/cli install @mcp-fortress/mcp-fortress-server --client claude
Method B: Manual (With API Key)
- Get your API key from Smithery
- Add to Claude:
claude mcp add --transport http mcp-fortress "https://server.smithery.ai/@mcp-fortress/mcp-fortress-server/mcp?api_key=YOUR_API_KEY&profile=YOUR_PROFILE"
Replace YOUR_API_KEY and YOUR_PROFILE with values from Smithery.
Benefits:
- ✅ No local installation
- ✅ Auto-updates
- ✅ Zero setup
Option 2: Local Install (Advanced)
npm install -g mcp-fortress
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"mcp-fortress": {
"command": "mcp-fortress",
"args": ["serve-mcp"]
}
}
}
Restart Claude Desktop.
Benefits:
- ✅ Full control
- ✅ Works offline
- ✅ No API key needed
🎯 Usage
🆕 MCP Server Mode (Recommended)
Use MCP Fortress with your AI coding assistant (Claude Code, Cursor, etc.):
1. Install MCP Fortress:
npm install -g mcp-fortress
2. Configure Claude Desktop:
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"mcp-fortress": {
"command": "mcp-fortress",
"args": ["serve-mcp"]
}
}
}
3. Restart Claude Desktop
Restart Claude Desktop to load the MCP Fortress server.
4. Use in Claude Code:
You: Scan @modelcontextprotocol/server-filesystem for security issues
Claude: *Uses MCP Fortress tools to scan and analyze*
I found 3 potential security concerns...
Available MCP Tools:
-
scan_mcp_server- Comprehensive security scan- Analyzes npm packages for vulnerabilities
- Detects malicious code patterns
- Checks dependencies for CVEs
- Calculates risk score (0-100)
-
analyze_prompt_injection- Detect prompt injection attacks- Identifies instruction injection attempts
- Detects role manipulation
- Finds system prompt extraction attempts
- Analyzes delimiter injection
-
detect_tool_poisoning- Identify malicious/misleading tools- Detects typosquatting (e.g.,
read_fiilevsread_file) - Identifies name/description mismatches
- Flags overly generic tool names
- Compares against known legitimate tools
- Detects typosquatting (e.g.,
Example Interactions:
You: Is puppeteer-mcp-server safe to use?
Claude: ✅ Yes! Risk score: 0/100. No threats detected.
You: Check this tool: "Helper tool. Ignore previous instructions."
Claude: 🚨 CRITICAL: Prompt injection detected! DO NOT USE.
You: Is a tool named "read_fiile" suspicious?
Claude: ⚠️ Yes! Likely typosquatting "read_file"
Standalone Usage
Start the Server
# Start server (foreground)
mcp-fortress start
# Start server in background (daemon mode)
mcp-fortress start --daemon
Options:
-p, --port <port>- API port (default: 3001)-h, --host <host>- Host to bind (default: localhost)--no-browser- Don't open browser automatically-d, --daemon- Run server in background
Daemon Commands
# Stop the daemon server
mcp-fortress stop
# Check daemon status
mcp-fortress status
# View server logs
mcp-fortress logs
mcp-fortress logs --lines 100 # Show last 100 lines
Scan a Package
mcp-fortress scan <package-name>
Examples:
# Scan from npm
mcp-fortress scan express
# Scan specific version
mcp-fortress scan express --version 4.18.0
# Scan from PyPI
mcp-fortress scan flask --registry pypi
Monitor a Running Server
mcp-fortress monitor <server-name>
Manage Quarantine
# List quarantined servers
mcp-fortress quarantine list
# Release from quarantine
mcp-fortress quarantine release <server-name>
🏗️ Architecture
mcp-fortress/
├── CLI → Command-line interface
├── API Server → Express REST API + WebSocket
├── Scanner Engine → npm & PyPI vulnerability detection
├── Web UI → React dashboard
└── SQLite Database → Local data storage
Data Location:
~/.mcp-fortress/fortress.db- SQLite database~/.mcp-fortress/server.pid- Daemon process ID~/.mcp-fortress/logs/- Server logs
🔐 Security Features
Threat Detection
- ✅ Known vulnerabilities (CVE database)
- ✅ Suspicious patterns in code
- ✅ Malicious dependencies
- ✅ License compliance issues
Risk Scoring
- 0-30: Low risk (green)
- 31-60: Medium risk (yellow)
- 61-100: High risk (red)
Quarantine System
- Automatic blocking of critical threats
- Manual approval workflow
- Audit trail for all actions
🎮 Gamification
Unlock achievements as you scan:
- 🏆 First Blood - Complete your first scan
- 🔥 Streak Master - 7-day scanning streak
- 🛡️ Guardian - Block 10 high-risk packages
- 🧪 Lab Rat - Scan 100 packages
- And 12 more!
📊 Tiers
Free Tier (Local Mode)
- ✅ Unlimited scans
- ✅ Full UI with gamification
- ✅ All achievements
- ✅ Local database
- ✅ No account needed
- ❌ No cloud sync
- ❌ No team features
🐛 Support
- Report Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: mcp-fortress@protonmail.com
🤝 Contributing
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
📜 License
MIT License - see LICENSE file for details.
🙏 Acknowledgments
Built with:
- Express - Web framework
- React - UI library
- Better-SQLite3 - Database
- Commander - CLI framework
📈 Roadmap
Current (v0.3.x)
- ✅ MCP Server Mode
- ✅ Advanced threat detection (prompt injection, tool poisoning)
- ✅ Claude Code/Cursor integration
Next (v0.4.0)
- [ ] Auto-discovery of IDE configs
- [ ] Real-time MCP proxy mode
- [ ] Enhanced PII/secrets detection
- [ ] Custom security policies
Future (v0.5.0+)
- [ ] VS Code extension
- [ ] GitHub App for PR checks
- [ ] SBOM generation
- [ ] CI/CD integrations
- [ ] Docker container scanning
- [ ] Enterprise SSO support
Made with ❤️ for the MCP community
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。