Skip to main content
Glama
README.md
<p align="center">
  <img src="docs/assets/logo.png" alt="WireFox — Under the Crimson Moon" width="380">
</p>

<h1 align="center">WireFox MCP</h1>

<p align="center">
  Scope-governed cybersecurity orchestration over the Model Context Protocol.
</p>

<p align="center">
  <img alt="Python 3.12+" src="https://img.shields.io/badge/python-3.12%2B-blue">
  <img alt="MCP" src="https://img.shields.io/badge/MCP-2.x-6f42c1">
  <img alt="License" src="https://img.shields.io/badge/license-Apache--2.0-green">
</p>

WireFox is an MCP server that lets an AI client drive real security tooling **without giving the model authority over scope or approval**. Every operation is tied to a human-created engagement, intrusive work requires a human approval bound to the exact target and parameters, and manual-only tools are exposed as honest handoffs rather than fake automation.

It does not implement credential theft, persistence, evasion, destructive exploitation or autonomous exploitation. Those are out of scope by design.

## Why WireFox

Most "AI pentest" wrappers let the model decide what is in scope, approve its own risky actions, and report results it never observed. WireFox inverts that:

- **Scope is an engagement, not a prompt.** Targets are validated against authorized domains, IP ranges, exclusions, method allow/deny lists and time windows.
- **Approval is a human CLI action.** Approval tools exist, but decisions live in `wirefox approvals approve|reject`. An agent cannot approve its own request.
- **Approvals are fingerprints.** Target, operation and full parameter set are hashed. Change anything and the approval is invalid. Approvals are single-use and expire.
- **Manual means manual.** Metasploit, Cobalt Strike, sqlmap, BloodHound, Hydra and similar tools appear in the catalogue with `execution=manual`; execution returns a handoff plan and a failure, never a fabricated success.
- **Evidence is hashed.** Raw output and artifacts are stored with SHA-256 and can be re-verified.
- **Unknown stays unknown.** Severity and confidence are only emitted when the source provided them.

## Feature overview

| Area | What is implemented |
| --- | --- |
| Transports | STDIO by default; Streamable HTTP with Bearer authentication and DNS-rebinding protection |
| Persistence | SQLite by default; PostgreSQL via `asyncpg`; SQLAlchemy 2.0 async Core |
| Asset graph | Neo4j best-effort mirror with SQL fallback and authoritative SQL records |
| Governance | Engagements, method taxonomy, exclusions, time windows, emergency stop |
| Approvals | Fingerprint-bound, single-use, expiring, CLI-only decisions |
| Execution | argv-only subprocesses, timeouts, output caps, process-tree kill, concurrency and token-bucket rate limits |
| Evidence | SHA-256 verified raw output and tool artifacts |
| Normalization | Typed `NormalizedResult`, findings, assets, relations, audit records |
| Workflows | Passive recon, web assessment, web content discovery with approval pauses |
| Reporting | Markdown and JSON reports from persisted data only |
| Integrations | Passive CLI/API OSINT, DNS, port/service discovery, HTTP probing, web crawling, vulnerability scanning, code/container/cloud posture, vulnerability intelligence, DAST, and manual handoffs |

## Safety model

```text
MCP client
   │  run_integration(tool, operation, target, engagement_id, approval_id?)
   ▼
ExecutionService
   ├─ 1. Tool/operation must exist in the registry
   ├─ 2. Engagement must exist, be active, unexpired and inside its window
   ├─ 3. Target must match authorized domains/ranges and exclusions
   ├─ 4. Active operations re-resolve DNS and re-check every address
   ├─ 5. Intrusive/sensitive operations require a valid, unconsumed approval
   ├─ 6. Emergency stop is checked before every run
   ├─ 7. Concurrency, rate limit, timeout and output caps apply
   ├─ 8. Raw output is stored as SHA-256 evidence
   ├─ 9. Results/findings/assets are persisted and audited
   └─ 10. Graph mirror updates are best-effort; SQL remains authoritative
```

Approval requests are created by `approval_request` or `exploit_validation_plan`. A human then runs:

```bash
wirefox approvals approve apr_... --by "Jane Operator" --ttl-minutes 60
```

The agent can only *use* the approval ID. It cannot create, grant or extend one.

## Installation

Requirements: Python 3.12+, pip, and whichever external tools you intend to use.

```bash
git clone https://github.com/GonchiJoshnaVardhanReddy/wirefox-mcp.git
cd wirefox-mcp
python -m venv .venv
# Windows: .venv\Scripts\activate
# POSIX:   source .venv/bin/activate
pip install -e ".[dev]"
```

Initialize storage and inspect readiness:

```bash
wirefox db init
wirefox doctor
wirefox tools list
```

No security binaries are bundled. Tools report `NOT_INSTALLED` until you install them; API adapters report `API_KEY_REQUIRED` until credentials are configured.

## Quickstart

```bash
# 1. Create an engagement (operator CLI only by default)
wirefox engagement create \
  --org "Example Corp" \
  --domain example.com \
  --days 14 \
  --max-rps 3

# 2. Start the MCP server over STDIO
wirefox serve

# 3. Add it to an MCP client (example: Claude Desktop style config)
```

```json
{
  "mcpServers": {
    "wirefox": {
      "command": "wirefox-mcp",
      "env": {
        "WIREFOX_DATA_DIR": "D:/wirefox-data"
      }
    }
  }
}
```

Then, from the client:

1. `engagement_get` and `scope_check` to confirm authorization.
2. `integration_status` for the tools you plan to use.
3. `approval_request` for an intrusive step.
4. Human runs `wirefox approvals approve ...`.
5. `run_integration` with the approval ID.
6. `findings_list`, `evidence_verify`, `report_generate`.

## Configuration

All settings use the `WIREFOX_` prefix and can be provided via environment variables or `.env`.

| Variable | Default | Purpose |
| --- | --- | --- |
| `WIREFOX_DATA_DIR` | `./data` | Evidence, artifacts, reports and default SQLite location |
| `WIREFOX_DATABASE_URL` | `sqlite+aiosqlite:///./data/wirefox.db` | SQLAlchemy async URL; PostgreSQL supported |
| `WIREFOX_NEO4J_URI` | empty | Enables the Neo4j graph mirror |
| `WIREFOX_TRANSPORT` | `stdio` | `stdio` or `streamable-http` |
| `WIREFOX_MCP_HTTP_AUTH_TOKEN` | empty | Required for HTTP unless insecure mode is explicitly enabled |
| `WIREFOX_MCP_HTTP_HOST` / `PORT` / `PATH` | `127.0.0.1` / `8765` / `/mcp` | HTTP bind and endpoint |
| `WIREFOX_ALLOWED_HOSTS` | `127.0.0.1,localhost` | Host-header allow-list for HTTP |
| `WIREFOX_SCOPE_REQUIRED` | `true` | Keep enabled |
| `WIREFOX_BLOCK_PRIVATE_IPS` | `true` | Blocks RFC1918/loopback/link-local targets |
| `WIREFOX_ALLOW_AGENT_SCOPE_CREATION` | `false` | Allows MCP clients to create/close engagements |
| `WIREFOX_MAX_CONCURRENCY` | `4` | Global execution concurrency |
| `WIREFOX_DEFAULT_TIMEOUT_SECONDS` | `300` | Default per-operation timeout |
| `WIREFOX_DISABLED_TOOLS` | empty | Comma-separated integration keys to disable |

Credential variables are documented in [docs/configuration.md](docs/configuration.md). Secrets are redacted from logs, audit records and configuration output.

### Streamable HTTP

```bash
export WIREFOX_MCP_HTTP_AUTH_TOKEN="$(python -c 'import secrets; print(secrets.token_urlsafe(48))')"
wirefox serve --transport streamable-http --host 127.0.0.1 --port 8765
```

Requests must send `Authorization: Bearer <token>`. The server refuses to start HTTP without a token unless `WIREFOX_ALLOW_INSECURE_HTTP=true` is set for isolated testing. Host and Origin headers are validated.

## Tool surface

Governance and catalog:

- `server_info`, `health_check`, `governance_status`, `credentials_status`
- `engagement_create` (gated), `engagement_list`, `engagement_get`, `engagement_close` (gated)
- `scope_check`
- `integrations_list`, `integration_status`, `integration_describe`
- `approval_request`, `approval_status`, `approvals_list`, `exploit_validation_plan`

Execution and results:

- `run_integration`
- `findings_list`, `finding_get`
- `scans_list`, `scan_get`, `scan_cancel`
- `assets_list`, `asset_get`, `relations_list`, `attack_paths`, `graph_topology`
- `evidence_list`, `evidence_get`, `evidence_verify`
- `report_generate`, `reports_list`
- `workflow_definitions`, `workflow_start`, `workflow_status`, `workflow_list`, `workflow_resume`, `workflow_cancel`
- `emergency_stop`, `audit_list`

Resources: `wirefox://governance`, `wirefox://integrations`, `wirefox://engagements`, `wirefox://engagement/{id}/summary`, `wirefox://docs/operating-rules`, `wirefox://docs/quickstart`.

Prompts: `authorized_assessment_plan`, `intrusive_validation_review`, `findings_triage`, `client_report_outline`.

## Integration classification

The authoritative matrix is [docs/integrations.md](docs/integrations.md). Summary:

**Implemented and executable** (subject to installation/credentials):

