Layout Detector MCP
L

Layout Detector MCP

An MCP server based on computer vision that automatically identifies the positions of image assets and extracts the layout structure by analyzing web page screenshots, supports the detection of multiple layout patterns such as radial and grid, and helps AI assistants accurately reconstruct web page layouts.
2.5 points
0

What is Layout Detector MCP?

Layout Detector MCP is an intelligent tool based on computer vision, specifically designed to analyze web page screenshots and extract layout information from them. It can identify the positions of image elements in the screenshot, calculate the spatial relationships between elements, and automatically detect layout patterns (such as radial, grid, stack, etc.), providing accurate pixel-level data for AI assistants to reconstruct web page layouts.

How to use Layout Detector MCP?

Using Layout Detector MCP is very simple: First, install the tool and configure it in Claude Code. Then, provide the web page screenshot and relevant image materials. The tool will automatically analyze and return detailed layout data. These data can be directly used for CSS layout implementation without manual pixel position measurement.

Applicable scenarios

Layout Detector MCP is particularly suitable for the following scenarios: 1. Web page design reconstruction: Accurately restore the layout structure from the screenshot. 2. Design system analysis: Analyze the layout patterns and rules of existing designs. 3. Responsive design adaptation: Understand the layout changes under different screen sizes. 4. Automated testing: Verify the consistency between the UI implementation and the design draft.

Main features

Intelligent element positioning
Use OpenCV template matching technology to accurately find the positions of image elements in the screenshot, providing pixel-level coordinates and size information.
Layout pattern recognition
Automatically detect 5 common layout patterns: radial layout, grid layout, stack layout, sidebar layout, and free layout.
Spatial relationship analysis
Calculate spatial relationships such as angles, distances, and relative positions between elements, providing accurate data support for CSS layout.
Multi-format image support
Support multiple image formats such as PNG, JPEG, GIF, WebP, BMP, including the first frame of animated GIFs.
Claude Code integration
Seamlessly integrate into Claude Code as an MCP server, allowing AI assistants to directly call the analysis function.
Advantages
High accuracy: Provide pixel-level position and size measurements, far exceeding the accuracy of manual visual inspection.
Automated analysis: Complete complex layout analysis with one click, saving a lot of manual measurement time.
Structured output: Return detailed data in JSON format, facilitating programmatic processing and use.
Easy to integrate: As an MCP server, it can be easily integrated with various AI assistants and development tools.
Open source and free: Based on the MIT license, it can be freely used and modified.
Limitations
Dependent on image quality: The quality of the screenshot will affect the matching accuracy. Blurred or over - compressed images may not work well.
Requires original materials: The image material files in the screenshot must be provided for matching analysis.
Cannot recognize text: Currently mainly targets image elements, and text content needs to be processed by other tools.
Limited layout patterns: Mainly recognize 5 common layouts, and complex or mixed layouts may not be accurately recognized.
Requires a Python environment: Python and related dependency libraries need to be installed.

How to use

Install the tool
Install Layout Detector MCP from GitHub via pip, or install it locally after cloning the repository.
Configure Claude Code
Add the Layout Detector server configuration in the MCP settings of Claude Code.
Restart and verify
Restart Claude Code and use the /mcp command to verify whether the server is successfully connected.
Prepare analysis materials
Collect the web page screenshot to be analyzed and all image material files in the screenshot.
Call the analysis tool
Request the AI assistant in Claude Code to analyze the layout, and the assistant will automatically call the Layout Detector tool.

Usage examples

Case 1: Reconstruct a web page with a radial layout
The user has a screenshot of an icon design arranged in a circle and needs to accurately reconstruct the CSS implementation.
Case 2: Verify design consistency
The development team needs to verify whether the layout of the implemented page is consistent with the design draft.
Case 3: Extract design system specifications
Designers need to extract design specifications such as spacing and alignment from an existing website.

Frequently Asked Questions

Why is the confidence level of the matching result very low?
What should I do if the MCP server does not appear in the /mcp list?
Which image formats are supported?
How to analyze different breakpoints of responsive design?
Do I need to provide all the images in the screenshot?

Related resources

GitHub repository
Source code and the latest version
MCP official documentation
Technical documentation for the Model Context Protocol
OpenCV documentation
Technical reference for the computer vision library
Claude Code usage guide
Integration and configuration of Claude Code

Installation

Copy the following command to your Client for configuration
{
  "mcpServers": {
    "layout-detector": {
      "command": "layout-detector-mcp"
    }
  }
}
Note: Your key is sensitive information, do not share it with anyone.

Alternatives

R
Rsdoctor
Rsdoctor is a build analysis tool specifically designed for the Rspack ecosystem, fully compatible with webpack. It provides visual build analysis, multi - dimensional performance diagnosis, and intelligent optimization suggestions to help developers improve build efficiency and engineering quality.
TypeScript
6.7K
5 points
N
Next Devtools MCP
The Next.js development tools MCP server provides Next.js development tools and utilities for AI programming assistants such as Claude and Cursor, including runtime diagnostics, development automation, and document access functions.
TypeScript
6.2K
5 points
T
Testkube
Testkube is a test orchestration and execution framework for cloud-native applications, providing a unified platform to define, run, and analyze tests. It supports existing testing tools and Kubernetes infrastructure.
Go
4.0K
5 points
M
MCP Windbg
An MCP server that integrates AI models with WinDbg/CDB for analyzing Windows crash dump files and remote debugging, supporting natural language interaction to execute debugging commands.
Python
6.5K
5 points
R
Runno
Runno is a collection of JavaScript toolkits for securely running code in multiple programming languages in environments such as browsers and Node.js. It achieves sandboxed execution through WebAssembly and WASI, supports languages such as Python, Ruby, JavaScript, SQLite, C/C++, and provides integration methods such as web components and MCP servers.
TypeScript
5.8K
5 points
N
Netdata
Netdata is an open-source real-time infrastructure monitoring platform that provides second-level metric collection, visualization, machine learning-driven anomaly detection, and automated alerts. It can achieve full-stack monitoring without complex configuration.
Go
6.4K
5 points
M
MCP Server
The Mapbox MCP Server is a model context protocol server implemented in Node.js, providing AI applications with access to Mapbox geospatial APIs, including functions such as geocoding, point - of - interest search, route planning, isochrone analysis, and static map generation.
TypeScript
6.4K
4 points
U
Uniprof
Uniprof is a tool that simplifies CPU performance analysis. It supports multiple programming languages and runtimes, does not require code modification or additional dependencies, and can perform one-click performance profiling and hotspot analysis through Docker containers or the host mode.
TypeScript
6.7K
4.5 points
G
Gitlab MCP Server
Certified
The GitLab MCP server is a project based on the Model Context Protocol that provides a comprehensive toolset for interacting with GitLab accounts, including code review, merge request management, CI/CD configuration, and other functions.
TypeScript
20.1K
4.3 points
N
Notion Api MCP
Certified
A Python-based MCP Server that provides advanced to-do list management and content organization functions through the Notion API, enabling seamless integration between AI models and Notion.
Python
17.6K
4.5 points
M
Markdownify MCP
Markdownify is a multi-functional file conversion service that supports converting multiple formats such as PDFs, images, audio, and web page content into Markdown format.
TypeScript
29.6K
5 points
D
Duckduckgo MCP Server
Certified
The DuckDuckGo Search MCP Server provides web search and content scraping services for LLMs such as Claude.
Python
57.8K
4.3 points
F
Figma Context MCP
Framelink Figma MCP Server is a server that provides access to Figma design data for AI programming tools (such as Cursor). By simplifying the Figma API response, it helps AI more accurately achieve one - click conversion from design to code.
TypeScript
53.6K
4.5 points
U
Unity
Certified
UnityMCP is a Unity editor plugin that implements the Model Context Protocol (MCP), providing seamless integration between Unity and AI assistants, including real - time state monitoring, remote command execution, and log functions.
C#
25.0K
5 points
G
Gmail MCP Server
A Gmail automatic authentication MCP server designed for Claude Desktop, supporting Gmail management through natural language interaction, including complete functions such as sending emails, label management, and batch operations.
TypeScript
18.5K
4.5 points
C
Context7
Context7 MCP is a service that provides real-time, version-specific documentation and code examples for AI programming assistants. It is directly integrated into prompts through the Model Context Protocol to solve the problem of LLMs using outdated information.
TypeScript
81.2K
4.7 points
AIBase
Zhiqi Future, Your AI Solution Think Tank
© 2025AIBase