Safari 27 MCP optimization and discovery
When to use
- Prove or re-run Safari 27
safaridriver --mcp smoke on preview/local (or owner-cleared browse-only production).
- Bake agent-forward discovery (
llms.txt, /.well-known) and semantic DOM before DNS cutover.
- Rank defects for humans and agents. Triage harness bugs vs real storefront gaps.
- Never for Production DNS flips, live charges, merge, or brand/hero redesign without the owner.
Hard locks
- Browse-only unless sandbox payment is explicitly authorized.
- Clean WebDriver session — no operator cookies, passwords, or AutoFill.
- Prefer accessible DOM text (
get_page_content) over pretty screenshots.
- Label claims [VERIFIED], [INFERRED], or [UNKNOWN].
- Fail loud when a run stalls; never quietly mark research done without an evidence artifact.
Pack definitions
| Pack |
Host |
Path |
Stop |
| A |
B2B or staging/preview twin |
home → category/PLP → PDP → cart → observe auth/gate |
no payment |
| B |
Intended B2C cutover apex |
same; allow one intentional shop redirect |
hard stop before pay |
Pass = accessible text readable without guessing. If screenshot and content disagree, content wins.
Limb health
- Safari ≥ 27 (or Technology Preview with MCP).
- Developer → Allow remote automation and external agents ON (
create_tab requires it).
- Start
safaridriver --mcp; list tools (~17). Record version and tool list.
- Fail loud if
create_tab fails.
Discovery bake-in (pre-DNS) — D1–D5
- Public
llms.txt listing shop purpose, key routes, agent constraints.
/.well-known/ stubs for mcp/agent/llms (or documented equivalents) — 200, no soft-404.
- Stable route map: home → PLP → PDP → cart → checkout entry or Apply/Sign-in.
- Apex is a real storefront (or intentional 301 to shop), not an empty parked lander.
- robots/sitemap point at indexable shop URLs with real titles.
Semantic / agent-legible DOM — H1–H8
Landmarks; named CTAs; PDP contract (title, price or spoken gate, variant, primary CTA); cart totals in text; spoken auth/license/age/region gates; labeled trust/COA anchors; readable errors/empty/OOS; durable accessible names or test ids on critical controls.
Architecture for sterile MCP — X1–X5
SSR or progressive enhance for critical facts; intentional redirects to shoppable URLs; anonymous browse or explicit gate copy; no cookie reliance; content-over-screenshot truth.
Smoke execution
- One host at a time. Screenshot + get_page_content each step.
- Unwrap MCP JSON envelopes / double-encoded evaluate_javascript results before parsing links.
- Navigate via real hrefs from content; do not invent PDP URLs.
- Stop on first BLOCKER; note softs.
- Ranked defects: BLOCKER / MAJOR / POLISH with URL, step, repro, artifact id.
Verification gates — V1–V5
Remote automation + create_tab; Pack A green including real PDP; Pack B on the intended B2C host; zero BLOCKER (MAJORs fixed or owner-accepted); live price/trust URLs still 200 on cutover build.
Security handoff (defensive)
Flag soft-404/parked apex, open redirects, XSS in title/price/trust labels, gate bypass in sterile session, cart/checkout entry abuse, discovery-stub spoof/redirect. Do not write exploit PoCs — report surface + expected harden. Code/store/money/login/customer-data changes need security review; docs-only markdown may follow the owner's lighter path.
Reference links (SSOT)
Voices to follow
Jen Simmons, Saron Yitbarek, Jon Davis (WebKit/Safari advocacy; Bluesky/Mastodon per WebKit). WebKit blog and Apple Developer docs for product truth.
Pitfalls
Treating screenshots as pass when markdown is empty; skipping the remote-automation toggle; running Pack B on a non-cutover/parked host; redesigning brand without the owner; silent stalls; inventing completion without evidence.
1---2name: safari-27-mcp-optimization3description: "Use this when optimizing, discovering, smoke-testing, or verifying ecommerce storefronts for Apple Safari 27 safaridriver MCP (agent-legible DOM, pre-DNS bake-in, Pack A/B, llms.txt, sterile-session proof)."4metadata:5 source: https://skillmd.com/skills/shixuuu/safari-27-mcp-optimization6---78# Safari 27 MCP optimization and discovery910## When to use11- Prove or re-run Safari 27 `safaridriver --mcp` smoke on preview/local (or owner-cleared browse-only production).12- Bake agent-forward discovery (`llms.txt`, `/.well-known`) and semantic DOM before DNS cutover.13- Rank defects for humans and agents. Triage harness bugs vs real storefront gaps.14- Never for Production DNS flips, live charges, merge, or brand/hero redesign without the owner.1516## Hard locks17- Browse-only unless sandbox payment is explicitly authorized.18- Clean WebDriver session — no operator cookies, passwords, or AutoFill.19- Prefer accessible DOM text (`get_page_content`) over pretty screenshots.20- Label claims [VERIFIED], [INFERRED], or [UNKNOWN].21- Fail loud when a run stalls; never quietly mark research done without an evidence artifact.2223## Pack definitions24| Pack | Host | Path | Stop |25|------|------|------|------|26| A | B2B or staging/preview twin | home → category/PLP → PDP → cart → observe auth/gate | no payment |27| B | Intended B2C cutover apex | same; allow one intentional shop redirect | hard stop before pay |2829Pass = accessible text readable without guessing. If screenshot and content disagree, content wins.3031## Limb health321. Safari ≥ 27 (or Technology Preview with MCP).332. Developer → Allow remote automation and external agents ON (`create_tab` requires it).343. Start `safaridriver --mcp`; list tools (~17). Record version and tool list.354. Fail loud if `create_tab` fails.3637## Discovery bake-in (pre-DNS) — D1–D5381. Public `llms.txt` listing shop purpose, key routes, agent constraints.392. `/.well-known/` stubs for mcp/agent/llms (or documented equivalents) — 200, no soft-404.403. Stable route map: home → PLP → PDP → cart → checkout entry or Apply/Sign-in.414. Apex is a real storefront (or intentional 301 to shop), not an empty parked lander.425. robots/sitemap point at indexable shop URLs with real titles.4344## Semantic / agent-legible DOM — H1–H845Landmarks; named CTAs; PDP contract (title, price or spoken gate, variant, primary CTA); cart totals in text; spoken auth/license/age/region gates; labeled trust/COA anchors; readable errors/empty/OOS; durable accessible names or test ids on critical controls.4647## Architecture for sterile MCP — X1–X548SSR or progressive enhance for critical facts; intentional redirects to shoppable URLs; anonymous browse or explicit gate copy; no cookie reliance; content-over-screenshot truth.4950## Smoke execution511. One host at a time. Screenshot + get_page_content each step.522. Unwrap MCP JSON envelopes / double-encoded evaluate_javascript results before parsing links.533. Navigate via real hrefs from content; do not invent PDP URLs.544. Stop on first BLOCKER; note softs.555. Ranked defects: BLOCKER / MAJOR / POLISH with URL, step, repro, artifact id.5657## Verification gates — V1–V558Remote automation + create_tab; Pack A green including real PDP; Pack B on the intended B2C host; zero BLOCKER (MAJORs fixed or owner-accepted); live price/trust URLs still 200 on cutover build.5960## Security handoff (defensive)61Flag soft-404/parked apex, open redirects, XSS in title/price/trust labels, gate bypass in sterile session, cart/checkout entry abuse, discovery-stub spoof/redirect. Do not write exploit PoCs — report surface + expected harden. Code/store/money/login/customer-data changes need security review; docs-only markdown may follow the owner's lighter path.6263## Reference links (SSOT)64- https://developer.apple.com/documentation/safari-developer-tools/connecting-an-ai-agent-to-safari65- https://webkit.org/blog/18136/introducing-the-safari-mcp-server-for-web-developers/66- https://webkit.org/blog/18325/webkit-features-for-safari-27-0/67- https://developer.apple.com/safari/technology-preview/68- https://bugs.webkit.org/69- https://modelcontextprotocol.io/70- https://llmstxt.org/71- https://www.w3.org/WAI/ARIA/apg/72- https://www.w3.org/WAI/standards-guidelines/wcag/73- https://macworks.dev/articles/safari-27-mcp/index.md (sterile session vs everyday Safari)7475## Voices to follow76Jen Simmons, Saron Yitbarek, Jon Davis (WebKit/Safari advocacy; Bluesky/Mastodon per WebKit). WebKit blog and Apple Developer docs for product truth.7778## Pitfalls79Treating screenshots as pass when markdown is empty; skipping the remote-automation toggle; running Pack B on a non-cutover/parked host; redesigning brand without the owner; silent stalls; inventing completion without evidence.