glance

作者 DebugBase

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

152
Stars
23
Forks
TypeScript
语言
2026/8/23
添加时间

⚠️ 第三方软件声明

本 Skill 为第三方开源软件,独立托管于 GitHub。SkillTip 仅为信息目录,不控制或维护底层仓库。所显示的安全检查为自动化且范围有限,安装前请自行审查源码。

阅读服务条款

安装

添加到你的 Claude Code skills 目录:

# Add to your Claude Code skills
git clone https://github.com/DebugBase/glance

快速入门

使用 glance 等 Skills 的指南。

安全报告

已验证

上次扫描:—

{
  "status": "PASSED",
  "issues": []
}

README.md

Glance

Glance

AI-powered browser automation for Claude Code
by DebugBase

npm License Stars Discord

Navigate, click, screenshot, test — all from your terminal.


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

Tools Reference

Browser Control (19 tools)

ToolDescription
browser_navigateNavigate to a URL
browser_clickClick an element (CSS selector or text)
browser_typeType into an input field
browser_hoverHover over an element
browser_dragDrag and drop between elements
browser_select_optionSelect from a dropdown
browser_press_keyPress a keyboard key
browser_scrollScroll the page or to an element
browser_screenshotCapture a screenshot (returned inline to Claude)
browser_snapshotGet the accessibility tree as text
browser_evaluateExecute JavaScript in the page
browser_console_messagesRead console logs and errors
browser_network_requestsMonitor network activity
browser_go_backNavigate back
browser_go_forwardNavigate forward
browser_tab_newOpen a new tab
browser_tab_listList all open tabs
browser_tab_selectSwitch to a tab
browser_closeClose the browser

Test Automation (7 tools)

ToolDescription
test_scenario_runRun a multi-step test scenario
test_scenario_statusCheck running scenario status
test_assertRun a single assertion
test_fill_formAuto-fill a form
test_auth_flowTest a login/signup flow
test_watch_eventsWatch for DOM/network events
test_stop_watchStop watching events

Session & Visual (4 tools)

ToolDescription
session_startStart recording a session
session_endEnd and save a session
session_listList recorded sessions
visual_baselineSave a visual baseline
visual_compareCompare 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

TypeDescription
existsElement exists in DOM
notExistsElement does not exist
textContainsElement text contains value
textEqualsElement text equals value
hasAttributeElement has attribute with value
hasClassElement has CSS class
isVisibleElement is visible
isEnabledElement is enabled
urlContainsCurrent URL contains value
urlEqualsCurrent URL equals value
countEqualsNumber of matching elements
consoleNoErrorsNo console errors

Configuration

All configuration is via environment variables:

VariableDefaultDescription
BROWSER_HEADLESStrueRun browser in headed mode
BROWSER_SESSIONS_DIR.browser-sessionsDirectory for screenshots and sessions
BROWSER_SECURITY_PROFILElocal-devSecurity profile (local-dev, restricted, open)
BROWSER_VIEWPORT_WIDTH1280Browser viewport width
BROWSER_VIEWPORT_HEIGHT720Browser viewport height
BROWSER_TIMEOUT30000Default timeout in ms
BROWSER_CHANNELBrowser channel (e.g., chrome, msedge)

Security Profiles

ProfileURL AccessJS ExecutionRate Limit
local-devAll HTTP/HTTPSAlways60/min
restrictedlocalhost onlyDisabled30/min
openEverythingAlways120/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" --> A
  1. Claude Code connects to Glance via MCP (stdio transport)
  2. Claude calls tools like browser_navigate, browser_screenshot
  3. Glance translates these into Playwright commands
  4. Screenshots are returned as base64 images — Claude literally sees the page
  5. 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 start

Claude 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 → reports

Skill: /glance-test

Quick E2E test runner. Just provide a URL:

/glance-test https://myapp.com

The skill will:

  1. Navigate to the URL
  2. Screenshot and snapshot the page
  3. Discover all navigation links
  4. Test each page with assertions
  5. Check console for JS errors
  6. Generate a pass/fail report

Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

License

MIT — built by DebugBase

常见问题

What is glance?

glance is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by DebugBase. AI-powered browser automation MCP server for Claude Code. Navigate, click, screenshot, test — all from your terminal. It has 152 GitHub stars.

Is glance safe to use?

glance returned warnings in SkillsLLM's automated security scan. It has no critical vulnerabilities, but review the flagged issues in the Security Report section before adding it to your workflow.

How do I install glance?

Clone the repository with "git clone https://github.com/DebugBase/glance" and add it to your Claude Code skills directory (see the Installation section above).

What programming language is glance written in?

glance is primarily written in TypeScript. It is open-source under DebugBase on GitHub, so you can review or fork the full source.

Are there alternatives to glance?

Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh glance against similar tools.

评论 (0)

暂无评论,成为第一个分享想法的人!

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情

claude-code

by anthropics

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

120,03119,897Shell
AI 智能体
查看详情

开发者还喜欢

基于喜欢此 Skill 的开发者投票和收藏

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP 服务器apisai-tools
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情