Deterministic visual inspection for AI agents. Overlap, overflow, contrast, quality.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Deterministic visual inspection for AI agents. The eyes a coding agent never had.
Cornea gives a coding agent that builds web pages a real way to see them. As a token-cheap, deterministic structural model it can reason over exactly, instead of megabytes of screenshots and raw DOM dumped into context.
An agent doesn't need a photo of a page. It needs to know is my layout broken, and how. Cornea computes an abstract visual geometry model of every element (box, position, z-order, computed styles) and derives inspection conclusions. overlap, overflow, contrast, quality. Then exposes them as native tools on three surfaces: CLI, MCP, and HTTP API.
One promise holds everything together: same input β byte-identical output. No Chromium, no sub-pixel variance, no server. A single ~1.4 MB binary.
Requires only
cargo. No browser, no Node, no system dependencies. Builds fine on a phone-class device.
Or install the cornea command from npm (no Rust toolchain needed):
Take this page below. It looks fine as source. But it's hiding four layout bugs. Cornea finds every one.
Run it and Cornea reports the damage instantly:
Each finding is precise and actionable:
| Finding | Detail |
|---|---|
| Overlap | section.row β div.overlap-right, area 20000 pxΒ². The absolutely-positioned boxes cover the cards |
| Overflow | div.overflow-bad: right edge 600 exceeds viewport 360 β clipped |
| Contrast | black on blue: ratio 2.44:1. Fails WCAG AA (needs 4.5) |
| Contrast | #cccccc on white: ratio 1.61:1. Fails WCAG AA |
That is the value: hundreds of tokens, not hundreds of kilobytes, and a deterministic answer the agent can act on and re-verify.
Cornea is one engine, three doors. All three returns identical inspection JSON because they funnel through a single shared dispatch.
An agent calls layout.* tools directly; it passes the page source, or a
live URL (see URL capture below), per call:
| Tool | Returns |
|---|---|
layout.inspect | Full visual model + report |
layout.overlaps | Elements whose boxes collide |
layout.overflow | Clipped / collapsed / off-screen |
layout.contrast | WCAG AA ratios for text elements |
layout.quality | 0..1 health score + issue list |
layout.fidelity | Which CSS features are exact vs approximated |
| Route | Method | Returns |
|---|---|---|
/inspect | POST | Full report |
/overlaps | POST | Collisions |
/overflow | POST | Clipped / collapsed / off-screen |
/contrast | POST | WCAG ratios |
/quality | POST | Health score |
/fidelity | GET | Engine capabilities |
/health | GET | Liveness |
Every surface accepts a URL where the HTML would go. Cornea fetches the page, inlines its external stylesheets and external scripts (relative URLs resolved against the page), then inspects what a browser would actually show. That is the live coding session loop: run your dev server, point cornea at it, read the layout verdict.
Honesty around capture:
height emulates a fixed viewport (screenshot frame, iframe,
email) and enables below the fold clipping checks. Default 0 means an
unbounded scrolling page.Read the full technical spec: CORNEA-ARCHITECTURE.md
Cornea never silently fakes precision. layout.fidelity tells an agent exactly what it can trust, and every report carries its own warnings for sources the engine saw but did not apply (external stylesheets, external scripts, media queries, unresolved colors):
Cornea can execute inline <script> that builds its DOM via a minimal shim,
then run the result through the same deterministic layout engine:
Factual signals from GitHub, npm, and our automated checks β not a rating.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/cornea-deterministic-visual-inspection)<a href="https://allmcps.com/mcp/cornea-deterministic-visual-inspection"><img src="https://allmcps.com/api/badge/cornea-deterministic-visual-inspection?style=directory" alt="Cornea, deterministic visual inspection on AllMCPs" /></a>