Skip to content
Back to search

glance

AI-powered browser automation MCP server for Claude Code. Navigate, click, screenshot, test — all from your terminal.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/debugbase--glance/badge.svg)](/listings/debugbase--glance)

HTML

<a href="/listings/debugbase--glance"><img src="/api/listings/debugbase--glance/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

1. Install

npm install -g glance-mcp

Or add directly to Claude Code:

claude mcp add glance -- npx glance-mcp

2. 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"

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 271 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. <p align="center">
  2. <img src=".github/assets/glance-logo.png" alt="Glance" width="80" />
  3. </p>
  4. <h1 align="center">Glance</h1>
  5. <p align="center">
  6. <strong>AI-powered browser automation for Claude Code</strong><br/>
  7. <em>by <a href="https://debugbase.io">DebugBase</a></em>
  8. </p>
  9. <p align="center">
  10. <a href="https://www.npmjs.com/package/glance-mcp"><img src="https://img.shields.io/npm/v/glance-mcp?color=blue&label=npm" alt="npm" /></a>
  11. <a href="https://github.com/DebugBase/glance/blob/main/LICENSE"><img src="https://img.shields.io/github/license/DebugBase/glance" alt="License" /></a>
  12. <a href="https://github.com/DebugBase/glance/stargazers"><img src="https://img.shields.io/github/stars/DebugBase/glance?style=social" alt="Stars" /></a>
  13. <a href="https://discord.gg/RyGk6HP7Uy"><img src="https://img.shields.io/badge/Discord-Join-5865F2?logo=discord&logoColor=white" alt="Discord" /></a>
  14. </p>
  15. <p align="center">
  16. Navigate, click, screenshot, test &mdash; all from your terminal.
  17. </p>
  18. ---
  19. ## What is Glance?
  20. Glance is an [MCP server](https://modelcontextprotocol.io) 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.
  21. ```
  22. You: "Test the login flow on localhost:3000"
  23. Claude: *opens browser* *navigates* *fills form* *clicks submit*
  24. *takes screenshot* *verifies redirect* *checks for errors*
  25. "Login flow works. Found 1 console warning about..."
  26. ```
  27. ## Features
  28. - **30 MCP tools** for complete browser control
  29. - **Inline screenshots** — Claude sees what the browser sees
  30. - **Accessibility snapshots** — full page structure as text
  31. - **Test scenario runner** — define multi-step tests in JSON
  32. - **12 assertion types** — exists, textContains, urlEquals, and more
  33. - **Session recording** — record and replay browser sessions
  34. - **Visual regression** — pixel-level screenshot comparison
  35. - **Network & console monitoring** — catch errors and failed requests
  36. - **Security controls** — URL allowlist/denylist, rate limiting, JS execution policies
  37. - **Headed mode** — watch the browser in real-time
  38. ## Quick Start
  39. ### 1. Install
  40. ```bash
  41. npm install -g glance-mcp
  42. ```
  43. Or add directly to Claude Code:
  44. ```bash
  45. claude mcp add glance -- npx glance-mcp
  46. ```
  47. ### 2. Configure
  48. Add to your `.mcp.json`:
  49. ```json
  50. {
  51. "mcpServers": {
  52. "glance": {
  53. "command": "npx",
  54. "args": ["glance-mcp"],
  55. "env": {
  56. "BROWSER_HEADLESS": "false"
  57. }
  58. }
  59. }
  60. }
  61. ```
  62. ### 3. Use
  63. Just ask Claude to interact with your web app:
  64. ```
  65. "Open localhost:3000 and take a screenshot"
  66. "Test the signup flow with invalid email"
  67. "Check if the pricing page has all three tiers"
  68. "Run a visual regression test on the dashboard"
  69. ```
  70. ## Tools Reference
  71. ### Browser Control (19 tools)
  72. | Tool | Description |
  73. |------|-------------|
  74. | `browser_navigate` | Navigate to a URL |
  75. | `browser_click` | Click an element (CSS selector or text) |
  76. | `browser_type` | Type into an input field |
  77. | `browser_hover` | Hover over an element |
  78. | `browser_drag` | Drag and drop between elements |
  79. | `browser_select_option` | Select from a dropdown |
  80. | `browser_press_key` | Press a keyboard key |
  81. | `browser_scroll` | Scroll the page or to an element |
  82. | `browser_screenshot` | Capture a screenshot (returned inline to Claude) |
  83. | `browser_snapshot` | Get the accessibility tree as text |
  84. | `browser_evaluate` | Execute JavaScript in the page |
  85. | `browser_console_messages` | Read console logs and errors |
  86. | `browser_network_requests` | Monitor network activity |
  87. | `browser_go_back` | Navigate back |
  88. | `browser_go_forward` | Navigate forward |
  89. | `browser_tab_new` | Open a new tab |
  90. | `browser_tab_list` | List all open tabs |
  91. | `browser_tab_select` | Switch to a tab |
  92. | `browser_close` | Close the browser |
  93. ### Test Automation (7 tools)
  94. | Tool | Description |
  95. |------|-------------|
  96. | `test_scenario_run` | Run a multi-step test scenario |
  97. | `test_scenario_status` | Check running scenario status |
  98. | `test_assert` | Run a single assertion |
  99. | `test_fill_form` | Auto-fill a form |
  100. | `test_auth_flow` | Test a login/signup flow |
  101. | `test_watch_events` | Watch for DOM/network events |
  102. | `test_stop_watch` | Stop watching events |
  103. ### Session & Visual (4 tools)
  104. | Tool | Description |
  105. |------|-------------|
  106. | `session_start` | Start recording a session |
  107. | `session_end` | End and save a session |
  108. | `session_list` | List recorded sessions |
  109. | `visual_baseline` | Save a visual baseline |
  110. | `visual_compare` | Compare against baseline |
  111. ## Test Scenarios
  112. Define multi-step test scenarios in JSON:
  113. ```json
  114. {
  115. "name": "Login Flow",
  116. "steps": [
  117. { "name": "Go to login", "action": "navigate", "url": "http://localhost:3000/login" },
  118. { "name": "Enter email", "action": "type", "selector": "input[type='email']", "value": "user@test.com" },
  119. { "name": "Enter password", "action": "type", "selector": "input[type='password']", "value": "password123" },
  120. { "name": "Click submit", "action": "click", "selector": "button[type='submit']" },
  121. { "name": "Wait for redirect", "action": "sleep", "ms": 2000 },
  122. { "name": "Verify dashboard", "action": "assert", "type": "urlContains", "expected": "/dashboard" },
  123. { "name": "Screenshot result", "action": "screenshot", "screenshotName": "post-login" }
  124. ]
  125. }
  126. ```
  127. ### Assertion Types
  128. | Type | Description |
  129. |------|-------------|
  130. | `exists` | Element exists in DOM |
  131. | `notExists` | Element does not exist |
  132. | `textContains` | Element text contains value |
  133. | `textEquals` | Element text equals value |
  134. | `hasAttribute` | Element has attribute with value |
  135. | `hasClass` | Element has CSS class |
  136. | `isVisible` | Element is visible |
  137. | `isEnabled` | Element is enabled |
  138. | `urlContains` | Current URL contains value |
  139. | `urlEquals` | Current URL equals value |
  140. | `countEquals` | Number of matching elements |
  141. | `consoleNoErrors` | No console errors |
  142. ## Configuration
  143. All configuration is via environment variables:
  144. | Variable | Default | Description |
  145. |----------|---------|-------------|
  146. | `BROWSER_HEADLESS` | `true` | Run browser in headed mode |
  147. | `BROWSER_SESSIONS_DIR` | `.browser-sessions` | Directory for screenshots and sessions |
  148. | `BROWSER_SECURITY_PROFILE` | `local-dev` | Security profile (`local-dev`, `restricted`, `open`) |
  149. | `BROWSER_VIEWPORT_WIDTH` | `1280` | Browser viewport width |
  150. | `BROWSER_VIEWPORT_HEIGHT` | `720` | Browser viewport height |
  151. | `BROWSER_TIMEOUT` | `30000` | Default timeout in ms |
  152. | `BROWSER_CHANNEL` | — | Browser channel (e.g., `chrome`, `msedge`) |
  153. ### Security Profiles
  154. | Profile | URL Access | JS Execution | Rate Limit |
  155. |---------|-----------|--------------|------------|
  156. | `local-dev` | All HTTP/HTTPS | Always | 60/min |
  157. | `restricted` | localhost only | Disabled | 30/min |
  158. | `open` | Everything | Always | 120/min |
  159. ## How It Works
  160. ```mermaid
  161. graph LR
  162. A["Claude Code<br/>(Agent)"] -- "MCP stdio<br/>tools & results" --> B["Glance<br/>(MCP Server)"]
  163. B -- "Playwright<br/>automation API" --> C["Browser<br/>(Chromium)"]
  164. C -- "screenshots<br/>DOM snapshots" --> B
  165. B -- "inline images<br/>a11y trees" --> A
  166. ```
  167. 1. Claude Code connects to Glance via MCP (stdio transport)
  168. 2. Claude calls tools like `browser_navigate`, `browser_screenshot`
  169. 3. Glance translates these into Playwright commands
  170. 4. Screenshots are returned as base64 images — Claude literally sees the page
  171. 5. Accessibility snapshots give Claude the full DOM structure as text
  172. ## Real-World Usage
  173. Glance has been battle-tested on production apps:
  174. - **DebugBase** (debugbase.io) — 12 scenarios, 104 test steps, 97% pass rate
  175. - **GitScribe AI** — 16 scenarios, 196 test steps, 96% pass rate
  176. ## Requirements
  177. - Node.js 18+
  178. - Playwright-compatible browser (auto-installed)
  179. ## Development
  180. ```bash
  181. git clone https://github.com/DebugBase/glance.git
  182. cd glance
  183. npm install
  184. npx playwright install chromium
  185. npm run build
  186. npm start
  187. ```
  188. ## Claude Code Integration
  189. ### Agent: `e2e-tester`
  190. 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.
  191. ```
  192. You: "Test the entire login flow on localhost:3000"
  193. Agent: Opens browser → navigates → fills forms → clicks → screenshots → asserts → reports
  194. ```
  195. ### Skill: `/glance-test`
  196. Quick E2E test runner. Just provide a URL:
  197. ```
  198. /glance-test https://myapp.com
  199. ```
  200. The skill will:
  201. 1. Navigate to the URL
  202. 2. Screenshot and snapshot the page
  203. 3. Discover all navigation links
  204. 4. Test each page with assertions
  205. 5. Check console for JS errors
  206. 6. Generate a pass/fail report
  207. ## Contributing
  208. We welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
  209. ## License
  210. [MIT](LICENSE) — built by [DebugBase](https://debugbase.io)

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.