
Playwright Spatial Layout Mcp
io.github.vola-treblaPublished by GitHub account vola-treblav0.2.0Updated Oct 24, 2026
MCP server that gives AI agents geometric spatial awareness of web page layouts using Playwright
The publisher's own server: Layout
Overview
Playwright-based MCP server that gives an assistant real bounding-box geometry of live web pages to reason about layout, overlap and reflow.
- What you can do
- Measure element positions, sizes, z-index and viewport visibility for chosen selectors
- Detect visual occlusion between a target element and an overlay, with intersection ratio and occluded area
- Verify layout rules such as left_of, right_of, above, below, contains and not_overlapping, with pass/fail reasons
- Compare element positions and sizes across several viewport sizes to find layout shifts
- When to use it
- Useful when debugging Playwright test failures or responsive layout bugs where the DOM looks fine but elements are hidden, off-screen, overlapped or shifted. Also handy for checking whether banners or modals block a call to action at specific viewport sizes.
- Requirements
- Runs locally over stdio via npx or a global npm install; needs Node.js and a Playwright Chromium browser installed (npx playwright install chromium). No accounts, API keys or environment variables are declared. Network access is needed to load the pages being inspected.
Installation
In SourceWeft
- Open Playwright Spatial Layout Mcp in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
playwright-spatial-layout-mcp 🐸📐
[npm version] [npm downloads] [CI] [License: MIT]
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
extract_bounding_boxes
Returns position, size, z-index, and viewport visibility for one or more elements.
detect_visual_occlusion
Checks if one element physically overlaps another by computing bounding box intersection.
verify_spatial_relationships
Validates 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_reflow
Measures how element positions and sizes change across multiple viewport sizes.
🚀 Installation
Or install globally:
Claude Desktop config
💡 Example Agent Prompts
"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?"
🔗 Related Projects
- playwright-trace-decoder-mcp — root-cause analysis of CI failures from Playwright traces
- flakiness-knowledge-graph-mcp — knowledge graph of flaky test patterns
- ast-impact-mapper-mcp — find affected tests from code changes via TypeScript AST
- zod-contract-mock-forge-mcp — deterministic mock generation from Zod schemas
📄 License
MIT © vola-trebla
Source: README.md at commit 6c85ccf
Tools
0Version history
1- v0.2.0LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts
Other Layout integrations
Layout
link.layoutOfficial publisher
Layout is a remote MCP endpoint that lets an assistant place restaurant pickup orders by name at the restaurants Layout works with.
LayoutBridge Light for Adobe InDesign®
com.mcp-interfaces
Local MCP server that lets an assistant read and edit Adobe InDesign documents on the user's desktop: pages, frames, text, styles, preflight and PDF export.

EasyGerber: AI PCB design, layout, and routing
Published by GitHub account EasyGerber
Hosted EasyGerber MCP server that lets an assistant design PCBs: pick catalog parts, create and edit boards, generate layout and routing, check, and export.

Layout Debug
Published by GitHub account AntonChuraev99
Local MCP server that lets you pick a UI element in a live web page or Android app and hand its anchors, box and measurements to your coding agent.
LayoutBridge for Adobe InDesign®
com.mcp-interfaces
Local MCP server that lets an assistant inspect and edit Adobe InDesign documents on the user's desktop: pages, frames, text, styles, typography checks and…