Skip to main content
Glama

Glimpse

MCP server that gives AI coding agents visual feedback on frontend. Screenshots, diffs, DOM inspection, UI interaction, console logs — all through MCP.

Quick Start

npx glimpse-mcp

With Claude Code

claude mcp add glimpse -- npx glimpse-mcp

With Cursor

Add to .cursor/mcp.json:

{
  "mcpServers": {
    "glimpse": {
      "command": "npx",
      "args": ["glimpse-mcp"]
    }
  }
}

Related MCP server: VibeLens

Tools (11)

Tool

Description

page_outline

Page structure: sections, headings, nav links

screenshot

Take a screenshot of a page or element

screenshot_all

Multi-viewport screenshots in one call

pixel_diff

Before/after pixel comparison

smart_diff

Structural DOM diff + pixel diff

dom_inspect

Inspect element styles, size, position

console_logs

Browser console output and errors

interact

Click, type, scroll, hover, select on page elements

flow

Multi-step user flow testing (login, checkout)

sweep

Scan multiple pages for errors

accessibility

WCAG accessibility audit via axe-core

Configuration

Create .glimpserc.json in your project root:

{
  "port": 3000,
  "viewports": ["mobile", "desktop"],
  "baselineDir": ".glimpse/baselines",
  "diffThreshold": 0.1,
  "ignoreSelectors": [".cookie-banner"],
  "waitAfterNavigation": 200,
  "maxPageHeight": 10000,
  "browser": "chromium"
}

All fields are optional. Without this file, Glimpse uses sensible defaults.

Option

Default

Description

port

auto-detect

Dev server port

viewports

["mobile", "tablet", "desktop"]

Default viewports for screenshot_all

baselineDir

.glimpse/baselines

Where to save baselines

diffThreshold

0.1

Pixelmatch threshold (0-1)

ignoreSelectors

[]

Elements to hide during diff

waitAfterNavigation

200

Extra ms to wait after navigation

maxPageHeight

10000

Max height for full-page screenshots

browser

chromium

Browser engine

How It Works

Glimpse runs headless Chromium via Playwright. When an AI agent calls a tool, Glimpse opens your localhost page, performs the action, and returns results through MCP protocol.

Auto-detects dev server on common ports (5173, 3000, 8080, etc).

Baselines are persisted to disk (.glimpse/baselines/) so they survive between sessions.

Requirements

  • Node.js >= 18

  • A running dev server on localhost

License

MIT

Available Tools

11 tools
accessibilityB

Run WCAG accessibility audit using axe-core. Finds missing alt text, low contrast, missing button labels, heading order issues. Returns severity, affected elements, and fix suggestions.

Inputs: url, tags, selector, viewport.

console_logsA

Get browser console output: logs, warnings, errors, uncaught exceptions. Use this to check for JS errors after making changes.

Inputs: url, type, clear.

dom_inspectA

Inspect a DOM element: bounding box, computed CSS styles, attributes, text content, children count. Use this to understand element structure before making changes.

Inputs: selector (required), url, reload.

flowA

Execute a multi-step user flow: navigate, click, type, scroll, hover, select, press_key, wait, screenshot. Returns screenshots after each step. Use to test complete user journeys like login, checkout, form submission.

Inputs: steps (required), url, viewport, screenshot_each.

interactB

Interact with the page: click, type, scroll, hover, select, press_key. Returns a screenshot after the action. Use to test user flows and UI states.

Inputs: action (required), url, text, wait, +6 more.

page_outlineA

Get page structure: all sections, landmarks, headings, and nav links with positions and sizes. Use this FIRST on unfamiliar or long pages before screenshotting specific sections.

Inputs: url, reload, viewport.

pixel_diffA

Compare screenshots pixel-by-pixel. First call with action 'save_baseline' to save current state, then make changes, then call with action 'compare' to see what changed. Returns diff image with changed pixels highlighted in red.

Inputs: action (required), url, name, selector, +1 more.

screenshotA

Take a screenshot of a web page or a specific element. Returns the image. Use this to see what the UI looks like.

Inputs: url, reload, selector, viewport, +1 more.

screenshot_allB

Take screenshots at multiple viewports in one call (mobile + tablet + desktop). Use this to check responsive design.

Inputs: url, selector, full_page, viewports.

smart_diffA

Compare before/after with both pixel diff AND DOM analysis. Returns structured changes: which elements moved, resized, changed styles. Much more useful than pixel_diff alone. First call with action 'save_baseline', then make changes, then call with action 'compare'.

Inputs: action (required), url, name, selector, +1 more.

sweepA

Scan multiple pages: take screenshots and collect console errors on each. Returns a consolidated report. Use after changing shared components to check nothing broke.

Inputs: urls (required), checks, viewport.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 11 tools

    Disambiguation4/5

    Most tools target clearly different concerns: console logs, page structure, interaction, screenshots, DOM inspection, accessibility, and multi-page sweeps. However, pixel_diff and smart_diff overlap heavily (both use save_baseline/compare and smart_diff explicitly subsumes pixel_diff), and interact versus flow both perform actions returning screenshots, creating some selection ambiguity.

    Naming Consistency3/5

    All names use lowercase snake_case, which is readable, but the convention is mixed between noun phrases (console_logs, page_outline), verbs (interact, flow), and bare nouns (screenshot, accessibility). There is no consistent verb_noun pattern, so an agent cannot reliably predict name shape from action type.

    Tool Count5/5

    Eleven tools is well-scoped for a browser inspection and UI testing server, comfortably within the typical 3-15 range. Each tool maps to a recognizable browser-testing activity, even if two diff tools overlap.

    Completeness4/5

    The surface covers the core browser-testing lifecycle: console inspection, page structure, DOM inspection, screenshots across viewports, interactions, multi-step flows, visual diffs, multi-page sweeps, and accessibility audits. Minor gaps remain around explicit navigation/URL management as a standalone operation and network or performance inspection.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Enables AI coding assistants to visually inspect local web pages by providing screenshots, console errors, and sanitized DOM snapshots.
      1
      5 npm
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables coding agents to capture pixel-accurate screenshots and DOM state from localhost apps, receive user-drawn instructions and reference images, and manage implementation review cycles.
      MIT