- Passive CLI: Subfinder, Amass, theHarvester, gau, waybackurls, whois, Maigret, Sherlock
- Passive API: crt.sh, Shodan, Censys, VirusTotal, URLScan, SecurityTrails, AlienVault OTX, GreyNoise, HIBP, GitHub, Common Crawl, FOFA, ZoomEye, Wayback CDX
- DNS: dnspython resolver
- Active network/web: Nmap, Naabu, Masscan, RustScan, httpx, dnsx, Katana, WhatWeb, Wafw00f
- Intrusive web: ffuf, Nuclei, Nikto, WPScan, testssl.sh
- Code/container/cloud: Trivy, Semgrep, Gitleaks, Prowler, kube-bench
- Vulnerability intelligence: NVD, CISA KEV, FIRST EPSS, SearchSploit, SonarQube, Dependency-Track, NetBox
- DAST: OWASP ZAP (spider, alerts, approved active scan)

**Manual handoff only** (never executed): Metasploit, Cobalt Strike, Sliver, Empire, BeEF, sqlmap, Commix, ysoserial, Mimikatz, Impacket, Responder, NetExec, BloodHound, Rubeus, Certipy, Hashcat, John, Hydra, Medusa, Kerbrute, Chisel, Ligolo-ng, sshuttle, ProxyChains, Aircrack-ng, Kismet, Reaver, Wifite, BetterCAP, TShark, GoPhish, Evilginx, MobSF, Apktool, JADX, Frida, Objection, Burp Enterprise, Nessus, Qualys, Rapid7 InsightVM, OpenVAS/Greenbone, Acunetix, Invicti, DefectDojo, Vulners, Maltego, SpiderFoot, Recon-ng, ScoutSuite, Pacu, CloudFox.

**Required but not implemented here** (see docs): licensed platform APIs that require tenant-specific contracts, hardware/RF workflows, and any exploitation/persistence/evasion capability. Nothing is faked; unsupported requests return an explicit failure.

## Development

```bash
pip install -e ".[dev]"
pytest
ruff check .
mypy src
```

Tests mock subprocesses and HTTP services; they do not require external security tools, credentials or network access.

## Documentation

- [Architecture](docs/architecture.md)
- [Safety and governance](docs/safety.md)
- [Configuration](docs/configuration.md)
- [Integrations](docs/integrations.md)
- [Tools reference](docs/tools.md)
- [All tool names](docs/tool-names.md)
- [Workflows](docs/workflows.md)
- [Evidence and reporting](docs/evidence-and-reporting.md)
- [Deployment](docs/deployment.md)
- [Development](docs/development.md)
- [Troubleshooting](docs/troubleshooting.md)
- [Legal and ethics](docs/legal-and-ethics.md)

## Limitations

- Adapters marked `verification=template` were written against documented interfaces but were not exercised against a live service in the build environment. They report readiness honestly.
- Tool output schemas change between versions; parsers are defensive and surface parse errors instead of inventing data.
- Neo4j is optional. When unavailable, SQL remains authoritative and graph-only views return empty results with an explanation.
- Manual integrations require an operator. WireFox will not automate exploitation, credential access, persistence or evasion.
- You remain responsible for written authorization, laws, rules of engagement and target safety.

## License

Apache-2.0. See [LICENSE](LICENSE).

TDQS

B3.2/5.0

Scored across 40 tools

Disambiguation4/5

Most tools map cleanly to a distinct resource+action (findings, scans, assets, evidence, workflows, approvals), with descriptions that reinforce the boundaries. There is mild overlap in the observability cluster — server_info/governance_status/health_check all report posture, integration_status vs integrations_list can both surface readiness, and evidence_get overlaps with evidence_verify on hash checking — but an agent can still pick correctly.

Naming Consistency4/5

The dominant convention is a consistent snake_case <entity>_<action> pattern (engagement_get, scan_cancel, evidence_verify, workflow_resume), applied across nearly all subdomains. Deviations exist: run_integration flips to verb-first, and a few noun-only names (attack_paths, graph_topology, emergency_stop) break the pattern, but nothing is ambiguous.

Tool Count3/5

40 tools exceeds the comfortable range for agent tool selection, though the breadth is partly justified by the platform covering integrations, governance, engagements, scans, assets, findings, evidence, reports, workflows and audit. It is heavy but each subdomain holds only 2-5 tools, so the surface is gridded rather than padded.

Completeness4/5

Core lifecycles are well covered: engagements have create/list/get/close, workflows have definitions/start/status/list/resume/cancel, and evidence/reporting/governance/audit surfaces are present. Minor dead ends remain — no report_get to read generated report content, and no direct scan_start (scans must be kicked off via workflows or run_integration) — plus several operations are deliberately CLI-only (approval decisions, emergency-stop clear, credential writes).

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues