MCP server that gives AI agents geometric spatial awareness of web page layouts using Playwright
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
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.
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:
y: 1450px β below the fold on mobileplaywright-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.
extract_bounding_boxesReturns position, size, z-index, and viewport visibility for one or more elements.
detect_visual_occlusionChecks if one element physically overlaps another by computing bounding box intersection.
verify_spatial_relationshipsValidates a set of layout rules and returns pass/fail with a human-readable reason per rule.
Supported rule types: left_of Β· right_of Β· above Β· below Β· contains Β· not_overlapping
compute_viewport_reflowMeasures how element positions and sizes change across multiple viewport sizes.
Or install globally:
"Check if the cookie banner is blocking the checkout button on mobile (375px viewport)"
"Verify that the navigation is above the hero section and the sidebar doesn't overlap the main content"
"Show me which elements shift the most when resizing from desktop to mobile"
"Is the promotional modal covering the primary CTA on iPad viewport?"
MIT Β© vola-trebla
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/playwright-spatial-layout-mcp)<a href="https://allmcps.com/mcp/playwright-spatial-layout-mcp"><img src="https://allmcps.com/api/badge/playwright-spatial-layout-mcp?style=directory" alt="Playwright Spatial Layout MCP on AllMCPs" /></a>