
Playwright Spatial Layout Mcp
io.github.vola-trebla由 GitHub 帳號 vola-trebla 發布v0.2.0更新於 Oct 24, 2026
MCP server that gives AI agents geometric spatial awareness of web page layouts using Playwright
發布方自己的服務:Layout
概覽
以 Playwright 為基礎的 MCP 伺服器,為助理提供真實網頁的邊界框幾何資料,用來分析版面、遮擋與重排。
- 可以做什麼
- 量測指定選擇器元素的位置、尺寸、z-index 與視窗可見性
- 偵測目標元素與浮層之間的視覺遮擋,回傳交集比例與被遮擋面積
- 驗證 left_of、right_of、above、below、contains、not_overlapping 等版面規則,並回傳通過與否及原因
- 在多個視窗尺寸下比較元素位置與尺寸,找出版面位移
- 適用情境
- 適合排查 Playwright 測試失敗或響應式版面問題:DOM 看似正常,但元素被隱藏、移出畫面、互相重疊或發生位移。也適合檢查橫幅或彈窗是否在特定視窗下擋住主要按鈕。
- 執行需求
- 透過 npx 或全域 npm 安裝,以 stdio 在本機執行;需要 Node.js 以及 Playwright 的 Chromium 瀏覽器(npx playwright install chromium)。未宣告帳號、API 金鑰或環境變數。載入被檢查的頁面需要網路存取。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Playwright Spatial Layout Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
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
來源:README.md,提交 6c85ccf
工具
0版本歷史
1- v0.2.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
其他 Layout 整合
Layout
link.layout官方發布者
Layout 是遠端 MCP 端點,讓助理依餐廳名稱在 Layout 合作的餐廳訂購自取餐點。
LayoutBridge Light for Adobe InDesign®
com.mcp-interfaces
本機 MCP 伺服器,讓助手在使用者桌面上讀取與編輯 Adobe InDesign 文件:頁面、框架、文字、樣式、預檢與 PDF 匯出。

EasyGerber: AI PCB design, layout, and routing
由 GitHub 帳號 EasyGerber 發布
託管式 EasyGerber MCP 伺服器,讓助理設計 PCB:挑選目錄元件、建立與編輯電路板、產生佈局佈線、檢查並匯出。

Layout Debug
由 GitHub 帳號 AntonChuraev99 發布
本機 MCP 伺服器:在執行中的網頁或 Android 應用程式裡點選介面元素,把它的錨點、盒模型與量測資料交給編碼代理。
LayoutBridge for Adobe InDesign®
com.mcp-interfaces
本機 MCP 伺服器,讓助手在使用者桌面上檢視與編輯 Adobe InDesign 文件:頁面、框架、文字、樣式、排版檢查與 PDF 匯出。