Security & OSINT MCP Server
Provides HTTP header inspection capabilities using curl -I to audit security headers such as HSTS, CSP, CORS, and X-Frame-Options for a target domain.
Provides TLS/SSL certificate inspection using openssl s_client to extract certificate subject, issuer, SANs, and handshake status for a target domain.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Security & OSINT MCP Server Audit the HTTP security headers for example.com"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Security & OSINT Python MCP Server
An Enterprise-Grade Model Context Protocol (MCP) server that exposes POSIX networking and OSINT utilities (dig, curl, openssl, whois) to LLM host environments like Antigravity CLI, Claude Desktop, and Cursor IDE via stdio transport.
Designed with strict command-injection defense mechanisms to prevent Remote Code Execution (RCE) during agentic tool calls.
Architecture & Threat Model
graph TD
A[LLM Client / Antigravity / Claude] -->|stdio JSON-RPC| B(FastMCP Server)
B --> C{Regex & Flag Sanitizer}
C -->|Invalid / Injection Attempt| D[Reject with Error]
C -->|Valid Arguments| E[Safe Subprocess Executor]
E -->|shell=False + Vector Args| F[Linux CLI Utilities: dig, curl, openssl, whois]
F --> G[Output Parser]
G -->|Structured Markdown Tables| ASecurity & Defense Engine Specs
No Shell Execution (
shell=False): Inputs are passed purely as argument vectors (subprocess.run(["cmd", "arg"])). Shell metasymbols (|,;,&&,$(),`) are treated as literal characters and neutralized.Option Flag Defense: Parameters starting with
-are rejected to block argument injection (e.g.,-o /etc/passwd).Strict Input Regex Validation: Enforces RFC-compliant domain name and IPv4 format matching prior to command invocation.
Process Lifespan Isolation: Enforces 10-second hard timeouts per subprocess call to avoid denial-of-service conditions.
Stdio Protocol Protection: All standard logging is isolated strictly to
sys.stderrto maintain clean JSON-RPC communication on stdout.
Related MCP server: connectivity-diagnostics
Features & Tool Wrappers
Tool Endpoint | Wrapped Binary | Description | Output Format |
|
| Resolves | Markdown Table (Record, TTL, Value) |
|
| Audits security headers ( | Security Compliance Audit Table |
|
| Extracts Subject, Issuer, SANs, and handshake status. | Executive TLS Summary Table |
|
| Queries domain registrar, creation, and expiration dates. | Domain Lifecycle Metadata Table |
Quickstart
Prerequisites
Linux (Arch, Debian/Ubuntu, RHEL) or macOS
Python 3.11+
uvpackage manager (sudo pacman -S uvorcurl -LsSf https://astral.sh/uv/install.sh | sh)System utilities:
dig,curl,whois,openssl
Installation
Clone the repository:
git clone https://github.com/minhajadab3836/Security-MCP cd security-mcp-serverAudit local CLI dependencies:
uv run python -m src.security_mcp.auditRun unit & security defense tests:
uv run python -m src.security_mcp.test_defense uv run python -m src.security_mcp.test_tools
MCP Client Configuration
Add this entry to your host client configuration file (e.g., ~/.config/antigravity/mcp_config.json, claude_desktop_config.json, or .cursor/mcp.json):
{
"mcpServers": {
"security-osint": {
"command": "uv",
"args": [
"run",
"--directory",
"/path/to/security-mcp-server",
"python",
"-m",
"src.security_mcp.server"
]
}
}
}Demonstration & Example Outputs
To see the exact structured Markdown tables generated by the server during a live agentic workflow, inspect our captured test run:
Prompt: "Run a DNS lookup and HTTP security header audit on https://github.com"
Full Output Report: View Captured Markdown Output (
tests/test_output.md)
License
Distributed under the MIT License. See LICENSE for details.
Available Tools
4 toolsdns_lookupA
Performs DNS resolution for A, AAAA, MX, and TXT records on a target domain name.
Args: domain: Target domain name (e.g. 'example.com')
Returns: Structured Markdown table containing DNS record types, TTLs, and values.
Inputs: domain (required). Returns: result
http_header_inspectorB
Fetches HTTP response headers and conducts a security header compliance audit.
Args: url: Full target URL (e.g. 'https://example.com')
Returns: Structured Markdown audit of security headers (HSTS, CSP, CORS, etc.).
Inputs: url (required). Returns: result
ssl_cert_inspectorA
Inspects TLS/SSL certificate details including Subject, Issuer, SANs, and handshake status.
Args: target: Target domain or IP address (e.g. 'example.com')
Returns: Structured Markdown breakdown of TLS certificate properties.
Inputs: target (required). Returns: result
whois_lookupB
Executes WHOIS query to retrieve domain registration, registrar, creation, and expiry data.
Args: domain: Target domain name (e.g. 'example.com')
Returns: Structured Markdown table with domain lifecycle and registrar details.
Inputs: domain (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool targets a clearly distinct data source: DNS records, HTTP response headers, TLS certificates, and WHOIS registration data. There is no plausible scenario where an agent could confuse these four operations, and the argument names (domain/url/target) roughly mirror what each tool needs.
All names are snake_case with a subject-first convention (dns_, whois_, http_header_, ssl_cert_), which is predictable. The only minor deviation is the suffix style: 'lookup' (verb) vs 'inspector' (agent noun), though the intent is still obvious.
Four tools is a lean but coherent scope for a passive recon server, and each earns its place. It sits slightly on the thin side for a server branded 'Security & OSINT', which suggests a broader mandate than four lookups.
The core passive recon surface is covered: DNS, whois, TLS, and HTTP header auditing, which form a natural lifecycle for domain triage. Gaps exist for common recon needs such as subdomain enumeration, IP/ASN geolocation, or CVE/vulnerability lookup, but the essentials are present with no dead ends.
Maintenance
Related MCP Connectors
DNS, WHOIS, IP geolocation and SSL checks as agent tools.
Passive OSINT and security recon: DNS, TLS, email posture, IP reputation, CVE/KEV, CT logs.
Free, no-API-key network lookups for AI agents — IP geolocation, DNS, WHOIS, HTTP and SSL/TLS certificate checks, and full domain health reports.
Utility tools for AI agents: hashing, text stats, validation, DNS, currency, GEO audits.
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceProvides safe, controlled access to network and system diagnostic tools including ping, nmap, dig, traceroute, curl, and whois for troubleshooting connectivity, scanning ports, and performing DNS lookups through whitelisted commands with security validation.-
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to perform real network diagnostics on the local machine, including ping, traceroute, DNS lookups, TLS checks, and more.MIT
- AlicenseNot gradedqualityCmaintenanceProvides DNS and network-reconnaissance tools that let agents run lookups for records, reverse DNS, ping, passive subdomain discovery, shared nameservers, geolocation, reverse IP, ASN, HTTP headers, subnet arithmetic and page links, plus key-gated WHOIS, MTR and traceroute. Responses are parsed into structured JSON with verbatim raw text, and it runs either through a hosted gateway or as a local stdio server.86 npmMIT
- FlicenseNot gradedqualityBmaintenanceExposes 21 tools over stdio that let any MCP-capable AI agent run real Kali-container security tools (nmap, nuclei, sqlmap, Metasploit), search a local 59,000+ CVE vulnerability database, and browse a 5,266-entry GitHub security tool index. Built-in guardrails refuse government, education, and military domains, and only whitelisted in-container executables can be invoked.3-