governed-browser-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
governed-browser
The browser-agent safety gate that physically refuses to click Send, Pay, Submit, Delete, or Authorize β enforced in code, not in a prompt.
governed-browser is the 4th flagship in the open-source Agent Governance suite (alongside casebook, dual-brain-guard, and autonomy-ladder). It decouples the constitutional browser safety rails from jfranco-cockpit-browser into a zero-dependency Node.js CLI, stdio MCP Server, and portable plugin for Playwright, Chrome DevTools Protocol (CDP), Claude Code, Gemini CLI, Cursor, Google Antigravity, and DeepSeek Harness (DSH).
Why governed-browser?
When an AI agent drives a browser, telling it "please ask before submitting or paying" in a system prompt eventually fails. governed-browser enforces four mechanical invariants in code:
Code-Level Commit-Click Brake (
π RED): Blocks committing clicks (Send,Pay,Submit,Delete,Authorize,Sign in,Checkout,Envoyer,Payer,Supprimer,Enviar,Pagar,Eliminar, plusinput[type="submit"]) with UnicodeNFDdiacritic stripping and word-boundary precision (so"Pays"/ Country or"Code postal"never false-positive).Constitutional Downgrade Rule: A forbidden committing button can only be downgraded from
REDby an exact normalized full-label match in the human'stiers.mdpolicy file (e.g.,Create draft -> GREEN). A generic substring rule (account -> GREEN) can never unlock"Delete account".Proactive Secret Redaction & SHA-256 Hash-Chained Ledger (
audit.jsonl): Passwords, API keys, tokens, CVV, and 2FA codes are scrubbed toβ’β’β’ (sensitive β never logged)before hitting disk, and every entry is chained via SHA-256 (prevHash -> hash).Two-Section Accountability Report & Autonomy Efficiency KPI: Separates automatic actions to verify (
GREEN/β SEMI-AUTOMATIC) fromπ REDbrakes handed back to the human, and measuresAutonomy (%)vs.Human Intervention (%).
Related MCP server: browser-guard-mcp
30-Second Quickstart
git clone https://github.com/JavierFrancoLeal/governed-browser.git
cd governed-browser
npm test
# 1. Check a safe non-committing button (Exit 0 β ALLOWED)
node src/cli.mjs check --selector "#preview-btn" --label "Preview invoice" --record-audit
# 2. Check a committing payment button (Exit 2 β BRAKED / RED)
node src/cli.mjs check --selector "#pay-btn" --label "Payer $1,450.00" --submit --record-audit
# 3. Verify the cryptographic SHA-256 audit chain & view the Accountability Report
node src/cli.mjs verify-chain
node src/cli.mjs report
node src/cli.mjs kpiMCP Server Integration (Claude Code / Cursor / Gemini CLI / Antigravity)
Add governed-browser-mcp to your mcpServers config so any browser-driving agent must pass pre-click and form-fill checks:
{
"mcpServers": {
"governed-browser": {
"command": "node",
"args": ["/absolute/path/to/governed-browser/src/mcp-server.mjs"]
}
}
}Exposed MCP tools:
cockpit_check_clickβ returns{ allowed, status: "ALLOWED" | "PROPOSE_WAIT" | "BRAKED", tier, reason }cockpit_record_fillβ proactively redacts secrets and appends a SHA-256 chainedfillrecordcockpit_get_reportβ renders the two-section Accountability Report + Autonomy KPIcockpit_verify_audit_chainβ verifiesaudit.jsonlfor tampering
Technical Essay
Read the full engineering postmortem and design rationale in Why Browser Agents Need a Hard Commit Brake in Code, Not a Prompt.
License
Apache-2.0 β see LICENSE.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Deterministic runtime safety for AI agents: scan PII, gate tool actions, verify LLM output.
Checks AI agent actions before they run. Signed, RFC 3161 timestamped evidence for audits.
Pay-per-call safety checks for AI agents: screen a crypto address or URL before you transact.
Pre-execution governance for AI agents. Deterministic PASS/FAIL/REVIEW verdicts, replayable proof.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables governed browser automation for AI agents with human-in-the-loop approval, audit logging, and read-only replay, supporting both ASK and AUTO autonomy modes.MIT
- AlicenseAqualityCmaintenanceEnables AI agents to automate browsers through Playwright behind multi-layer safety guards, restricting navigation to allowed domains, defaulting to read-only actions, and recording all behavior in audit logs.7MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to drive a real Chrome browser for autonomous web tasks, using fast typed decisions with calibrated confidence, human-in-the-loop questions, safety gates, and full debug traces.7MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to securely control a real, logged-in browser with per-site permissions, per-action approvals, secret redaction, and a tamper-evident audit log, all locally without a cloud relay.1MIT