Prerequisites
Install GSD Browser before configuring any client:Connect Your Agent
- Claude Desktop
- Cursor
- VS Code Copilot
- GSD Pi
Open your Claude Desktop configuration file:Restart Claude Desktop. The GSD Browser tools appear automatically in the tool list.
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
gsd-browser entry inside mcpServers:claude_desktop_config.json
Verify the Connection
After restarting your client, ask your agent:“List the available GSD Browser tools.”The agent should respond with the full tool manifest (50+ entries). You can also ask it to read a live resource:
“Read the gsd-browser://latest-snapshot resource and describe what’s on the current page.”
Remote / Hosted Mode
If your MCP client is hosted (not running locally), expose the server over HTTP instead of stdio:https://your-domain.example/mcp with the Authorization: Bearer <token> header.
Best Practices for AI Agents
Follow these rules to get reliable, reproducible results from your connected agent.Always snapshot before interacting with refs
Always snapshot before interacting with refs
Call
browser_snapshot (or read the gsd-browser://latest-snapshot resource) after every navigation or major DOM change. Refs are versioned — @v1:e1, @v2:e3, etc. — and become stale the moment the page updates. Stale refs return an error; retake a snapshot to get fresh ones.Prefer semantic browser_act over raw selectors
Prefer semantic browser_act over raw selectors
Use
browser_act with a semantic intent (e.g., submit_form, accept_cookies, fill_email) for common patterns. Semantic actions are self-healing and require no prior snapshot. Fall back to snapshot + ref tools only when you need precision on a complex widget.Use named sessions for state isolation
Use named sessions for state isolation
Pass
--session <name> (or the session parameter in MCP calls) to create an isolated browser context per project. Named sessions also persist the action cache across runs, so the agent learns stable selector mappings over time.Handle stale ref errors by retaking a snapshot
Handle stale ref errors by retaking a snapshot
If a
_ref tool returns a stale-ref error, do not retry with the same ref. Call browser_snapshot immediately to obtain a fresh @v(N+1):* set, then repeat the interaction.Follow suggested_next_actions in every response
Follow suggested_next_actions in every response
Every GSD Browser MCP tool returns a structured envelope with a
suggested_next_actions field. These are concrete, high-signal hints generated from the current page state. Reading and acting on them is the fastest path to robust automation.Built-in Prompts
GSD Browser ships executable multi-step prompts you can invoke directly from your agent:robust_login_flow
Handles cookie banners, fills credentials, waits for auth, and saves session state — all in one prompt.
full_page_audit
Runs snapshot, console, network, and visual diff checks in parallel and synthesizes findings.
evidence_creation_workflow
Starts a recording, annotates key decision points, exports the bundle, and generates a Playwright regression test.
debug_stuck_agent_flow
Captures a debug bundle, console log, network log, and timeline to explain why the agent is stuck.
robust_login_flow with start_url set to https://app.example.com/login.”