visual-inspector-mcp
The visual-inspector-mcp server enables AI agents to see and interact with real web pages through a persistent headless Chromium browser session, preserving login state, scroll position, and client-side SPA state across calls.
Navigate to URLs — Load any URL (local dev server,
file://, or public site) in a persistent browser instance.Take screenshots — Capture the page as PNG or JPEG, scoped to a specific element (via CSS selector), the viewport, or the full scrollable page.
Click elements — Simulate clicks to reach UI states (e.g., open modals, menus, or tabs) before screenshotting.
Fill form fields — Set values on inputs, textareas, and selects, dispatching events React controlled components need; supports batch-filling multiple fields in one call.
Type per-keystroke — Simulate typing one character at a time (firing keydown/keypress/keyup per character) for inputs that require real keystroke events.
Press keyboard keys — Send keys like
Enter,Tab,Escape, or combos likeControl+Ato a specific or currently focused element.Resize the viewport — Change browser dimensions to test responsive breakpoints without reloading or losing client-side state.
Retrieve console logs — Fetch recent browser console messages and page errors, with options to filter to errors only, limit count, and include timestamps.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@visual-inspector-mcpNavigate to https://example.com and take a screenshot"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
visual-inspector-mcp
English | فارسی
An MCP server that lets Claude Code — or any MCP-compatible client — actually see and interact with the web pages it's working on, instead of only reading the source. It runs a persistent headless Chromium browser (via Playwright) and returns screenshots as inline images the model can view directly in the tool result.
"This icon looks wrong" → the agent screenshots the icon and looks at it, instead of guessing from the CSS.
Why
Coding agents are excellent at reading and writing code, but blind to what that code actually renders as. A misaligned icon, a color that doesn't match the design, a responsive layout that breaks at a certain width, a modal that overlaps its own close button — none of these are visible from source alone. This server closes that gap with a set of small, composable tools built around a single persistent browser session — including full form interaction, so the agent can fill inputs, type keystrokes, and submit forms before looking at the result.
Related MCP server: Browser MCP
Tools
Tool | Description |
| Load a URL (dev server, |
| Screenshot the current page, or a single element by CSS selector / Playwright locator syntax (e.g. |
| Click an element to reach a UI state (open a modal, menu, tab) before screenshotting it. |
| Set the value of an input/textarea/select by selector ( |
| Type into a field one key at a time ( |
| Press a keyboard key such as |
| Change the viewport size to check a responsive breakpoint, independent of navigating or screenshotting — so you can resize → click → screenshot without reloading the page (and losing client-side state). |
| Recent browser console messages and page errors, to correlate a visual issue with a JS error. Supports |
Full parameter reference is in the tool descriptions themselves (visible to
any MCP client) and in index.js.
Requirements
Node.js 18 or later
~200 MB free disk space (Playwright downloads a Chromium build on install)
Installation
git clone https://github.com/MatinMHF/visual-inspector-mcp.git
cd visual-inspector-mcp
npm install # installs dependencies and downloads Chromium via postinstallConfiguration
Claude Code
claude mcp add --scope user visual-inspector -- node /absolute/path/to/visual-inspector-mcp/index.js--scope user registers it for every project. Use --scope project instead
to scope it to the current repo, or omit --scope for the current session
only. Restart Claude Code (or start a new session) after adding it — a
running session won't pick up a newly registered server.
On Windows PowerShell, quote the -- separator:
claude mcp add --scope user visual-inspector "--" node "C:/path/to/visual-inspector-mcp/index.js"Verify it's connected:
claude mcp listClaude Desktop (or any client using claude_desktop_config.json)
Add to your claude_desktop_config.json:
{
"mcpServers": {
"visual-inspector": {
"command": "node",
"args": ["/absolute/path/to/visual-inspector-mcp/index.js"]
}
}
}Other MCP clients
This is a standard stdio MCP server — node index.js speaks MCP over
stdin/stdout. Any client that supports stdio-transport MCP servers can run it
the same way.
Usage
Once configured, just ask naturally:
"Navigate to localhost:3000/settings and screenshot the save icon in the toolbar — does it look right?"
"Resize to 375x667 and check what the mobile nav looks like after I click the hamburger menu."
"Fill in the signup form with test data and submit it — any errors?"
"Any console errors on the checkout page?"
Typical tool sequences:
// Visual inspection
navigate({ url: "http://localhost:3000/settings" })
screenshot({ selector: "#save-icon" }) // isolate just the element
console_logs({ level: "error" }) // check for related JS errors
// Form interaction
navigate({ url: "http://localhost:3000/signup" })
fill({ fields: [{ selector: "#name", value: "Ada" }, { selector: "#email", value: "ada@example.com" }] })
press({ key: "Enter", selector: "[type=submit]" })
screenshot({}) // see the result
// Responsive check
resize({ width: 375, height: 667 })
screenshot({ fullPage: true })Design notes
One persistent page per server process.
navigatedoesn't spin up a new browser each call — it reuses the same page/context so state (login, scroll position, SPA client state) survives acrossclick→fill→screenshotsequences.fillvstype.fillis almost always the right choice — it clears the field, sets the value atomically, and fires the input/change events React's controlled components need. Usetypeonly when the input's handler specifically reacts to individual keystrokes (e.g. an autocomplete that fires onkeydown).Cheapest-capture-first.
screenshot's tool description actively steers the calling model towardselector(one element) over the default viewport, and viewport overfullPage(most expensive in image tokens).Lossless by default. Screenshots are PNG unless you explicitly opt into
format: "jpeg". On flat-color UI (icons, buttons), JPEG is often no smaller — so PNG stays the default; on photo-heavy full-page captures, JPEG at quality 80 measured ~75–80% smaller in testing.Bounded log output.
console_logsdefaults to the last 30 entries with no timestamps — passlimit/withTimestampsfor more.
Security note
This server gives the connected AI client the ability to navigate a real
(headless) browser to any URL it's given — including localhost and other
addresses on your local network. It's designed to run locally over stdio for
trusted development use, the same way you'd trust any other local dev
tooling. Don't expose it over a network transport or hand it to an untrusted
client.
Development
npm test # runs smoke-test.mjs: spins up the server as a subprocess and
# exercises every tool + parameter over the real MCP protocolsmoke-test.mjs is also run in CI on every push/PR (see
.github/workflows/test.yml).
Changelog
v1.1.0
Added
filltool — set input/textarea/select values (supports batchfields[])Added
typetool — per-keystroke typing for inputs needing real keydown eventsAdded
presstool — send keyboard keys (Enter,Tab,Escape,Control+A, …)Extended smoke test with full form interaction coverage
v1.0.0
Initial release:
navigate,screenshot,click,resize,console_logs
License
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/MatinMHF/visual-inspector-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server