web-perception-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@web-perception-mcpWhat's the layout of example.com?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
web-perception MCP Server
A Model Context Protocol (MCP) server for DOM-first, vision-second webpage analysis. Built for AI coding assistants like Cline.
What it does
This server gives AI agents the ability to understand webpages by combining structural DOM data with visual analysis via MiniMax vision. Instead of sending a raw screenshot to the vision model, it extracts the page's heading hierarchy, interactive elements, landmarks, and layout first — then sends both the screenshot and the structural context to MiniMax for significantly better analysis.
Tools
Tool | Description | Cost |
| Extract page structure, metadata, and content. Basic mode (HTTP fetch) or full mode (headless browser). | Free — no vision API call |
| Analyse local image files (screenshots, mockups, designs) using MiniMax vision. | Vision API call |
| End-to-end: browser → DOM extraction → screenshot → enriched prompt → MiniMax vision → structured findings with element refs. | Vision API call |
| Extract structured data from a page matching a provided schema. Progressive escalation: DOM → browser → vision. | Vision API call only if DOM insufficient |
Prerequisites
Node.js 18+
A nanoGPT account with an API key
An MCP-compatible client like Cline, Cursor, or Claude Desktop
Installation
git clone https://github.com/JaviGala/web-perception-mcp.git
cd web-perception-mcp
npm install
cp .env.example .env # add your NANOGPT_API_KEYConfiguration
Set via .env file or environment variables:
Variable | Default | Description |
| (required) | Your nanoGPT API key |
|
| API endpoint. Use |
|
| Vision model to use |
|
| Default temperature |
|
| Default max tokens |
|
| HTTP request timeout |
|
| Max characters in extracted text |
MCP Client Configuration
Cline (VS Code)
{
"mcpServers": {
"web-perception": {
"type": "stdio",
"command": "/usr/local/bin/node",
"timeout": 120,
"args": ["/path/to/web-perception-mcp/src/server.js"],
"env": {
"NANOGPT_API_KEY": "sk-your-key-here"
}
}
}
}How analyze_page_visual works
This is the core differentiator — the "clever" analysis workflow:
Launch headless browser (Playwright + Chromium, no visible window)
Navigate to the target URL and wait for the page to load
Extract DOM structure — heading hierarchy, interactive elements with bounding boxes, landmarks, visible text
Take a screenshot (viewport or full page)
Build enriched prompt — combines DOM structure with the user's question into a structured prompt
Send to MiniMax — the vision model receives both the screenshot image AND the structural context
Parse response — extracts structured JSON findings with element refs, severity, confidence scores
This produces significantly better analysis than a raw screenshot alone because MiniMax can correlate visual elements with their DOM positions, roles, and content.
Architecture
src/
server.js — MCP server, tool definitions, request routing
vision.js — MiniMax API client, prompt builder, result parser
browser.js — Playwright browser pool management
extraction.js — DOM extraction (static + browser-rendered)
security.js — URL validation, logging, timeout utilitiesEvolution
This project was built as a replacement for nanogpt-vision-mcp, which only supported raw image analysis without DOM context. The MiniMax client code was carried forward with no functional changes. See the nanogpt-vision-mcp README for the full migration story.
License
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/JaviGala/web-perception-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server