PRODUCT DATASHEETstdio · local · no telemetryMIT LICENSE · NODE 20.18.1+ · TESTS IN CI

One MCP proxy for Playwright, Figma, Chrome DevTools, Shopify Dev & Context7Stop paying for noise.

One config entry runs five MCP servers behind a single connection, for Claude Code, Claude Desktop, Cursor and Codex. It revives crashed sessions and strips 70–90% of snapshot tokens before any of it reaches your agent.

claude mcp add playguard -- npx -y playguard@latest
CLAUDE CODE
CLAUDE DESKTOP
CURSOR
CODEX
REV 1
PG-01PLAYGUARD
stdio
1–3 ms
MIT
PLAYWRIGHT MCP
FIGMA MCP
CHROME DEVTOOLS
SHOPIFY DEV
CONTEXT7
FIG. 1 — Pin configuration. Any agent in, one config entry, five upstreams out. Bold = always on, thin = enabled by an env var.

1 · Key specifications

TA = your laptop
SNAPSHOT TOKENS−70–90%Compacted trees and diffs, before the agent sees them.
PROXY OVERHEAD1–3msPer Playwright call. Local, over stdio.
MCP SERVERS, ONE ENTRY5Playwright, Figma, DevTools, Shopify Dev, Context7.
BROWSER CRASHES SEEN0Browser restarted, URL restored, call retried.

2 · Upstream MCP servers · 5 channelsFive MCPs. One connection.

Built for agent-driven front-end work: browser QA, Figma-to-code, Shopify themes. Each upstream is switched on by its own env vars in the same config entry; leave them out and that server never starts. A failing upstream removes only its own tools.

CH 01ALWAYS ON

Playwright MCP

bundled
  • Compact, delta and UNCHANGED snapshots
  • Session recovery, same URL restored
  • Screenshot policy, eval cache
  • --codegen none, batching hints
3 enginesChromium, Firefox, WebKit
Session recovery
CH 02OPTIONAL

Figma

FIGMA_MCP_CMD · FIGMA_MCP_URL
  • Framelink: 8-module optimizer, cache, design diff
  • Official desktop server: passthrough, no API key
  • Structural budget trim, re-fetchable stubs
2 modesFramelink (any plan) or official desktop
Framelink vs official Figma MCP
CH 03OPTIONAL

Chrome DevTools

DEVTOOLS_MCP_CMD
  • Network lists summarized, failures kept
  • Noisy headers collapsed, HTML bodies cut
  • Snapshot compaction + UNCHANGED/delta
  • Usage stats and CrUX off by default
−63–72%HTML request details
Chrome DevTools MCP
CH 04OPTIONAL

Shopify Dev

SHOPIFY_DEV_MCP_CMD
  • search_docs_chunks JSON → compact markdown
  • Duplicate per-version chunks dropped
  • Telemetry params hidden from the tool list
  • 24 h disk cache, UNCHANGED repeats
−20%tool list and doc search
Shopify Dev MCP
CH 05OPTIONAL

Context7

CONTEXT7_MCP_CMD
  • resolve-library-id: one line per library
  • GitHub source URLs shortened, code untouched
  • Shorter tool descriptions, every param kept
  • 24 h disk cache (7× for pinned versions)
−48–50%library lookups
Context7 MCP
ON-CHIPBUILT IN

Built-in tools

playguard_*
  • playguard_a11y_audit: axe-core in the live page
  • playguard_compare_design: Figma node vs DOM
  • NDJSON call log, savings per upstream
WCAG 2.2A/AA rules, bundled axe 4.14
Accessibility audit

Optional upstreams start lazily. tools/list waits up to 6 s for a slow one, then announces its tools later with tools/list_changed.

3 · Signal chain · how the MCP proxy worksEvery call passes four stages.

agent → PG-01 → upstream → PG-01 → agent
STAGE 01

Route

One merged tool list. Each call goes to whichever upstream advertised the tool.

browser_* → playwright
get_figma_data → figma
list_network_* → devtools
search_docs_chunks → shopify
query-docs → context7
STAGE 02

Recover

Dead browsers and crashed upstream processes are restarted, the last URL restored, the call retried.

Target closed
ECONNREFUSED
→ retried ✓
STAGE 03

Compact

Snapshots compacted and diffed, Figma trees trimmed, network lists summarized, doc answers rewritten.

124.3 KB → 14.1 KB
34K chars → ~1K
STAGE 04

Cache

Repeats cost one line. UNCHANGED pages, a short eval cache, doc lookups kept on disk for 24 h.

← UNCHANGED
.cache/docs/ hit
log → *.ndjson

4 · Token usage · typical performanceSame page. A ninth of the tokens.

Every interactive element survives. What goes is the static text and wrappers your agent was paying to read.

Accessibility snapshot

−89%
RAW
124.3 KB
PLAYGUARD
14.1 KB
NEXT CHANGE
sent as a delta · ~91% saved

Figma node JSON

−68%
RAW
284.0 KB
PLAYGUARD
91.0 KB

DevTools network list · Shopify store

−97%
RAW
34K chars
PLAYGUARD
~1K chars

