A Model Context Protocol (MCP) server that enables LLM agents to scan domains and URLs for common security vulnerabilities. Wraps a self-contained security scanning engine that checks DNS resolution, HTTP security headers, TLS configuration, and commonly exposed sensitive paths.
- DNS Resolution — Verifies the target domain resolves to an IP address
- HTTP Security Headers — Checks for HSTS, CSP, X-Frame-Options, X-Content-Type-Options, X-XSS-Protection, Referrer-Policy, and Server header disclosure
- TLS Verification — Establishes a TLS connection and reports the protocol version and certificate expiry
- Exposed Path Detection — Probes for commonly exposed sensitive paths (
.env,.git/config,wp-admin,phpinfo.php,server-status,actuator,.DS_Store,backup.zip,admin,api/docs,swagger-ui.html) - In-Memory Result Cache — Scan results are cached so the full JSON report can be retrieved later via
get_scan_report()
pip install apache-security-scan-mcpOr install from source:
git clone https://github.com/H4ck3r-netizen/apache-security-scan-mcp.git
cd apache-security-scan-mcp
pip install -e .apache-security-scan-mcpAdd the following to your MCP client configuration:
{
"mcpServers": {
"apache-security-scan": {
"command": "apache-security-scan-mcp"
}
}
}Or, if running from source:
{
"mcpServers": {
"apache-security-scan": {
"command": "python3",
"args": ["/full/path/to/src/mcp_scan_server.py"]
}
}
}Scan a URL or domain for security vulnerabilities.
Parameters:
| Parameter | Type | Description |
|---|---|---|
url |
str |
The URL or domain to scan (e.g. "example.com" or "https://example.com") |
Returns: A formatted security scan report with findings grouped by severity, including a Scan ID for retrieving the raw JSON later.
Example output:
🔒 Security Scan Report for example.com
Scan time: 2025-01-15T12:00:00+00:00
Findings: 0 critical · 2 warnings · 0 errors · 5 passed · 3 info
ℹ️ [INFO] DNS Resolution
example.com resolves to 93.184.216.34
🟢 [GOOD] ✓ Strict-Transport-Security
HSTS: max-age=31536000
🟡 [WARNING] ✗ Missing: Content-Security-Policy
CSP header is missing
Scan ID: a1b2c3d4e5f6g7h8
Use get_scan_report() with this ID for the raw JSON report.
Retrieve the full JSON scan report for a previously run scan.
Parameters:
| Parameter | Type | Description |
|---|---|---|
scan_id |
str |
The Scan ID returned by a prior scan_url() call |
Returns: The complete scan report as pretty-printed JSON, or an error message if the ID is not found.
Note: The cache is in-memory only — the scan must have been run in the same server session.
Check that the MCP Scan Server is running and ready.
Returns: A JSON status message confirming server health, version, and available tools.
Example output:
{
"status": "ok",
"service": "apache-security-scan-mcp",
"version": "1.0.0",
"tools": ["scan_url", "get_scan_report", "health_check"]
}pip install pytest
pytest tests/ -vapache-security-scan-mcp/
├── pyproject.toml
├── README.md
├── src/
│ └── mcp_scan_server.py # Main MCP server implementation
├── tests/
│ └── test_server.py # Unit tests
└── .github/
└── workflows/
└── ci.yml # CI pipeline
This project is licensed under the Apache License 2.0.