ViewPortal MCP
by flavrwebdev
README.md
# ViewPortal MCP
Responsive QC your coding agent runs itself. One call checks a page on a named set of phones, tablets and desktop browsers and returns a verdict, numbered issues and full-size captures with each browser's own bars drawn in.
The MCP server ships inside [ViewPortal for Mac](https://viewport.al/). This package is a small launcher that finds the installed app and starts its server over stdio.
```
> QC localhost:3000 on phones
FAIL · 8 issues on 4 targets (phones, light)
1. all 4 targets: sideways scroll 307–372px — #readout, div.wide
2. all 4 targets: 1 broken image — img
4. all 4 targets: text contrast 1.3:1 — p.low
6. all 4 targets: 100vh can extend under expanded browser bars — div.hero
8. iPhone 17, iPhone 17 Pro Max, iPhone SE (Safari 27.2): small input text may trigger focus zoom — #small
Pictures in ~/…/runs/20261122-021725-ipcl/
```
That is a real run of the `phones` preset (four phones, Safari and Chrome, light mode) on a test page with planted faults, shortened. More real runs: [viewport.al/mcp](https://viewport.al/mcp).
## Install
1. Download [ViewPortal for Mac](https://viewport.al/download/mac) and open it. The 7-day free trial starts by itself, with every feature open.
2. Open **Settings › Agent access**, turn on **Let coding agents use ViewPortal** and press **Install engines** (Chromium and WebKit).
3. Under **Connect**, press **Install** for Claude Code, Codex or Cursor. Firefox is one more install, under **Engines** on the same screen.
That is all most people need. To add it by hand instead, turn on Agent access in the app and use one of these.
**Claude Code**
```bash
claude mcp add --scope user viewportal -- npx -y viewportal-mcp
```
**Cursor** (`~/.cursor/mcp.json`)
```json
{
"mcpServers": {
"viewportal": { "command": "npx", "args": ["-y", "viewportal-mcp"] }
}
}
```
**Codex** (`~/.codex/config.toml`)
```toml
[mcp_servers.viewportal]
command = "npx"
args = ["-y", "viewportal-mcp"]
startup_timeout_sec = 60
tool_timeout_sec = 900
```
**Without Node:** point your client at the app's own command, `/Applications/ViewPortal.app/Contents/Resources/qc/viewportal-qc` with the argument `mcp`.
Requires macOS 15 or later.
## Ask in plain words
- `QC localhost:3000 on phones` (four phones)
- `QC localhost:3000 on everything` (adds tablets and desktop Safari, Chrome and Firefox)
- `What breaks in dark mode?`
- `What's broken on mobile? Worst first.`
- `Compare before and after on phones`
- `Set up a ViewPortal project for this site`, then `Run my-shop QC`
## What the agent gets
- **A verdict first.** PASS or FAIL, then numbered issues with selectors, worst first, then the picture folder. Short enough to act on.
- **Several engines in one run.** Playwright's Chromium and WebKit, plus Firefox after one more install. Every target names the engine and version that drew it. On a Mac with Xcode, Safari can also be captured from the iOS Simulator.
- **The browser's own bars.** Safari's address bar in each layout and Chrome's toolbar are drawn from measurements of the real browsers, with the home indicator and the iPhone Duo fold in place, so a capture shows what a person would see.
- **Quirk Lens.** Eleven rules for mobile browser behaviour, including `100vh` under a toolbar, fixed footers and the keyboard, viewport meta, `theme-color`, input zoom, sideways overflow, fold occlusion, Android edge-to-edge.
- **Light and dark pairs**, before and after comparisons, batches, and saved projects that remember a site's URLs and must-have devices.
## Tools
| Tool | What it does |
| --- | --- |
| `qc_url` | Check a URL on a preset or on named devices and browsers |
| `dual_theme` | Light and dark captures of the same targets, as labelled pairs |
| `compare` | Before and after, side by side |
| `batch` | Several URLs in one run |
| `run_project` | Run a saved project by name |
| `save_project`, `list_projects`, `delete_project` | Manage saved projects |
| `list_presets` | The built-in device sets |
| `list_devices`, `list_browsers`, `list_engines` | What is available on this Mac |
| `install_engine` | Download a rendering engine |
| `get_run`, `list_runs` | Earlier results |
| `get_started` | Setup help for the agent |
Presets pick the devices by name: `common` (seven common devices, used when you name none), `phones`, `iphones`, `android`, `tablets`, `desktop`, `everything`, `full` (every measured device and browser) and `windows`. `list_presets` shows the set your copy of the app has.
## Where it runs
Pages are rendered on your Mac, and runs and pictures are saved there. The server speaks stdio (or loopback HTTP on 127.0.0.1). The app also checks its licence and for updates, and downloads the engines you install. It reaches `localhost`, LAN and Tailscale dev servers directly.
## Price
ViewPortal for Mac is free for 7 days with every feature open. After that it is £9 a month or £79 a year, for up to 3 Macs, including every update. [Subscribe](https://viewport.al/subscribe).
## This launcher
`npx -y viewportal-mcp` looks for ViewPortal in `/Applications` and `~/Applications` (then Spotlight, skipping Xcode build products and archives, the Bin and mounted disk images), and runs its bundled `viewportal-qc mcp`, passing stdin, stdout and any extra arguments straight through. Set `VIEWPORTAL_QC` to the full path of `Contents/Resources/qc/viewportal-qc` if the app lives somewhere else. The launcher is MIT licensed; the app has its own [terms](https://viewport.al/terms).
## Links
- [Setup guide and real runs](https://viewport.al/mcp)
- [How to get Claude Code to check your site on every screen size](https://viewport.al/guides/claude-code-check-every-screen-size)
- [Best MCP servers for testing your site at every screen size](https://viewport.al/guides/mcp-server-responsive-testing)
- Support: support@flavrapps.com
Made by Flavr Web Dev Ltd.