playwright-mcp-guarded
Allows browsing and fetching public GitHub pages and raw content from allowed GitHub domains.
Allows browsing Google search result pages and related Google web content.
Allows browsing and fetching Google Scholar search results and academic content.
Allows browsing and fetching Wikipedia articles from Wikipedia domains.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@playwright-mcp-guardedOpen the Wikipedia article on Playwright and give me a two-sentence summary."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
playwright-mcp-guarded
A domain-guarded, non-user-bound wrapper around Microsoft's
playwright-mcp — a general
web-fetch/browse replacement for LibreChat assistants (GitHub, Wikipedia,
Google, Google Scholar, ...), scoped to an allowlist of domains, extensible
by editing one environment variable. Deployed as a plain streamable-HTTP
Docker service (no ports: exposed, no per-user OAuth). See also
time-mcp-http, a sibling
project with the same deployment shape.
Why not just run @playwright/mcp directly
It already has --allowed-origins/--blocked-origins for exactly this,
and this project does not reimplement that enforcement — it's still
what actually blocks a disallowed navigation. Two things are missing from
running it bare:
Its own docs call
--allowed-origins"not a security boundary" — a known gap is that Service Worker and WebSocket traffic bypass thecontext.route()interception it's built on.--block-service-workers(also set here, unconditionally) closes one of those gaps; there isn't a flag for the other.The allowlist never appears anywhere the calling model can see it — not in
initialize'sinstructions, not in any tool'sdescription. A model has no way to know upfront which domains are reachable, so it finds out by trying, once per blocked domain, every time.
Related MCP server: Web Search MCP Server
How it works
One container, one process tree, one config value (ALLOWED_ORIGINS):
LibreChat --(streamable-http, /mcp)--> guardian (Python, PID 1)
|
| spawns as child process,
| on loopback only
v
@playwright/mcp (Node, --allowed-origins)guardian/app.py spawns the real @playwright/mcp CLI, unmodified, as a
child process bound to localhost only, connects to it as an MCP
client, and re-exposes it as an MCP server on the container's public
port: tools/list and initialize get the domain list appended for
visibility, tools/call is forwarded verbatim — no tool logic of its own,
no changed behavior beyond those two text edits. ALLOWED_ORIGINS is read
once, at startup, and handed to both: the spawned process (as
--allowed-origins, the actual enforcement) and the two response
rewrites (visibility only). Extending the list later is a one-line change
to that single env var, not two configs to keep in sync.
Run
docker build -t playwright-mcp-guarded .
docker run --rm -p 8080:8080 \
-e ALLOWED_ORIGINS="github.com;raw.githubusercontent.com;wikipedia.org;en.wikipedia.org;google.com;scholar.google.com" \
playwright-mcp-guardedALLOWED_ORIGINS is semicolon-separated — same format @playwright/mcp
itself uses for PLAYWRIGHT_MCP_ALLOWED_ORIGINS. An empty value blocks
every domain (logged as a warning at startup, not a silent bypass).
EXTRA_INSTRUCTIONS (optional, free text) is appended verbatim to the
initialize instructions the model sees. The allowlist only says which
domains are reachable, not how to use what's behind them — e.g. a
self-hosted search engine's query syntax. Deliberately not hardcoded here:
this wrapper stays domain-agnostic, and the deployer supplies whatever
operating knowledge their specific allowlist needs, in their own words:
-e EXTRA_INSTRUCTIONS="Search: http://searxng:8080/search?q=<term> (general), add &categories=science for Google Scholar results."No MCP_API_KEY, no auth gate on the MCP connection itself — deliberately:
a 401 from any such gate makes LibreChat's non-OAuth MCP client try (and
get stuck on) OAuth. Docker network isolation is the boundary. No
credentials of any kind pass through this server; it only ever reads
public pages.
Accepted trade-off, not an oversight: this keeps enforcement at the
Playwright application layer (now with --block-service-workers), not an
independent network-level boundary (e.g. an egress proxy). That's a
deliberate simplicity choice — one deployable unit, one config value — not
a claim that this is airtight. A network-level backstop can be layered on
later without touching any of this logic.
Verify
curl -s http://127.0.0.1:8080/readyz # "ok" once the upstream browser is upLogs should show the upstream's own startup line
(Listening on http://localhost:<internal-port>) followed by
playwright-mcp-guarded up, allowed origins=... — that second line is the
actual list currently enforced, not just what was configured.
Test
pip install -e '.[dev]'
ALLOWED_ORIGINS="github.com;wikipedia.org" pytestUnit tests only (description/instructions rewriting, arg passthrough) —
they don't spin up Chromium or Docker. The Docker image was verified
end-to-end manually: built, run, a real MCP client connected and listed
tools (allowlist visible in both initialize.instructions and
browser_navigate's description), navigated successfully to an allowed
domain (en.wikipedia.org), and got net::ERR_BLOCKED_BY_CLIENT on a
disallowed one (example.com) — enforcement and visibility both
confirmed live, not just asserted.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseAqualityDmaintenanceProvides web search capabilities to Claude AI using the Anthropic API, allowing LLMs to access up-to-date information from the web with customizable domain filtering.148
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to search the web, fetch news, and retrieve page content via DuckDuckGo or Brave Search, with domain whitelisting and audit logging.
- AlicenseAqualityDmaintenanceProvides web access capabilities for LLMs including search, fetching, content extraction, PDF reading, image viewing, and screenshots.346MIT
- FlicenseAqualityDmaintenanceProvides local LLMs with web search and page fetching capabilities via MCP, with a focus on OWASP security best practices.2
Related MCP Connectors
Reliable web access for AI agents: smart HTTP, rotating proxies, and full-browser rendering.
Read a URL as clean markdown, screenshot a website, url to PDF. Web access for agents, no signup.
Live web access for agents: scrape, SERP search, crawl/map, 74 collectors, datasets, proxies.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/thekk1/playwright-mcp-guarded'
If you have feedback or need assistance with the MCP directory API, please join our Discord server