Skip to main content
Glama
offsec-mcp

offsec-mcp

by nadirzhon

offsec-mcp

Offensive-security tooling for AI agents — over the Model Context Protocol.

Give Claude, Cursor, or any MCP client the ability to run reconnaissance, pull CVE intelligence, analyze JavaScript, and scan ports — only against targets you're authorized to test.

CI Python MCP License


Why

Pentesters and bug-bounty hunters live in a dozen CLI tools. AI agents are great at orchestrating multi-step work — but they can't touch those tools. offsec-mcp bridges the gap: it exposes a focused set of security capabilities as MCP tools, so you can just ask —

"Enumerate subdomains of example.com, check which are live, and tell me if any run software with a critical CVE."

— and the agent chains recon_subdomains → http_probe → cve_search for you.

Built on battle-tested logic from reconwave, cve-forge, and jsintel.

Related MCP server: wrg-mcp-server

Guardrails first

This is a dual-use tool, so authorization is enforced in code, not left to good intentions:

  • Passive OSINT (CT logs, DNS, RDAP, NVD, analyzing pasted JS) runs freely — it never touches the target.

  • Active tools (port_scan, http_probe, security_headers) refuse to run unless the target is in your configured authorization scope. No scope → no active probing.

  • Discovered secrets are redacted in output, never returned in full.

See SECURITY.md for the responsible-use policy.

Tools

Tool

Type

What it does

recon_subdomains

passive

Sub-domain enumeration from Certificate Transparency (crt.sh)

dns_lookup

passive

A/AAAA/MX/NS/TXT/CNAME via DNS-over-HTTPS

whois

passive

Registration data via RDAP (registrar, dates, nameservers)

cve_search

passive

Search NVD by keyword, filter by CVSS

cve_lookup

passive

Full details + references for a CVE id

analyze_js

passive*

Extract secrets, endpoints & params from JS

http_probe

active

Status, headers & tech fingerprint of a URL

security_headers

active

Audit security headers, grade A–F

port_scan

active

Async TCP-connect scan of common/custom ports

scope_status

—

Report whether an authorization scope is set

* analyze_js is passive on pasted content; fetching a URL requires scope.

Install

Run instantly with uv — no clone needed:

uvx offsec-mcp        # runs the server (stdio) — or: pip install offsec-mcp

Or install from source:

git clone https://github.com/nadirzhon/offsec-mcp
cd offsec-mcp
uv pip install -e ".[dev]"

Configure your MCP client

Claude Desktop / Claude Code

Add to your MCP config (see examples/claude_desktop_config.json):

{
  "mcpServers": {
    "offsec": {
      "command": "uvx",
      "args": ["offsec-mcp"],
      "env": {
        "OFFSEC_SCOPE": "example.com,*.staging.example.com,10.0.0.0/24"
      }
    }
  }
}

Authorization scope

Active tools only run against hosts you list. Two ways to set it:

# inline — domains, wildcards, and CIDRs
export OFFSEC_SCOPE="example.com,*.staging.example.com,10.0.0.0/24"

# or a file, one entry per line (# comments allowed)
export OFFSEC_SCOPE_FILE="./scope.txt"

For a fully-owned lab you control, OFFSEC_ALLOW_ANY=1 disables the guard. NVD_API_KEY (optional) raises NVD rate limits.

Example session

You:   Find subdomains of example.com and check the main site's security headers.

Agent: → recon_subdomains("example.com")      → 143 subdomains from CT logs
       → security_headers("https://example.com")
       → Grade C (60): missing CSP, Permissions-Policy.
         www, api, staging, dev.example.com are live.

See examples/sample_output.md for real tool output.

Development

uv pip install -e ".[dev]"
pytest            # scope guard + tool logic
ruff check .

Part of an AI × Security toolkit

  • offsec-mcp — MCP server giving AI agents offensive-security tools (recon, CVE, JS analysis) · (this repo)

  • specter — autonomous AI recon agent that drives those tools end-to-end

  • vigil — AI security review for every pull request

  • mcpscan — security scanner for MCP servers (tool poisoning, injection surfaces)

  • State of MCP Security — research: 87% of scanned MCP servers expose a medium+ hardening issue

License

MIT — see LICENSE. Published for authorized security testing, research, and education only. You are responsible for having explicit permission to test any target.

Available Tools

10 tools
analyze_jsAnalyze JsB

Extract secrets, endpoints, and parameters from JavaScript (pasted content or a URL).

Inputs: source (required). Returns: object

cve_lookupCve LookupB

Fetch full details and references for a specific CVE id (e.g. CVE-2024-3094).

Inputs: cve_id (required). Returns: object

dns_lookupDns LookupB

Resolve A/AAAA/MX/NS/TXT/CNAME records for a domain (via DNS-over-HTTPS).

Inputs: domain (required). Returns: object

http_probeHttp ProbeB

Fetch a URL and report status, key headers, and detected technologies. [active — needs scope]

Inputs: url (required). Returns: object

port_scanPort ScanB

TCP-connect scan a host for open ports (defaults to common ports). [active — needs scope]

Inputs: host (required), ports. Returns: object

recon_subdomainsRecon SubdomainsA

Passively enumerate sub-domains of a domain from Certificate Transparency logs.

Inputs: domain (required). Returns: object

scope_statusScope StatusB

Report whether an authorization scope is configured for active tools.

Inputs: no named parameters. Returns: object

security_headersSecurity HeadersB

Audit a site's HTTP security headers and grade them A–F. [active — needs scope]

Inputs: url (required). Returns: object

whoisWhoisB

Look up domain registration data (registrar, dates, nameservers) via RDAP.

Inputs: domain (required). Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 10 tools

    Disambiguation4/5

    Most tools have clearly distinct targets: DNS, WHOIS, subdomain enumeration, CVE search/detail, JS analysis, HTTP probing, header auditing, and port scanning. The main potential confusion is between cve_search and cve_lookup, and between http_probe and security_headers, but descriptions make the boundaries reasonably clear.

    Naming Consistency3/5

    The set mixes conventions: noun_verb forms like dns_lookup, cve_search, and port_scan alongside verb_noun analyze_js, bare nouns like whois and security_headers, and the less predictable recon_subdomains. The names are readable, but there is no single consistent pattern.

    Tool Count5/5

    Ten tools is well-scoped for an offensive-security reconnaissance server. Each tool maps to a distinct phase or resource, and none appears redundant or trivial.

    Completeness4/5

    The surface covers a solid recon workflow: subdomain discovery, DNS, WHOIS, CVE research, JavaScript analysis, HTTP probing, security-header auditing, and port scanning, plus scope status. Minor gaps exist, such as URL/content discovery or broader vulnerability scanning, but core workflows are represented.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      C
      maintenance
      An MCP server that exposes over 20 standard penetration testing utilities, such as Nmap, SQLMap, and OWASP ZAP, as callable tools for AI agents. It enables natural language control over complex security workflows for automated and interactive penetration testing.
      117
      -
    • A
      license
      Not graded
      quality
      A
      maintenance
      An MCP server that exposes a 60+ tool security and threat-intel stack to AI agents, enabling secret scanning, Sigma rule generation, ransomware lookup, OSINT, and deep research.
      1
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      AI-powered Attack Surface Intelligence server that exposes industry-standard penetration testing tools via MCP, enabling AI agents to perform comprehensive security assessments.
      3
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      Production-grade MCP server that exposes Kali Linux penetration testing tools to AI agents, enabling automated reconnaissance, web application testing, vulnerability assessment, and more.
      1
      MIT