(04)
ViewportIQ
An MCP server that connects AI coding assistants to a real browser, so they can inspect live websites, test responsive layouts and get structured findings back instead of guessing.
- Category
- AI Tools · Developer Infrastructure
- Year
- 2026
- Role
- Independent project
- Timeline
- Nov 2026
- Stack
- Node.js · TypeScript · MCP SDK · Playwright · Zod · DOM & CSSOM APIs · pixelmatch · Vitest

About ViewportIQ
AI coding assistants write a lot of interface code, but they can't see what it looks like in a browser. ViewportIQ is a Model Context Protocol (MCP) server that gives them that view: an assistant such as Claude Desktop, Cursor or Cline can open a real page, inspect its structure and styles, test it at different screen sizes and read back what went wrong.
It's an independent, open-source project, covering browser automation, the MCP protocol and developer tooling rather than an interface.

How I built it
17 tools, one browser session.
The server registers 17 MCP tools: open pages and move through history, inspect the page or a single element, read computed styles, sweep viewports, detect overflow, compare viewports, capture screenshots, audit the layout, and read console and network activity. They all share one Playwright Chromium session, so an assistant can open a page once and keep asking questions about it.
Every tool takes a Zod schema, so inputs are validated before the browser does anything.
server.tool(
'inspect_console',
'Capture and inspect browser console output: JavaScript errors, warnings, uncaught exceptions, and console messages.',
{
level: z.enum(['all', 'error', 'warn', 'info']).optional().describe(/* … */),
clear: z.boolean().optional().describe(/* … */),
},
async (args) => { /* … */ },
);Findings with evidence, not guesses.
Overflow and layout checks report measurements an assistant can act on: an element's computed width next to the viewport's, how far it runs past the edge, a severity from Critical to Low and a suggested fix. The layout audit rolls the findings into a score out of 100.
Seven screen sizes, compared pixel by pixel.
Responsive tests run across seven presets, from a 320px small phone to a 1920px desktop, or any custom size. Viewport comparisons capture matching screenshots and highlight what changed using pixelmatch.
Built to stay out of the protocol's way.
Over stdio, MCP uses stdout for its JSON-RPC messages, so a stray log line would break the connection. Every log goes to stderr instead. Network inspection reports failed requests and status codes without capturing auth tokens or cookies.
Tested against pages that are broken on purpose.
Six HTML fixtures each carry a known problem (horizontal overflow, a broken mobile nav, overlapping elements, an oversized image, clipped text) next to one clean responsive page. A Vitest suite of 24 tests checks the tools find them.