Context7 tool list + instructions

−56%
RAW
5.9K chars
PLAYGUARD
2.6K chars
FIG. 2 — Payload size per call, bars to scale within each row. Verify on your own runs with npm run analyze — see Measuring it yourself.

5 · Figma MCP optimizer · 8 modules100 cards. One definition.

100 copies of the same card? The agent gets one full subtree and 99 _sameAs stubs. No-op styles dropped, float noise rounded, every top-level frame kept. On raw Figma API JSON: metadata cleaned, components deduped, SVGs referenced.

■ full definition   □ referenceThe Figma optimizer, module by module

6 · Design diff · Figma vs DOMFigma vs. DOM, measured.

No screenshots, no eyeballing, no “looks about right”. Works with the Framelink upstream.

› playguard_compare_design 42:1337 [data-testid="login-btn"]
STATUSPROPERTYFIGMA → DOM
MATCHcolor#FFFFFF → #FFFFFF
MATCHborderRadius8px → 8px 8px 8px 8px
MISMATCHpadding12px 24px → 12px 16px
MISMATCHfontSize16px → 14px
Design diff rules and modes

7 · Accessibility audit · axe-coreWCAG, in one call.

playguard_a11y_audit runs axe-core inside the page your agent already has open and hands back a short report instead of axe's raw JSON: rules sorted by impact, a selector, an html excerpt and the first fix for each element.

  • selectorAudit one part, e.g. #cart-drawer after opening it
  • tagsWCAG 2.0–2.2 A/AA by default; add best-practice or wcag2aaa
  • ≤ 5elements listed per rule, the rest counted
  • typoAn unknown tag is an error, never a falsely clean report
Accessibility audit parameters
› playguard_a11y_audit
[PlayGuard a11y: 6 violations · 7 rules passed · axe 4.14.0 · wcag2a,wcag2aa,…]

critical image-alt — Images must have alternative text
  - img  <img src="…" class="hero">
    Element does not have an alt attribute (+4 more)

