Skip to main content
Glama

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

pip install integrity-web-gate          # 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]"   # Tier-3 Playwright Chromium escalation
pip install "integrity-web-gate[h2]"        # Optional HTTP/2 framing support
pip install "integrity-web-gate[dev]"       # 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.


Related MCP server: AgentSentinel MCP Gateway

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.254 cloud metadata SSRF: BLOCKED (SSRFBlockedError)

  • Authorization & Set-Cookie headers: SCRUBBED (SecretScrubber)

  • apply_write without Owner GO token: REFUSED (GoRequiredError)

  • Cloudflare Turnstile / CAPTCHA page: FAIL-CLOSED (ChallengeBlockedError)


3-Tier Architecture

                         +------------------------------------+
                         |  AI Agent / CLI / MCP Stdio Client |
                         +-----------------+------------------+
                                           |
                    +----------------------v----------------------+
                    |   Execution & SSRF Firewall (Security Gate) |
                    |  DNS-once IP Pinning | SecretScrubber | GO  |
                    +------+---------------+---------------+------+
                           |               |               |
         +-----------------+     +---------+---------+     +-------------------+
         v                       v                   v                         v
+-----------------+    +-------------------+   +-------------------+   +---------------+
| Tier 1: Stdlib  |    | Tier 2: 25 JSON   |   | Tier 3: Optional  |   | Compliant     |
| HTTP/1.1 + Async|    | Declarative       |   | Playwright        |   | Human-Handoff |
| Fleet Engine    |<-->| Recipes & Learner |<->| Chromium Adapter  |-->| (SSO / MFA /  |
| (Zero Deps)     |    | (Zero eval/exec)  |   | (Cookie Handoff)  |   |  CAPTCHA)     |
+-----------------+    +-------------------+   +-------------------+   +---------------+
  1. Tier 1 — Stdlib HTTP/TLS & Async Fleet: Pure Python 3.11+ socket/TLS transport (UniversalTransport) and asyncio concurrent runner (AsyncFleetRunner) with Keep-Alive pooling, HTTP/0.9 legacy fallback, RSA/Digest/CSRF/Form auth strategies, and offline scrubbed cassette record/replay.

  2. Tier 2 — Declarative Recipe Engine & Auto-Learner: 25 validated JSON recipes (strictly zero eval/exec/import) plus RecipeLearner (webdrv learn) to auto-generate declarative recipes from live endpoints.

  3. 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.

  4. Compliant Human-Handoff: When a target presents MFA, SSO, or anti-bot challenges, HumanHandoffCoordinator pauses 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-Encoding validation, 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 code 6 (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-target DeviceLock, enforces an explicit owner_go approval token (GoVerifier), verifies post-write state, and writes an executable rollback_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

MIT License — see LICENSE.

Available Tools

9 tools
web_apply_writeA

Execute a integrity-web-gate-plan/v2 plan ONLY with explicit owner_go approval, DeviceLock, preimage drift check, post-verify, and immutable rollback artifact.

Inputs: plan (required), owner_go (required), out_dir, recipe_name, +1 more.

web_extractC

Run a named declarative recipe extractor or an ad-hoc CSS/HTML-table/JS-var/JSONPath/regex/form/markdown extractor returning compact structured JSON.

Inputs: url (required), path, query, schema, +3 more.

web_fetchB

Safe Tier-1 read-only HTTP/HTTPS fetch with multi-encoding, SSRF firewall, secret scrubbing, and optional HTML-to-Markdown conversion.

Inputs: url (required), path, method, headers, +3 more.

web_fleet_scanA

Run concurrent read-only probes or fetches across multiple URLs (bounded to <= 500 URLs per call) with SSRF and secret protection.

Inputs: urls (required), mode, concurrency.

web_learn_recipeC

Auto-generate and validate a declarative JSON driver recipe from a live target page.

Inputs: url (required), name, save_path.

web_plan_writeB

Generate a dry-run integrity-web-gate-plan/v2 JSON plan with live preimage, uplink/form guards, and rollback template (zero mutation).

Inputs: url (required), params (required), write_name (required), out_path, +2 more.

web_probeB

Auto-fingerprint a target URL against all declarative recipes and Python drivers with full SSRF firewall and secret scrubbing.

Inputs: url (required), recipe.

web_record_cassetteA

Record a secret-scrubbed HAR-lite offline replay cassette from one or more read-only GET requests against a target URL.

Inputs: url (required), cassette_path (required), paths.

web_replay_cassetteA

Replay a recorded HAR-lite cassette deterministically offline with optional fault injection (zero live sockets).

Inputs: cassette_path (required), path, fault, method, +2 more.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 9 tools

    Disambiguation4/5

    Each tool has a fairly distinct role: read-only fetch, extraction, fleet scanning, recipe learning, probing, cassette record/replay, and plan/apply write. The closest boundaries are web_probe vs web_learn_recipe (fingerprint existing recipes vs generate a new one) and web_fetch vs web_extract (raw fetch vs structured extraction), but descriptions clarify these adequately.

    Naming Consistency4/5

    All nine tools share a consistent web_ prefix and snake_case, with mostly verb_noun structure (web_fetch, web_extract, web_probe, web_learn_recipe, web_fleet_scan, web_record_cassette, web_replay_cassette). The write pair web_plan_write and web_apply_write slightly deviates with a noun_verb ordering, but remains predictable.

    Tool Count5/5

    Nine tools is well within the ideal 3-15 range and each tool occupies a distinct niche in the read/extract/test/plan/write lifecycle. No tool feels redundant or trivially padding the surface.

    Completeness4/5

    The surface covers read-only fetching, extraction, fleet scanning, recipe discovery/learning, offline record/replay, and a guarded plan/apply write lifecycle, which is strong lifecycle coverage. Minor gaps exist around explicitly managing or listing plans/recipes or audit artifacts, but core workflows are workable.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      Enables LLMs to make HTTP requests with OAuth2, session cookies, retry logic, and cURL command generation, while providing security features like SSRF protection and TLS enforcement.
      1
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables AI agents to run shell commands, perform sandboxed file operations, and make HTTP requests through zero-trust guards that block command injection, path traversal, and SSRF while redacting secrets from inputs and outputs. Circuit breakers, per-session rate limits, and an append-only audit ledger prevent runaway loops, excessive token spend, and provide post-hoc traceability.
      5
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to drive a real Chromium browser by receiving compact, token-efficient page maps and only the changes after each action. It guards against hidden prompt injections, blocks payments, sends and deletions until the user approves, and lets agents learn site-specific notes over time.
      1
      MIT
    • A
      license
      B
      quality
      B
      maintenance
      Enables AI agents to perform browser automation through DOM element references while enforcing credential-safe guardrails, including out-of-band OS confirmation for risky actions and effect-based write interception. It supports task contracts, cross-domain taint tracking, and HMAC/SHA-256 audit logs for verifiable, privilege-separated deployments.
      14
      1
      MIT