Glance
What is Glance?
Glance is an MCP server that gives Claude Code a real browser. Instead of guessing what your web app looks like, Claude can actually see it, interact with it, and test it.
You: "Test the login flow on localhost:3000"
Claude: *opens browser* *navigates* *fills form* *clicks submit*
*takes screenshot* *verifies redirect* *checks for errors*
"Login flow works. Found 1 console warning about..."Features
30 MCP tools for complete browser control
Inline screenshots — Claude sees what the browser sees
Accessibility snapshots — full page structure as text
Test scenario runner — define multi-step tests in JSON
12 assertion types — exists, textContains, urlEquals, and more
Session recording — record and replay browser sessions
Visual regression — pixel-level screenshot comparison
Network & console monitoring — catch errors and failed requests
Security controls — URL allowlist/denylist, rate limiting, JS execution policies
Headed mode — watch the browser in real-time
Quick Start
1. Install
npm install -g glance-mcpOr add directly to Claude Code:
claude mcp add glance -- npx glance-mcp2. Configure
Add to your .mcp.json:
{
"mcpServers": {
"glance": {
"command": "npx",
"args": ["glance-mcp"],
"env": {
"BROWSER_HEADLESS": "false"
}
}
}
}3. Use
Just ask Claude to interact with your web app:
"Open localhost:3000 and take a screenshot"
"Test the signup flow with invalid email"
"Check if the pricing page has all three tiers"
"Run a visual regression test on the dashboard"Tools Reference
Browser Control (19 tools)
Tool | Description |
| Navigate to a URL |
| Click an element (CSS selector or text) |
| Type into an input field |
| Hover over an element |
| Drag and drop between elements |
| Select from a dropdown |
| Press a keyboard key |
| Scroll the page or to an element |
| Capture a screenshot (returned inline to Claude) |
| Get the accessibility tree as text |
| Execute JavaScript in the page |
| Read console logs and errors |
| Monitor network activity |
| Navigate back |
| Navigate forward |
| Open a new tab |
| List all open tabs |
| Switch to a tab |
| Close the browser |
Test Automation (7 tools)
Tool | Description |
| Run a multi-step test scenario |
| Check running scenario status |
| Run a single assertion |
| Auto-fill a form |
| Test a login/signup flow |
| Watch for DOM/network events |
| Stop watching events |
Session & Visual (4 tools)
Tool | Description |
| Start recording a session |
| End and save a session |
| List recorded sessions |
| Save a visual baseline |
| Compare against baseline |
Test Scenarios
Define multi-step test scenarios in JSON:
{
"name": "Login Flow",
"steps": [
{ "name": "Go to login", "action": "navigate", "url": "http://localhost:3000/login" },
{ "name": "Enter email", "action": "type", "selector": "input[type='email']", "value": "user@test.com" },
{ "name": "Enter password", "action": "type", "selector": "input[type='password']", "value": "password123" },
{ "name": "Click submit", "action": "click", "selector": "button[type='submit']" },
{ "name": "Wait for redirect", "action": "sleep", "ms": 2000 },
{ "name": "Verify dashboard", "action": "assert", "type": "urlContains", "expected": "/dashboard" },
{ "name": "Screenshot result", "action": "screenshot", "screenshotName": "post-login" }
]
}Assertion Types
Type | Description |
| Element exists in DOM |
| Element does not exist |
| Element text contains value |
| Element text equals value |
| Element has attribute with value |
| Element has CSS class |
| Element is visible |
| Element is enabled |
| Current URL contains value |
| Current URL equals value |
| Number of matching elements |
| No console errors |
Configuration
All configuration is via environment variables:
Variable | Default | Description |
|
| Run browser in headed mode |
|
| Directory for screenshots and sessions |
|
| Security profile ( |
|
| Browser viewport width |
|
| Browser viewport height |
|
| Default timeout in ms |
| — | Browser channel (e.g., |
Security Profiles
Profile | URL Access | JS Execution | Rate Limit |
| All HTTP/HTTPS | Always | 60/min |
| localhost only | Disabled | 30/min |
| Everything | Always | 120/min |
How It Works
graph LR
A["Claude Code<br/>(Agent)"] -- "MCP stdio<br/>tools & results" --> B["Glance<br/>(MCP Server)"]
B -- "Playwright<br/>automation API" --> C["Browser<br/>(Chromium)"]
C -- "screenshots<br/>DOM snapshots" --> B
B -- "inline images<br/>a11y trees" --> AClaude Code connects to Glance via MCP (stdio transport)
Claude calls tools like
browser_navigate,browser_screenshotGlance translates these into Playwright commands
Screenshots are returned as base64 images — Claude literally sees the page
Accessibility snapshots give Claude the full DOM structure as text
Real-World Usage
Glance has been battle-tested on production apps:
DebugBase (debugbase.io) — 12 scenarios, 104 test steps, 97% pass rate
GitScribe AI — 16 scenarios, 196 test steps, 96% pass rate
Requirements
Node.js 18+
Playwright-compatible browser (auto-installed)
Development
git clone https://github.com/DebugBase/glance.git
cd glance
npm install
npx playwright install chromium
npm run build
npm startClaude Code Integration
Agent: e2e-tester
Glance ships with a Claude Code agent definition for comprehensive browser testing. The agent knows all 30 tools and follows a structured test workflow: navigate, screenshot, assert, report.
You: "Test the entire login flow on localhost:3000"
Agent: Opens browser → navigates → fills forms → clicks → screenshots → asserts → reportsSkill: /glance-test
Quick E2E test runner. Just provide a URL:
/glance-test https://myapp.comThe skill will:
Navigate to the URL
Screenshot and snapshot the page
Discover all navigation links
Test each page with assertions
Check console for JS errors
Generate a pass/fail report
Contributing
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
License
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/DebugBase/glance'
If you have feedback or need assistance with the MCP directory API, please join our Discord server