viewpo-mcp

viewpo-mcp

Provides AI assistants with visual feedback for responsive web design by capturing screenshots and extracting DOM layout data through the Viewpo macOS app. It enables automated UI verification and responsive behavior comparison across multiple viewport breakpoints.

Category
Visit Server

README

viewpo-mcp

MCP server that gives AI coding assistants eyes into responsive viewport rendering via the Viewpo macOS app.

Capture multi-viewport screenshots, extract DOM layout trees, and compare responsive behaviour across breakpoints — all from your AI assistant.

What it does

AI coding assistants (Claude Code, Cursor, Windsurf, etc.) are blind when working on frontend UI. They write CSS and HTML but can't see the visual result. This creates a slow feedback loop:

AI writes code → you check → you describe what's wrong → AI fixes → repeat

viewpo-mcp closes that loop. The AI can now:

  1. Screenshot a URL at multiple viewport widths simultaneously
  2. Extract the DOM layout tree with bounding rects and computed styles
  3. Compare layouts at two different viewport widths to find responsive issues

Requirements

  • Viewpo macOS app with MCP Bridge enabled (Settings → MCP Bridge → Start)
  • Node.js 20+

Setup

1. Install

npm install -g viewpo-mcp

Or run directly with npx (no install needed):

npx viewpo-mcp

2. Enable the MCP Bridge in Viewpo

  1. Open Viewpo on your Mac
  2. Go to Settings → MCP Bridge
  3. Click Start to enable the bridge server
  4. Copy the auth token (click the copy button next to the token)

3. Configure your AI assistant

Claude Code

Add to your MCP config (~/.claude/mcp.json or project .mcp.json):

{
  "mcpServers": {
    "viewpo": {
      "command": "npx",
      "args": ["-y", "viewpo-mcp"],
      "env": {
        "VIEWPO_AUTH_TOKEN": "<paste token from step 2>"
      }
    }
  }
}

Cursor

Add to your Cursor MCP settings (.cursor/mcp.json):

{
  "mcpServers": {
    "viewpo": {
      "command": "npx",
      "args": ["-y", "viewpo-mcp"],
      "env": {
        "VIEWPO_AUTH_TOKEN": "<paste token from step 2>"
      }
    }
  }
}

Other MCP-compatible assistants

Any assistant supporting the Model Context Protocol can use viewpo-mcp. Set the command to npx -y viewpo-mcp and provide the VIEWPO_AUTH_TOKEN environment variable.

Tools

viewpo_screenshot

Capture screenshots of a URL at one or more viewport widths. Returns base64 JPEG images.

url:       "https://example.com"           (required)
viewports: [{ width: 375, name: "phone" }, (optional, defaults to 1920px desktop)
            { width: 1920, name: "desktop" }]

Common widths: 375 (phone), 820 (tablet), 1920 (desktop).

viewpo_get_layout_map

Extract the DOM layout tree at a given viewport width. Returns element hierarchy with tags, classes, bounding rects, and computed CSS styles.

url:      "https://example.com"    (required)
viewport: 1920                     (optional, default 1920)
selector: ".main-content"          (optional, scope to subtree)

viewpo_compare_viewports

Compare the layout of a URL at two different viewport widths. Returns elements whose size or CSS styles differ between the two viewports.

url:        "https://example.com"  (required)
viewport_a: 375                    (required)
viewport_b: 1920                   (required)
selector:   ".hero"                (optional, scope to subtree)

Environment variables

Variable Required Default Description
VIEWPO_AUTH_TOKEN Yes Bearer token from Viewpo Settings → MCP Bridge
VIEWPO_PORT No 9847 Port the Viewpo bridge server listens on

How it works

AI Assistant (Claude Code / Cursor / Windsurf)
    | stdio (MCP protocol)
    v
viewpo-mcp (this package)
    | HTTP localhost:9847
    v
Viewpo macOS app (NWListener)
    | WKWebView rendering
    v
Headless browser pool (off-screen, up to 4 concurrent pages)

The Viewpo app runs a local HTTP server on localhost:9847. This MCP server translates tool calls into HTTP requests to that bridge. The app loads pages in headless WKWebView instances with real CSS viewport simulation — media queries fire at the target width, not the physical screen width.

Key advantage: WKWebView bypasses X-Frame-Options entirely. Any website loads, regardless of security headers that would block iframe-based tools.

Example workflow

You: "The hero section looks broken on mobile"

AI:  1. viewpo_screenshot("https://preview.example.com", [{width: 375}, {width: 1920}])
        → Sees the layout at both sizes
     2. viewpo_compare_viewports("https://preview.example.com", 375, 1920)
        → Gets structured diff: ".hero img" is 1200px wide on mobile (overflowing)
     3. Fixes the CSS
     4. viewpo_screenshot("https://preview.example.com", [{width: 375}])
        → Verifies the fix

Development

git clone https://github.com/littlebearapps/viewpo-mcp.git
cd viewpo-mcp
npm install
npm run build     # compile TypeScript
npm run dev       # watch mode

Licence

MIT - see LICENSE.

Links

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured