Playwright Spatial Layout MCP server
MCP server that gives AI agents geometric spatial awareness of web page layouts using Playwright
0 stars42 downloads/wk
Reviews
Write oneNobody has reviewed Playwright Spatial Layout yet.
If you have run it, two minutes of your experience saves the next person an afternoon.
Playwright Spatial Layout tools (6)
write = sends, deletes, buys or postsRead from the package source without running it. The installed server may list more.
calculate_perceptual_contrastMeasures color contrast between a text element and its background using both WCAG 2.x
compute_viewport_reflowMeasures how element positions and sizes change across multiple viewport sizes.
detect_visual_occlusionChecks if one element physically overlaps another by computing the intersection of their bounding boxes.
extract_bounding_boxesReturns the geometric position, size, z-index, and viewport visibility for one or more DOM elements.
verify_spatial_relationshipsValidates a set of spatial layout rules — e.g. 'nav must be above hero', 'sidebar must be left of content'.
verify_stacking_contextReveals the full CSS stacking context chain for an element — which ancestors create
Public scan report
scanner v0.1.9 · 2026-09-27 · same rubric, same numbers if you re-run it
- Code scan11 source files scanned25/25
- –Live reliabilityno gateway calls yet and no remote to proben/a
- –Tool poisoningtools not inspected (local package is not executed); not countedn/a
- Auth qualitylocal package, no credentials required12/15
- Maintenancelast push 132 days ago8/15
- Maintainer identityregistry namespace matches repository owner; GitHub account older than a year8/10
How Playwright Spatial Layout compares
Against every graded Scraping and browsing MCP server, from our own scans and uptime checks. Updated after each scan run.
- Safety score
- 82/100
- higher than 58% of 868 Scraping and browsing servers
- Tools
- 6
- the typical Scraping and browsing server has 6
- Tools that change things
- 0%
- typical: 0%. Fewer write tools means less an agent can break
- Downloads a week
- 42
- more than 30% of 304 Scraping and browsing servers with a package
What its tools let an agent do: 6 read
Install Playwright Spatial Layout in Claude Code, Cursor or VS Code
Runs npx -y playwright-spatial-layout-mcp on your machine. Read the scan report first; the gateway never runs local packages.
claude mcp add playwright-spatial-layout-mcp -- npx -y playwright-spatial-layout-mcp
What the publisher says
From the Playwright Spatial Layout repository's README, as published. We do not edit it. Read it on GitHub
playwright-spatial-layout-mcp 🐸📐
An MCP server that gives AI agents geometric spatial awareness of web page layouts using Playwright.
AI agents can read the DOM and know a button exists — but they can't see that it's hidden under a sticky header, pushed off-screen by a broken CSS rule, or overlapping another element on mobile. This MCP fixes that by exposing real bounding box mathematics from a live browser.
🤔 The Problem
When an AI agent analyzes a Playwright test failure, it reads the accessibility tree:
"The Submit button exists in the DOM. It has role=button. It is visible."
What it cannot see:
- 🙈 The button is at y: 1450px — below the fold on mobile
- 🙈 A cookie banner overlaps it by 73%, making it unclickable
- 🙈 On a 375px viewport the nav and hero section overlap each other
- 🙈 An element shifted 200px to the right after a CSS refactor
playwright-spatial-layout-mcp gives the agent coordinates, intersection ratios, and layout shift data so it can reason about the rendered page — not just the markup.
🛠️ Tools
extractboundingboxes
Returns position, size, z-index, and viewport visibility for one or more elements.
{
"url": "https://your-app.com",
"selectors": ["header", ".hero-cta", "footer"],
"viewport": { "width": 375, "height": 812 }
}[
{
"selector": ".hero-cta",
"box": { "x": 16, "y": 892, "width": 343, "height": 48 },
"z_index": "auto",
"is_visible": true,
"is_in_viewport": false
}
]detectvisualocclusion
Checks if one element physically overlaps another by computing bounding box intersection.
{
"url": "https://your-app.com",
"target_selector": ".checkout-button",
"overlay_selector": ".cookie-banner"
}{
"is_occluded": true,
"intersection_ratio": 0.61,
"occluded_area_px": 4128
}verifyspatialrelationships
Validates a set of layout rules and returns pass/fail with a human-readable reason per rule.
Supported rule types: leftof · rightof · above · below · contains · not_overlapping
{
"url": "https://your-app.com",
"rules": [
{ "type": "above", "element_a": "nav", "element_b": ".hero" },
{ "type": "not_overlapping", "element_a": ".sidebar", "element_b": ".main-content" }
]
}{
"passed": false,
"results": [
{ "passed": true, "reason": "'nav' bottom (64px) is above '.hero' top (64px)" },
{ "passed": false, "reason": "'.sidebar' and '.main-content' overlap by 12%" }
]
}computeviewportreflow
Measures how element positions and sizes change across multiple viewport sizes.
{
"url": "https://your-app.com",
"selectors": ["nav", ".hero", ".cta-button"],
"viewports": [
{ "width": 375, "height": 812 },
{ "width": 768, "height": 1024 },
{ "width": 1280, "height": 720 }
]
}[
{
"selector": ".cta-button",
"shifted": true,
"max_delta_x": 442,
"max_delta_y": 318,
"max_delta_width": 897,
"max_delta_height": 0
}
]🚀 Installation
npx playwright-spatial-layout-mcpOr install globally:
npm install -g playwright-spatial-layout-mcp
npx playwright install chromiumClaude Desktop config
Shortened. The full README is on GitHub.
Nothing above is checked by us. What we check is on the safety report.
Playwright Spatial Layout: common questions
- Is Playwright Spatial Layout MCP server safe?
- Mostly: it is graded B (82/100). Read the Playwright Spatial Layout safety report
- How do I install Playwright Spatial Layout?
- It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
- Does Playwright Spatial Layout need an API key?
- Not as far as the registry entry and our scan can tell: no credentials are declared or required.
- Is Playwright Spatial Layout maintained?
- The last commit was 167 days ago (2026-05-19). The latest release is v0.2.0.
- What can I use instead of Playwright Spatial Layout?
- Servers from other publishers that do the same job: invisible_playwright_mcp MCP server, Open Agent Search MCP server and Browser MCP server.
- How does Playwright Spatial Layout compare with other Scraping and browsing MCP servers?
- safety score 82/100 (higher than 58% of 868 Scraping and browsing servers); tools 6 (the typical Scraping and browsing server has 6); tools that change things 0% (typical: 0%. Fewer write tools means less an agent can break). Full comparison.
Alternatives to Playwright Spatial Layout
Same job from other publishers: the closest match first, then the best rated.
- invisible_playwright_mcpAI browser agent: browses, clicks, types, and reads real web pages from plain-English instructions.not reviewedEstablishedA
- Open Agent SearchSearch the web, news, images, videos and books, and extract page content for AI agents.not reviewedGrowingA
- BrowserMCP server for loading authenticated web pages using Chrome DevTools Protocolnot reviewedGrowingA
- unbrowser by UnchainedChrome-free MCP web access for agents with low-token page maps and browser escalation hints.not reviewedGrowingB
- PlaywrightPlaywright Tools for MCPnot reviewedWidely usedA