loading…
Search for a command to run...
loading…
Enables AI assistants to scan project dependencies and Infrastructure as Code files for security vulnerabilities and misconfigurations. It also provides automat
Enables AI assistants to scan project dependencies and Infrastructure as Code files for security vulnerabilities and misconfigurations. It also provides automated fixing capabilities to remediate identified security issues.
An MCP (Model Context Protocol) server that gives AI assistants like Cursor, Claude, and other MCP-compatible tools the ability to scan for security vulnerabilities and automatically fix them.
This MCP server exposes powerful security tools to your AI assistant:
| Tool | Description |
|---|---|
scan_dependencies |
Scans your project's dependencies for known vulnerabilities using the OSV database |
scan_iac |
Scans Infrastructure as Code files for security misconfigurations |
fix_vulnerability |
Automatically updates vulnerable packages to secure versions |
fix_iac |
Generates and applies fixes for IaC security issues |
| Tool | Description |
|---|---|
generate_sbom |
Generate Software Bill of Materials in CycloneDX or SPDX format |
check_compliance |
Check against SOC2, HIPAA, PCI-DSS, NIST 800-53, CIS, and ISO 27001 |
| Tool | Description |
|---|---|
detect_vulnerable_endpoints |
Find API endpoints using vulnerable packages |
analyze_request |
Analyze HTTP requests for SQL injection, XSS, and other attacks |
get_sensor_config |
Generate SecurityMiddleware configuration for FastAPI/Flask |
| Tool | Description |
|---|---|
create_fix_pr |
Create a GitHub PR with security fixes |
requirements.txt, pyproject.toml, Pipfile, Pipfile.lock, poetry.lock, setup.pypackage.json, package-lock.json, yarn.lockpom.xml, build.gradlecsproj, packages.configcomposer.json, composer.lockenvironment.yml.tf files).yaml, .yml, .json)The scanner checks for misconfigurations across multiple cloud providers:
AWS
Azure
GCP
Kubernetes
pip install security-use-mcp
git clone https://github.com/security-use/mcp.git
cd mcp
pip install -e .
Install the package (see above)
Add to Cursor's MCP configuration (~/.cursor/mcp.json):
{
"mcpServers": {
"security-use": {
"command": "security-use-mcp",
"args": [],
"env": {}
}
}
}
If you installed from source or use a virtual environment:
{
"mcpServers": {
"security-use": {
"command": "python",
"args": ["-m", "security_use_mcp.server"],
"env": {}
}
}
}
Restart Cursor
Test it - Open Cursor's AI chat and ask:
"Scan this project for security vulnerabilities"
Once configured, you can ask your AI assistant things like:
## Dependency Security Scan Results
**Found 2 vulnerabilities**
### CRITICAL (1)
#### requests (2.25.0)
- **ID**: GHSA-xxxx-yyyy-zzzz
- **Title**: CVE-2023-32681 - Unintended leak of Proxy-Authorization header
- **Fixed in**: 2.31.0
### HIGH (1)
#### django (3.1.0)
- **ID**: CVE-2023-xxxxx
- **Title**: SQL Injection in QuerySet.values()
- **Fixed in**: 3.2.19
## Compliance Check Results
**Framework**: SOC 2 Type II
**Files Scanned**: 15
### Summary
- **Total IaC Findings**: 8
- **Findings Mapped to SOC 2**: 6
### CC6.1: Logical and Physical Access Controls
- **CKV_AWS_23**: Security group allows unrestricted ingress
- File: `sg.tf:8`
- Severity: HIGH
### CC6.6: System Operations - Encryption
- **CKV_AWS_19**: S3 bucket without encryption
- File: `s3.tf:15`
- Severity: HIGH
## Request Security Analysis
**Method**: GET
**Path**: /api/users
**Source IP**: 192.168.1.100
### ⚠️ 1 Potential Threat(s) Detected
#### 🔴 SQL_INJECTION
- **Severity**: CRITICAL
- **Confidence**: 95%
- **Description**: SQL injection attempt detected in query parameter
- **Location**: query
- **Field**: id
- **Matched Value**: `1' OR '1'='1`
### Recommendations
1. Block this request if in production
2. Log the source IP for monitoring
3. Review application input validation
| Variable | Description | Default |
|---|---|---|
SECURITY_USE_LOG_LEVEL |
Logging level (DEBUG, INFO, WARN, ERROR) | INFO |
SECURITY_USE_CACHE_DIR |
Directory for caching vulnerability data | System temp |
SECURITY_USE_API_KEY |
API key for dashboard alerting | None |
Example configuration with environment variables:
{
"mcpServers": {
"security-use": {
"command": "security-use-mcp",
"args": [],
"env": {
"SECURITY_USE_LOG_LEVEL": "DEBUG",
"SECURITY_USE_API_KEY": "your-api-key"
}
}
}
}
# Clone the repository
git clone https://github.com/security-use/mcp.git
cd mcp
# Create virtual environment
python -m venv .venv
source .venv/bin/activate
# Install with dev dependencies
pip install -e ".[dev]"
# Also install the core security-use package
pip install -e ../security-use
# Run all tests
pytest
# Run with coverage
pytest --cov=security_use_mcp
# Run specific test file
pytest tests/test_handlers.py -v
# Check code style
ruff check src/ tests/
# Auto-fix issues
ruff check src/ tests/ --fix
You can test the MCP server directly:
# Start the server (it communicates via stdin/stdout)
python -m security_use_mcp.server
# Or use the entry point
security-use-mcp
Check Python version (requires 3.10+):
python --version
Verify installation:
pip show security-use-mcp
pip show security-use
Test the server directly:
python -c "from security_use_mcp.server import server; print('OK')"
mcp.jsonsecurity-use-mcp/
├── src/security_use_mcp/
│ ├── server.py # MCP server implementation
│ ├── models.py # Data models for results
│ └── handlers/ # Tool handlers
│ ├── dependency_handler.py # Dependency scanning/fixing
│ ├── iac_handler.py # IaC scanning/fixing
│ ├── github_handler.py # GitHub PR creation
│ ├── sbom_handler.py # SBOM generation
│ ├── compliance_handler.py # Compliance checking
│ └── sensor_handler.py # Runtime security tools
└── tests/
├── test_server.py # Server tests
├── test_handlers.py # Handler unit tests
├── test_new_handlers.py # New handler tests
└── test_integration.py # Integration tests
The MCP server wraps the security-use Python package, which provides:
MIT
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"security-use-mcp-server": {
"command": "npx",
"args": []
}
}
}