MCP Security
by edwiniac
README.md
# π MCP Security
[](https://github.com/edwiniac/mcp-security/actions/workflows/ci.yml)
[](https://www.python.org/downloads/)
[](https://opensource.org/licenses/MIT)
[](https://modelcontextprotocol.io)
**Security tools for AI assistants** β vulnerability scanning, CVE lookups, network analysis, and security assessments via the Model Context Protocol.
Let Claude, ChatGPT, or any MCP-compatible AI run security audits through natural language.
---
## β¨ Features
- **π Port Scanning** β Network reconnaissance with nmap or socket fallback
- **π‘οΈ CVE Lookup** β Search and analyze vulnerabilities from NVD
- **π IP Reputation** β Check IPs for malicious activity (AbuseIPDB)
- **π SSL/TLS Analysis** β Certificate validity, expiry, security issues
- **π Security Headers** β HTTP header audit with grades
- **π DNS Enumeration** β A, MX, TXT, NS records + SPF/DMARC checks
- **π WHOIS** β Domain registration and ownership data
- **ποΈ Shodan Integration** β Deep host intelligence
- **π Full Reports** β Comprehensive security assessments
## π Quick Start
### Installation
```bash
pip install mcp-security
```
Or install from source:
```bash
git clone https://github.com/edwiniac/mcp-security.git
cd mcp-security
pip install -e .
```
### Usage with Claude Desktop
Add to your `claude_desktop_config.json`:
```json
{
"mcpServers": {
"security": {
"command": "mcp-security",
"env": {
"SHODAN_API_KEY": "your-shodan-key",
"NVD_API_KEY": "your-nvd-key",
"ABUSEIPDB_API_KEY": "your-abuseipdb-key"
}
}
}
}
```
### Example Prompts
Once configured, ask Claude:
> "Scan example.com for open ports and check their SSL certificate"
> "Look up CVE-2024-1234 and tell me how severe it is"
> "Check the security headers on https://mysite.com"
> "Generate a full security report for 192.168.1.1"
> "Search for recent critical vulnerabilities in nginx"
## π οΈ Available Tools
| Tool | Description |
|------|-------------|
| `port_scan` | Scan for open ports and services |
| `cve_lookup` | Get detailed CVE information |
| `cve_search` | Search CVEs by keyword/severity |
| `ip_reputation` | Check IP for malicious activity |
| `ssl_check` | Analyze SSL/TLS certificates |
| `security_headers` | Audit HTTP security headers |
| `dns_lookup` | DNS enumeration with security notes |
| `whois_lookup` | Domain registration info |
| `shodan_host` | Shodan intelligence for IPs |
| `generate_report` | Comprehensive security assessment |
## π API Keys (Optional)
For full functionality, set these environment variables:
| Variable | Service | Get it from |
|----------|---------|-------------|
| `SHODAN_API_KEY` | Shodan | [shodan.io](https://shodan.io) |
| `NVD_API_KEY` | NVD CVE Database | [nvd.nist.gov](https://nvd.nist.gov/developers/request-an-api-key) |
| `ABUSEIPDB_API_KEY` | AbuseIPDB | [abuseipdb.com](https://www.abuseipdb.com/api) |
The server works without API keys but with reduced functionality.
## π Example Output
### Security Headers Check
```
Ask: "Check security headers for github.com"
β
Strict-Transport-Security: Present
β
Content-Security-Policy: Present
β
X-Frame-Options: DENY
β
X-Content-Type-Options: nosniff
β οΈ Permissions-Policy: Missing (optional)
Grade: A - Good
Score: 5/6 (83%)
```
### CVE Lookup
```
Ask: "Tell me about CVE-2024-1234"
CVE-2024-1234
π HIGH (7.5)
Description: A vulnerability in Example Software allows...
Published: 2024-01-15
CWE: CWE-79 (Cross-site Scripting)
References:
- https://nvd.nist.gov/vuln/detail/CVE-2024-1234
- https://example.com/advisory
```
## ποΈ Architecture
```
src/mcp_security/
βββ __init__.py
βββ server.py # MCP server with all security tools
tests/
βββ conftest.py # Shared fixtures
βββ test_helpers.py
βββ test_tools.py
```
## π§ͺ Testing
```bash
# Install dev dependencies
pip install -e ".[dev]"
# Run tests
pytest
# With coverage
pytest --cov=mcp_security --cov-report=term-missing
```
## β οΈ Security Considerations
- **Only scan targets you own or have permission to scan**
- Port scanning without permission may be illegal in some jurisdictions
- This tool is for authorized security assessments only
- API keys are sensitive β don't commit them to version control
## πΊοΈ Roadmap
- [ ] Nuclei template scanning
- [ ] Subdomain enumeration
- [ ] Web vulnerability scanning (XSS, SQLi detection)
- [ ] Compliance checks (PCI-DSS, HIPAA basics)
- [ ] Integration with more threat intel sources
- [ ] Export reports to PDF/HTML
## π License
MIT License β see [LICENSE](LICENSE) for details.
## π€ Author
**Edwin Isac** β AI Engineer
[GitHub](https://github.com/edwiniac) Β· [Email](mailto:edwinisac007@gmail.com)
---
*Part of [MCP Finance](https://github.com/edwiniac/mcp-finance) family of MCP servers.*
This server cannot be deployed
Maintenance
ActivityInactive
ResponsivenessNo recent community issues