serious  color-contrast — Minimum contrast ratio
  - main > p  <p style="color:#bbb">Low contrast text</p>
    Contrast 1.91 (#bbbbbb on #ffffff). Expected 4.5:1
Keyboard flow and screen-reader wording still need a human. The page keeps axe loaded after the first audit.

8 · With vs without PlayGuard · electrical characteristicsWhat changes the day you add it.

PARAMETERWITHOUTWITH PG-01
Browser crashAgent gets “Target closed”Restarted, URL restored, retried
Crash during two callsTwo failures, or two browsersOne restart; both calls continue
Snapshot sizeFull tree, 100–500 KB every callCompacted + diffs, 70–90% less
Repeat readsFetched againUNCHANGED, TTL cache
Figma JSON (Framelink)Raw, duplicated, 200–500 KBOptimized, deduped, 60–150 KB
DevTools network list7–34K chars on a busy page~0.6–1K chars summary, failures kept
DevTools repeat snapshot10–46K chars againOne ~40-char UNCHANGED line
Docs lookup (Shopify Dev, Context7)Network call every timeDisk cache, or a one-line UNCHANGED
Docs tool listsShopify 26.6K, Context7 5.9K chars21.3K and 2.6K chars
ConfigFive MCP entries, five tool listsOne entry, one connection
One upstream failsIts own error, per serverOnly its tools go; the rest keep working
Telemetry from upstreamsDevTools → Google, Shopify → shopify.devOff by default, keys not forwarded
Proxy cost—1–3 ms per Playwright call

Numbers come from npm run bench, recorded upstream responses and PlayGuard's own NDJSON call log — no LLM in the loop, just bytes and milliseconds.

9 · Install · application circuitWire it into your agent.

Pick your client, flip the switches, copy the config. It replaces your separate Playwright, Figma, Chrome DevTools, Shopify Dev and Context7 entries. Node 20.18.1+ is the only requirement; playguard@latest pulls new releases on every start.

DIP SWITCH BANK5/5 UPSTREAMS ON
Playwright MCPbundled · always on
Figmaany plan · API key · full optimizer
Screenshotsswapped for a snapshot; visual:true for pixels

Restart your MCP client after changing the config: upstreams start once per session. Every switch and default: configuration reference.

.mcp.json
{
"mcpServers": {
"playguard": {
"command": "npx",
"args": ["-y", "playguard@latest"],
"env": {
"PLAYGUARD_SCREENSHOTS": "redirect",
"FIGMA_MCP_CMD": "npx",
"FIGMA_MCP_ARGS": "-y figma-developer-mcp --stdio",
"FIGMA_API_KEY": "your-figma-api-key",
"DEVTOOLS_MCP_CMD": "npx -y chrome-devtools-mcp@latest",
"DEVTOOLS_MCP_ARGS": "--headless --isolated",
"SHOPIFY_DEV_MCP_CMD": "npx -y @shopify/dev-mcp@latest",
"CONTEXT7_MCP_CMD": "npx -y @upstash/context7-mcp@latest"
}
}
}
}

10 · FAQ · application notesThe questions you’re about to ask.

Want the long version? How PlayGuard works walks through every mechanism and every environment variable.

AN-01Which agents does it work with?

Any MCP client that launches stdio servers: Claude Code, Claude Desktop, Cursor, Codex and others. Node.js 20.18.1+ is the only requirement; npx fetches PlayGuard on first start. Codex takes the same command, args and env as a [mcp_servers.playguard] table in ~/.codex/config.toml.

AN-02Which MCP servers can PlayGuard run?

Playwright MCP (bundled, always on), Figma — either Framelink figma-developer-mcp or Figma's official desktop server — Chrome DevTools MCP, Shopify Dev MCP and Context7. Each optional one is switched on by its own env var in the same playguard entry; leave the variable out and it never starts.

AN-03Can I use Figma MCP and Playwright MCP together?

Yes — Figma-to-code with browser checks is the work PlayGuard is built for. One playguard entry runs Playwright MCP and Figma (Framelink or the official desktop server) side by side, so the agent reads the design with the Figma tools and drives the page with browser_* over one connection. With Framelink, playguard_compare_design compares a Figma node against the live DOM element that implements it and reports mismatches numerically — font size, colour, padding, radius. Chrome DevTools, Shopify Dev and Context7 can run in the same entry too.

AN-04Is PlayGuard a replacement for Playwright MCP?

It wraps it. PlayGuard bundles @playwright/mcp and runs it as an always-on upstream, so the agent keeps the same browser_* tools — with snapshots compacted by 70–90%, dead sessions revived and the last URL restored. That is why you drop your separate Playwright MCP entry once PlayGuard is in the config.

AN-05Do I remove my other MCP entries?

Yes, for the servers PlayGuard runs. Playwright MCP is bundled and spawned by PlayGuard itself — listing it separately starts two browsers and duplicates the tool list. The same goes for a Figma, DevTools, Shopify Dev or Context7 entry you route through PlayGuard: one entry replaces all of them.

AN-06Framelink or the official Figma MCP?

Framelink works on any Figma plan with an API key and gets the full treatment: the 8-module optimizer, the cache and playguard_compare_design. The official desktop server (FIGMA_MCP_URL=http://127.0.0.1:3845/mcp) needs no key but a Dev or Full seat on a paid plan; it returns generated code, variables and screenshots, which PlayGuard passes through whole. One at a time; the URL wins if both are set.

AN-07Can I proxy Figma's remote server, mcp.figma.com?

No. Figma only admits clients listed in its MCP catalog, so PlayGuard refuses that URL at startup and says why. Add it to your MCP client directly, next to PlayGuard; its responses then skip PlayGuard.

AN-08What happens if one upstream fails?

Only its own tools go away. Optional upstreams start lazily and are isolated from each other; calling a tool of one that failed returns [PlayGuard] … MCP is not running with what to check. A crashed upstream process is respawned once and the call retried; DevTools also reopens its last URL.

AN-09Does Chrome DevTools MCP share the Playwright browser?

No — it launches its own Chrome. Pages, cookies and element ids are not shared: a DevTools uid works only with DevTools tools, a [ref=] only with browser_*. Use it for network, performance traces, Lighthouse and computed CSS; keep clicking through flows with browser_*. Advanced users can point both at one Chrome over CDP.

AN-10Can it break my agent by hiding something?

Compaction keeps every line carrying a [ref=] (or DevTools uid) plus structural landmarks, so nothing the agent can act on disappears. Static text without a ref is dropped — when the agent needs to read copy, it uses the section/around filters, browser_evaluate, or raw: true. Doc rewrites never cut content or code, and every rewrite passes an unrecognised response through unchanged. raw: true on a call, or PLAYGUARD_COMPACT=false, PLAYGUARD_DEVTOOLS_OPTIMIZE=false, PLAYGUARD_DOCS_OPTIMIZE=false, returns the untouched response.

AN-11Where do my API keys go?

Only to the upstream that needs them. Chrome DevTools, Shopify Dev and Context7 each get a filtered environment, so FIGMA_API_KEY never reaches them and CONTEXT7_API_KEY reaches Context7 only. Keys never land in the call log or the cache. PlayGuard also turns off DevTools usage statistics and CrUX lookups and Shopify Dev instrumentation by default. Its only own network request is a startup version check on npm (PLAYGUARD_UPDATE_CHECK=false turns it off).

AN-12What does the proxy cost me?

About 1–3 ms per Playwright call, measured by npm run bench. Against a snapshot that shrinks from 300 KB to 30 KB, that is not the number worth worrying about.

AN-13How do I know the savings are real?

Every call is logged as NDJSON with raw and kept byte counts and the upstream it went to — set PLAYGUARD_LOG_DIR to pick the folder. npm run analyze, run from a clone of the repo, turns your own logs into a report with savings per upstream, cache hits and latency percentiles per tool.

AN-14What about screenshots?

Your call: allow, warn (default), block, or redirect — the last swaps a screenshot for a snapshot, with {visual:true} as the escape hatch when you genuinely need pixels. The policy applies to DevTools take_screenshot too.

Stop paying for noise.

One proxy in your config, five MCPs behind it. 70–90% fewer snapshot tokens. Zero browser crashes seen by your agent.