GlassBox
The Flight Recorder & Lethal-Trifecta Firewall for AI Agents (MCP — stdio + Streamable HTTP).
Wrap any local stdio or remote Streamable HTTP MCP server in one command. Deterministically block prompt-injection exfiltration (PRIVATE + UNTRUSTED -> EGRESS), catch mid-session tool rug-pulls via SHA-256 schema pinning, and time-travel replay/fork any agent run offline in <5ms at $0.00 cost.
30-Second Keyless Quickstart (Zero API Keys, Zero Docker)
# Once published to PyPI (see DEPLOY.md):
uvx glassbox-firewall demo
# Or from source right now:
git clone https://github.com/Roopesh2006/glassbox.git
cd glassbox
pip install -e .
# 1. Run a live wrapped MCP attack + Merkle replay + offline counterfactual fork
glassbox demo
# 2. Launch the interactive Web Flight Recorder UI (http://127.0.0.1:8765)
glassbox ui
No OpenAI key. No Anthropic key. No ClickHouse. No Docker. Pure Python 3.10+ standard library.
Why GlassBox Exists
Static tool allowlists (allow / deny / ask) fail AI agents in two opposite ways:
- Approval fatigue: Prompting on every write breaks autonomous coding flow, pushing developers to run
--dangerously-skip-permissions. - The Lethal Trifecta: Attacks like GitHub MCP Toxic Agent Flow, CurXecute (
CVE-2025-54135), and DuneSlide (CVE-2026-50548) use 100% pre-approved, legitimate tools in a lethal sequence (read private data+ingest untrusted issue/web content+call outbound tool). OS shell sandboxes wrap Bash only—leaving MCP servers outside.
GlassBox extracts enforcement and recording out of the agent harness onto the MCP JSON-RPC 2.0 wire (both stdio and Streamable HTTP):
| Capability | How GlassBox Does It |
|---|---|
| Zero-Prompt Safe Autonomy | Benign local coding (read_file → edit_file → run_tests) triggers 0 approval prompts with <1ms wire overhead. |
| Dynamic Taint-Lattice Firewall | Tracks a 3-bit session lattice (PRIVATE, UNTRUSTED, EGRESS). When PRIVATE ∧ UNTRUSTED is latched, outbound tools auto-downgrade to SHADOW_SIMULATE (suppressing the real side effect while returning a dry-run receipt and capturing the attacker's exact exfiltration payload forensically) or BLOCK. |
| MCP Tool Annotations + Top-12 Server Profiles | Automatically reads standard MCP annotations (readOnlyHint, destructiveHint, openWorldHint) on tools/list so even custom tool names work out of the box—plus built-in profiles (--profile github,postgres,slack,playwright,gmail,linear,notion,fetch,aws,kubernetes,stripe,filesystem or all). |
| Stdio + Streamable HTTP Transports | Guards both local CLI/IDE stdio servers (glassbox wrap -- <cmd>) and remote HTTP MCP servers (glassbox proxy-http --upstream <url>). |
| Anti-Rug-Pull Schema Pinning | Pins the SHA-256 hash of every tool's name, description, and inputSchema on tools/list. Mid-session mutations (MCPoison / Plugin4Shell class) are immediately blocked. |
Tamper-Evident Merkle Cassette (.gbx) + SARIF |
Every frame is chained via `sha256(prev_hash |
Offline Time-Travel Forking ($0.00) |
Rewind any incident to step k, swap the policy (audit → strict), diff two runs (glassbox diff), and deterministically prove the fix in <5ms. |
Drop-In Integration (Claude Code, Cursor, Codex CLI, OpenClaw, Hermes)
Local Stdio MCP Server (1-line wrap)
{
"mcpServers": {
"github-guarded": {
"command": "glassbox",
"args": [
"wrap",
"--policy", "balanced",
"--profile", "github",
"--",
"npx", "-y", "@modelcontextprotocol/server-github"
]
}
}
}
Remote Streamable HTTP MCP Server
glassbox proxy-http --upstream https://mcp.example.com/v1 --port 8787 --policy balanced --profile all
# Point your MCP client to http://127.0.0.1:8787
CLI Reference
glassbox demo # 30-second keyless live attack + replay + fork demo
glassbox ui # Interactive local Web Flight Recorder (port 8765)
glassbox wrap --policy balanced --profile github -- <cmd> # Live stdio MCP wire proxy
glassbox proxy-http --upstream <url> --port 8787 # Live Streamable HTTP MCP reverse proxy
glassbox profiles # List top-12 built-in MCP server profiles
glassbox replay demo-data/lethal_trifecta_github.gbx # Offline deterministic replay ($0.00)
glassbox fork demo-data/lethal_trifecta_github.gbx --at-step 9 --policy strict
glassbox diff trace_a.gbx trace_b.gbx # Side-by-side run comparison
glassbox export-sarif demo-data/lethal_trifecta_github.gbx --out findings.sarif
glassbox verify demo-data/lethal_trifecta_github.gbx # Cryptographic SHA-256 Merkle verification
Verified Run (Executed in Clean Sandbox)
$ PYTHONPATH=src python3 -W error::ResourceWarning -m unittest discover -s tests -v
test_1_benign_coding_flow_zero_blocks_low_latency ... ok
test_2_lethal_trifecta_shadow_intercept_and_forensic_capture ... ok
test_3_mid_session_schema_rugpull_blocked ... ok
test_4_merkle_tamper_detection ... ok
test_5_offline_counterfactual_fork_under_50ms ... ok
test_6_destructive_prod_db_drop_blocked_and_ui_api ... ok
test_7_cli_demo_end_to_end ... ok
test_8_streamable_http_proxy_and_mcp_tool_annotations ... ok
test_9_builtin_server_profiles ... ok
test_10_diff_and_sarif_export ... ok
----------------------------------------------------------------------
Ran 10 tests — OK (0 warnings)
Honest Security Boundary
GlassBox intercepts MCP JSON-RPC traffic (stdio and Streamable HTTP) for wrapped servers. It cannot observe side channels executed completely outside wrapped MCP servers (such as an unwrapped native Bash tool calling curl directly). Pair GlassBox with an OS-level sandbox (macOS Seatbelt, Linux bubblewrap, or ephemeral containers) for defense-in-depth. See SECURITY.md and COMPARISONS.md.
Deployment & Launch Docs
Metadata
Release files for glassbox-firewall 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 |
|---|---|---|---|---|
| glassbox_firewall-0.2.0.tar.gz | 37.9 kB | With provenance | Details for glassbox_firewall-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| glassbox_firewall-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for glassbox_firewall-0.2.0-py3-none-any.whl |
Total release size: 75.4 kB
Release files / glassbox_firewall-0.2.0.tar.gz
| Download URL | glassbox_firewall-0.2.0.tar.gz |
|---|---|
| Size | 37.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3ba80d8a5356ba844c6c77b12ef50a8038e8dc9774bb3edf0cd6a26581abe319
|
|
BLAKE2b-256 checksum How to use checksums |
b8f18bbe21c1a9a8f159c00432f6352d8a0c5d5301876a2755bc426935ac79de
|
| 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 Nov 23, 2026.
Transparency logRelease files / glassbox_firewall-0.2.0-py3-none-any.whl
| Download URL | glassbox_firewall-0.2.0-py3-none-any.whl |
|---|---|
| Size | 37.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a986baef98816be4522cbdceff68192bb6807f4da4e2c3c4822c94f8b65d1f7e
|
|
BLAKE2b-256 checksum How to use checksums |
29414d6bdb1362d9202e56bbd57c5f747c20153e277cbfacc77550bcedfef7ea
|
| 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 Nov 23, 2026.
Transparency logSecurity for glassbox-firewall 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 glassbox_firewall-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 Nov 23, 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.