Quickstart · Benchmarks · Architecture · Security Model · Recipes · Comparison · License
Integrity Web Gate
The Safe 3-Tier Web Driver & Execution Firewall MCP for AI Agents, DevOps & Legacy Web UIs.
Give AI agents (Claude Desktop, Cursor, Antigravity, Codex, custom Python pipelines) fast, structured, SSRF-hardened web and API access — with zero mandatory third-party dependencies, automatic Playwright escalation only when JavaScript requires it, and a transactional Plan -> Preimage -> GO -> Verify -> Rollback execution firewall for state-changing writes.
3-Line Quickstart
Install source notice (PyPI verification):
integrity-web-gateis not yet published on PyPI — install directly from GitHub below until official Trusted Publishing (OIDC) is live. Once published, always verify the publisher isBlackBadHopebefore runningpip installto avoid dependency confusion / package squatting.
pip install git+https://github.com/BlackBadHope/integrity-web-gate.git # 100% Python 3.11+ stdlib core (zero mandatory deps)
integrity-web-gate doctor # Verify Tier-1 HTTP, 25 recipes, Tier-3 Playwright & MCP
python examples/quickstart_60s.py # Self-contained local 60-second end-to-end demo
Optional extras:
pip install "integrity-web-gate[browser] @ git+https://github.com/BlackBadHope/integrity-web-gate.git" # Tier-3 Playwright Chromium escalation
pip install "integrity-web-gate[h2] @ git+https://github.com/BlackBadHope/integrity-web-gate.git" # Optional HTTP/2 framing support
pip install "integrity-web-gate[dev] @ git+https://github.com/BlackBadHope/integrity-web-gate.git" # pytest development suite
MCP Client Configuration (Claude Desktop / Cursor / Antigravity)
Add integrity-web-gate-mcp to your MCP server config (claude_desktop_config.json, .cursor/mcp.json, or Antigravity MCP config):
{
"mcpServers": {
"integrity-web-gate": {
"command": "integrity-web-gate-mcp",
"args": []
}
}
}
Exposes 9 hardened JSON-RPC 2.0 stdio tools: web_probe, web_fetch, web_extract, web_plan_write, web_apply_write, web_record_cassette, web_replay_cassette, web_learn_recipe, and web_fleet_scan.
Real Local Benchmarks
Reproducible, zero-mock local benchmark (python benchmarks/bench_http_vs_playwright.py on Python 3.12, Windows, 127.0.0.1:0 ephemeral server; raw data in benchmarks/latest_results.json):
| Workload | Latency / Throughput | Payload Size | Est. LLM Tokens (chars/4) |
Notes |
|---|---|---|---|---|
Tier-1 Sync HTTP + Markdown Extract (SwissArmyDriver) |
7.37 ms avg (p50 5.79 ms, p95 23.05 ms) |
2,737 B | 684 tokens | 81.9% fewer tokens than raw HTML |
Tier-1 Sync HTTP JSON API (UniversalTransport) |
1.04 ms | 104 B | 26 tokens | Keep-Alive stdlib socket engine |
Tier-1 Async Fleet (AsyncFleetRunner, 200 reqs @ 40 conc.) |
127.61 ms total (1,567.3 req/s) |
200/200 OK | — | p50 31.0 ms, p95 32.0 ms, 0 failures |
| Tier-3 Playwright Chromium (Cold launch + load) | 566.95 ms | 15,100 B | 3,775 tokens | Full headless Chromium DOM |
| Tier-3 Playwright Chromium (Warm reload avg) | 24.88 ms (p50 22.54 ms) |
15,100 B | 3,775 tokens | 3.4x slower than Tier-1 warm |
Tier-3 Login -> handoff_to_http() -> Tier-1 /api/me |
10.70 ms (after 325.81 ms SPA login) |
1 cookie transferred | — | Browser auth -> fast HTTP session |
All 4 inline security gates verified during benchmark execution:
169.254.169.254cloud metadata SSRF: BLOCKED (SSRFBlockedError)Authorization&Set-Cookieheaders: SCRUBBED (SecretScrubber)apply_writewithout Owner GO token: REFUSED (GoRequiredError)- Cloudflare Turnstile / CAPTCHA page: FAIL-CLOSED (
ChallengeBlockedError)
3-Tier Architecture
- Tier 1 — Stdlib HTTP/TLS & Async Fleet: Pure Python 3.11+ socket/TLS transport (
UniversalTransport) andasyncioconcurrent runner (AsyncFleetRunner) with Keep-Alive pooling, HTTP/0.9 legacy fallback, RSA/Digest/CSRF/Form auth strategies, and offline scrubbed cassette record/replay. - Tier 2 — Declarative Recipe Engine & Auto-Learner: 25 validated JSON recipes (strictly zero
eval/exec/import) plusRecipeLearner(webdrv learn) to auto-generate declarative recipes from live endpoints. - Tier 3 — Browser Escalation & Cookie Handoff: Optional Playwright Chromium adapter (
BrowserEscalationAdapter) for JS-heavy SPAs with bidirectional session transfer (handoff_to_http()/escalate_from_http()) so agents authenticate once in Chromium and drop straight back to Tier-1 HTTP speed. - Compliant Human-Handoff: When a target presents MFA, SSO, or anti-bot challenges,
HumanHandoffCoordinatorpauses fail-closed and opens a local headed session for a human operator to complete sign-in — never attempting CAPTCHA bypass.
Security Model
Hardened across 33 adversarial Red Team findings:
- DNS-Once IP Pinning & SSRF Firewall: Resolves DNS once, validates all IPs against loopback/RFC1918/link-local/cloud-metadata (
169.254.169.254, IPv4-mapped IPv6::ffff:127.0.0.1, NAT64, 6to4, Teredo), and pins the validated socket IP to prevent DNS rebinding and redirect-to-internal attacks. - Keep-Alive Anti-Smuggling: Strict
Content-Length/Transfer-Encodingvalidation, header byte caps, response size caps, and automatic connection reset on malformed framing. - SecretScrubber: Automatically redacts
Authorization,Cookie,Set-Cookie, Bearer/JWT tokens, passwords, and API keys from logs, MCP responses, telemetry, and recorded cassettes. - Fail-Closed CAPTCHA & Anti-Bot Policy: Detects Cloudflare Turnstile, reCAPTCHA, hCaptcha, and login lockouts (
LockoutBreaker) and aborts with exit code6(ChallengeBlockedError) rather than brute-forcing or bypassing. - Transactional Write Firewall (
Plan -> Preimage -> GO -> Verify -> Rollback): Every mutating write captures a live SHA-256 preimage, checks drift under a per-targetDeviceLock, enforces an explicitowner_goapproval token (GoVerifier), verifies post-write state, and writes an executablerollback_plan.json.
25 Built-In Declarative Recipes + webdrv learn
Shipped inside the package (integrity-web-gate recipes):
- APIs & Web Standards:
generic_json_api,generic_form_csrf,graphql_endpoint,openapi_swagger,html_article_docs,html_data_table,rss_atom_feed,sitemap_xml,statuspage_health,github_public_repo - DevOps & Cloud Control Planes:
prometheus_metrics,grafana_api,traefik_dashboard,portainer_api,proxmox_ve,jenkins_web,wordpress_admin - Network & Legacy Embedded Web UIs:
mikrotik_webfig,tplink_smart_switch,zyxel_web_switch,bdcom_web_olt,hikvision_isapi,des1210_iss,des1228_classic,des3028_rompager
Generate a custom recipe for any internal panel in one command:
webdrv learn http://127.0.0.1:8080 --name my_panel --out my_panel.json --allow-loopback
Honest Comparison
| Capability | Integrity Web Gate | Playwright MCP | httpx / requests |
Netmiko | Firecrawl |
|---|---|---|---|---|---|
| Mandatory dependencies | 0 (stdlib) | Node + Chromium | 4–8 packages | Paramiko/TextFSM | Cloud API / Docker |
| SSRF / DNS-rebinding firewall | Built-in | Manual | None | N/A | Managed SaaS |
Transactional write Plan -> GO -> Rollback |
Built-in | None | None | Manual | Read-only |
| Token-efficient Markdown/JSON extraction | 81.9% smaller | Raw DOM/a11y | Raw HTML | CLI text | Markdown |
| Tier-1 -> Tier-3 Cookie Handoff | Built-in | Browser-only | HTTP-only | SSH-only | Managed |
| Legacy embedded HTTP/0.9 & switch Web UIs | Built-in | Fragile | Breaks on HTTP/0.9 | SSH/Telnet | No |
| Native stdio MCP server | Built-in (9 tools) | Built-in | No | No | Separate MCP |
License & Disclaimer
MIT License — see LICENSE. Security policy and responsible disclosure: SECURITY.md.
Independent Open-Source Project:
integrity-web-gateis an independent open-source project maintained by BlackBadHope and is not affiliated with, endorsed by, or sponsored by Anthropic, OpenAI, Cursor, Google, Cloudflare, or any hardware/software vendor mentioned in built-in recipes. Use only against targets you own or have explicit authorization to access, and respectrobots.txtand site terms of service.
Metadata
Release files for integrity-web-gate 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| integrity_web_gate-0.2.0.tar.gz | 139.8 kB | With provenance | Details for integrity_web_gate-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| integrity_web_gate-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for integrity_web_gate-0.2.0-py3-none-any.whl |
Total release size: 290.3 kB
Release files / integrity_web_gate-0.2.0.tar.gz
| Download URL | integrity_web_gate-0.2.0.tar.gz |
|---|---|
| Size | 139.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
939369001c5b84ebed87dd6f60eb57e36181023f4848e36f9c8609cb0c21a71c
|
|
BLAKE2b-256 checksum How to use checksums |
ccd4390577aaa319d8bff7c7c3b15f5a938441b8e2a1132f63c943bbadfc9124
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 3, 2026.
Transparency logRelease files / integrity_web_gate-0.2.0-py3-none-any.whl
| Download URL | integrity_web_gate-0.2.0-py3-none-any.whl |
|---|---|
| Size | 150.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a91ec06051f2e39892d6a69b654306b1861e236b0c6823f0977e33b1b812adda
|
|
BLAKE2b-256 checksum How to use checksums |
7f46cc5ab766f8f93a35cbea9671b734876367c8dfc0f9968bd4c350f2c904aa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 3, 2026.
Transparency logSecurity for integrity-web-gate 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for integrity_web_gate-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 3, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.