guarded-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.
guarded-browser-mcp
An MCP server that lets an AI agent drive a self-hosted Chromium, with guardrails enforced by the server itself rather than by the agent's instructions.
Built for a personal assistant: filling in online forms, preparing purchases, reading pages, while the human watches the same browser live and takes over whenever needed (login, two-factor authentication, captcha).
Guardrails
Guardrail | Effect |
Allowed / denied sites | Domain allowlist or denylist per session. Any navigation to a refused domain is blocked inside the browser, including after a redirect or within a frame. The denylist always wins. |
Local network refused | In both modes, names without a dot (Docker containers, |
Separate final action |
|
Sensitive fields |
|
Isolated sessions | Each access token has its own browser context (cookies, logins, rules). A token never drives another session. Several sessions can share one Chromium. |
Untrusted content | Page text is returned as data, never as instructions. |
Site rules are re-read on every call: edit them without restarting.
Related MCP server: farr-browser-mcp
Tools
Tool | Effect |
| open a URL if the site is allowed |
| title, URL, visible text and numbered actionable elements |
| PNG screenshot |
| click a numbered element, unless it is a final action |
| fill in a field, unless it is sensitive |
| pick an option in a dropdown |
| trigger a final action, with a summary of what goes out |
| rules in force for the session (read-only) |
Architecture
agent ──MCP + token──▶ guarded-browser-mcp ──CDP (secret path)──▶ nginx gate ──▶ Chromium (one session)
▲
human ──web UI (KasmVNC, behind your authentication)──────────────────────────────┘Chromium (
linuxserver/chromiumimage) serves a web UI and keeps its profile on disk.Chrome only accepts remote debugging on
127.0.0.1: a small nginx gate sharing its network namespace exposes it on a secret path, with access logging disabled.guarded-browser-mcpuses Playwright over CDP: no browser is bundled in its image.
Setup
Copy
deploy/compose.example.yaml,sessions.example.yamltosessions.yaml, andpolicies/example.yamltopolicies/<session>.yaml.In
.env, generate long random values:BROWSER_PASSWORD,CDP_TOKEN_ASSISTANT,MCP_TOKEN_ASSISTANT(32 characters minimum).docker compose up -d.Publish the browser web UI (port 3000) only behind strong authentication, never in the clear on the Internet. Never publish the CDP port. Publish the MCP server only behind an authenticating proxy (for example a tunnel with a service token), in addition to its bearer token.
Register the server in your MCP client: streamable HTTP transport, path
/mcp, headerAuthorization: Bearer <MCP_TOKEN_ASSISTANT>. Setsubmit_finalto "ask first".
Several sessions
Two ways to add a session, both declared in sessions.yaml with their own token and rules:
Same Chromium, isolated context (
isolated: true): light, no new container. The session gets a fresh browser context with its own cookies, invisible to other sessions. Its cookies and local storage are saved toSTATE_DIR/<session>.json(mode 600) after every call and restored when Chromium restarts. Session storage and IndexedDB are not kept. Its windows show up in the shared web UI, so a human can log in there. Addlabel: SHOPto prefix every page title of the session with[SHOP], so its windows can be told apart in the shared web UI.Dedicated Chromium: duplicate the browser and gate services and add their two variables. Full isolation, including the web UI, at the cost of one more browser in memory.
At most one session per Chromium can use the browser's own profile (no isolated).
One tab per agent
If the MCP gateway forwards the caller's identity in x-paperclip-agent-id (header name configurable with
AGENT_HEADER), each agent drives its own tab inside the session: agents of the same session share cookies and
logins without navigating each other's pages. Without the header, all callers share the session's current tab.
Time limits
MCP gateways give up on a tool call after a fixed delay (Paperclip: 10 s by default, 60 s at most). Set
GATEWAY_TIMEOUT (seconds, default 10) to that delay: every tool is stopped after GATEWAY_TIMEOUT - 2 s, and
open_url stops loading after GATEWAY_TIMEOUT - 4 s, with a navigation_timeout error naming the URL. A tab
that ran out of time is closed and the next call opens a new one. If it does not close, isolated sessions lose
their context, then the server drops its connection to Chromium: tabs of isolated sessions close, Chromium and
the tabs of its own profile stay.
/healthz needs no token and answers 503 when a policy does not load or a session's Chromium does not answer.
Recommendations
Only log in to the sites the agent needs in a session. Never your bank or your mailbox: whoever drives the browser acts on your behalf on every logged-in site.
Prefer
allowlistmode.Some sites detect automation: the human then finishes in the web UI.
Site rules apply to page and frame navigations, not to requests a page's JavaScript makes. A public name that resolves to a private address (DNS rebinding) is not caught either: keep the browser on a network without services it should not reach.
License
MIT
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
Browz hosted MCP (free public beta): let an AI app drive your own Browz browser profiles from anywhere. Connect https://mcp.gobrowz.com/mcp and sign in with your Browz account (OAuth) or an agent token. Each call is relayed to the Browz app on your computer, which must be online with Remote control on and have a hardware security chip (Mac Secure Enclave or TPM 2.0). 17 tools: profiles, tabs, navigate, snapshot, act, wait, screenshot. Cookies, downloads and stored sign-ins stay on your computer.
Control a real browser from AI agents: navigate, click, type, screenshot, read the page.
Web scraping, browser automation, screenshots and AI data extraction for AI agents via MCP.
Real Chrome for coding agents over MCP: browse, replay playbooks, human takeover, HIPAA & BAA.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables AI agents and clients to control a real Chromium browser through MCP tool calls, including navigation, clicking, typing, JavaScript evaluation, screenshots, and DOM snapshots. Supports multiple isolated sessions over authenticated HTTP with no disk writes.Apache 2.0
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to drive a live Chromium browser through MCP tools for reading pages as markdown, clicking and typing with element refs, taking screenshots, and downloading files, while enforcing safety rules like stale-ref refusal, irreversible-action blocking, robots.txt compliance, request pacing, and configurable proxies. It also supports site skills for structured data extraction.Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables any MCP-capable AI client to drive the user's own Chrome or Edge browser through a set of browse_* tools — navigating, clicking, typing, extracting, and managing tabs with their existing logins on their own machine. Runs locally and self-hosted with a live viewport and pause/approve controls so every verified step stays under user watch.4MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to drive a live, persistent self-hosted Chromium session over MCP, running browser actions via Playwright/CDP, capturing page snapshots, screenshots and videos, and managing uploads and downloads in the same tabs and signed-in accounts a human user can take over at any time.Apache 2.0