# Drisp Browser
Drisp Browser is an MCP server that gives AI agents a compact, semantic interface to the browser.
**[Website](https://drisp.dev)** · **[npm](https://www.npmjs.com/package/@drisp/browser-mcp)** · **[vs. Playwright MCP](https://drisp.dev/vs-playwright-mcp)**
Instead of exposing the full DOM or accessibility tree, it returns structured page snapshots: visible regions, readable content, interactive elements, stable element IDs, form context, screenshots, canvas inspection, and network activity. Agents can then navigate and act on pages using semantic IDs instead of brittle selectors or massive context dumps.
It is built for coding agents, browser agents, QA agents, research agents, and automation workflows that need reliable web interaction without wasting tokens on low-signal browser internals.
---
## Why this exists
Browser automation is easy for scripts and hard for LLM agents.
Traditional browser tools expose either raw DOM, full accessibility trees, screenshots, or low-level selectors. That works for deterministic code, but it is inefficient for language models. The model has to spend context and reasoning budget separating useful UI intent from implementation noise.
Drisp Browser changes the interface boundary.
The browser still runs through Puppeteer and Chrome DevTools Protocol, but the agent sees a smaller, more semantic representation of the page:
- What regions exist on the page
- What the user can read
- What the user can interact with
- Which elements are visible, enabled, selected, expanded, or required
- Which stable `eid` should be used for the next action
- What changed after the previous action
The goal is not to mirror the browser. The goal is to expose the page in the shape an agent can reason about.
---
## The core abstraction
Drisp Browser turns a browser page into an agent-readable snapshot.
A snapshot contains compact semantic information such as:
- Page regions: header, navigation, main content, footer
- Interactive elements: buttons, links, textboxes, checkboxes, radios, comboboxes
- Readable content: headings, paragraphs, alerts, labels
- Element state: visible, enabled, checked, selected, expanded, focused
- Layout hints: bounding boxes and screen zones
- Stable element IDs: `eid` values that can be reused by action tools
Agents act on these IDs:
```json
{
"eid": "btn-sign-in"
}
```
rather than reasoning from fragile CSS selectors or repeatedly scanning a large DOM tree.
This makes browser use more predictable for agents because observation and action are connected through a stable semantic contract.
---
## What it is
Drisp Browser is:
- An MCP server for browser automation
- A semantic observation layer over Puppeteer and CDP
- A compact page representation for LLM agents
- A stable `eid`-based action interface
- A toolset for navigation, interaction, forms, screenshots, canvas, readability, and network inspection
Drisp Browser is not:
- A replacement for Puppeteer
- A general-purpose browser
- A visual testing framework
- A scraping framework
- A CAPTCHA or anti-bot bypass tool
Puppeteer and CDP remain the execution layer. Drisp Browser changes what the agent sees and how it decides what to do next.
---
## How it works
At a high level:
1. The agent calls a browser tool through MCP.
2. Drisp Browser controls Chrome through Puppeteer and CDP.
3. The current page is reduced into semantic regions, readable content, and actionable elements.
4. The agent receives a compact snapshot instead of a raw browser dump.
5. The agent acts using stable element IDs.
6. Drisp Browser waits for the page to stabilize and returns the updated state.
This keeps browser lifecycle, page representation, and action execution separated.
```text
AI Agent
↓ MCP
Drisp Browser
↓ semantic snapshots + stable eids
Puppeteer / Chrome DevTools Protocol
↓
Chrome / Chromium
```
---
## Example agent loop
A typical browser-agent loop looks like this:
1. The agent calls `navigate` with a URL.
2. Drisp Browser returns a compact page snapshot.
3. The agent calls `find` to locate a semantic element, such as a “Sign in” button or an email field.
4. The agent calls `click`, `type`, `select`, or `press` using the returned `eid`.
5. Drisp Browser waits for the page to stabilize and returns the updated snapshot.
6. The agent continues from the changed page state instead of re-reading the entire DOM.
This gives the model a browser interaction loop based on semantic state transitions rather than raw page internals.
---
## Example user journey
The following example shows how an agent might use Drisp Browser inside a dashboard-style web app.
Task:
> Find the failed payment from `client@example.com`, open it, add an internal note saying “Customer contacted. Waiting for bank confirmation.”, and confirm the note was saved.
### 1. Agent navigates to the payments dashboard
Tool call:
```json
{
"tool": "navigate",
"input": {
"url": "https://dashboard.example.com/payments"
}
}
```
Tool response:
```xml
Home
Payments
Customers
Reports
PaymentsCreate paymentExportSearch paymentsStatusDate₹12,500 succeeded nadeem@example.com Jun 6₹8,999 failed client@example.com Jun 6₹2,400 refunded test@example.com Jun 5
```
The agent does not need to inspect a DOM table. It sees the relevant row directly as semantic state.
### 2. Agent opens the failed payment
Tool call:
```json
{
"tool": "click",
"input": {
"eid": "payment-row-2"
}
}
```
Tool response:
```xml
Payment ₹8,999FailedCustomer client@example.comPayment method UPIFailure reason Bank declined transactionTimelinePayment created Jun 6, 10:42 AMPayment failed Jun 6, 10:43 AMInternal notesAdd an internal noteSave noteRefundRetry paymentCopy payment ID
```
Because this is a navigation, the response is a new baseline. The previous row IDs are no longer assumed valid.
### 3. Agent types the internal note
Tool call:
```json
{
"tool": "type",
"input": {
"eid": "inp-internal-note",
"text": "Customer contacted. Waiting for bank confirmation.",
"clear": true
}
}
```
Tool response:
```xml
Add an internal note
```
The agent receives only the changed field, not the whole page again.
### 4. Agent saves the note
Tool call:
```json
{
"tool": "click",
"input": {
"eid": "btn-save-note"
}
}
```
Tool response:
```xml
Note saved.Note saved.Customer contacted. Waiting for bank confirmation.Save noteNote saved.
```
The agent can now conclude that the note was saved because both signals are present:
1. A status appeared: `Note saved.`
2. A new note row appeared with the submitted text.
### 5. Agent final answer to the user
```text
Done. I opened the failed ₹8,999 payment for client@example.com, added the internal note, and confirmed that the dashboard showed “Note saved.”
```
This journey demonstrates the core interaction model:
```text
navigate → baseline state
click row → new page baseline
type note → small diff
click save → diff + observation + confirmation state
```
The agent does not receive raw DOM, brittle selectors, or a massive accessibility tree. It receives a compact state transition after every browser action.
---
## Tool response format
Most browser interaction tools return a compact XML state response.
The response is designed for LLM agents, not for humans reading browser internals. It favors stable semantic IDs, short tags, page regions, and incremental diffs over full DOM dumps.
A typical response contains:
- ``: current page state, title, URL, and step number
- ``: viewport, scroll position, and active interaction layer
- `` or ``: whether this is a full page state or an incremental update
- ``: important transient UI changes such as dialogs, alerts, and toasts
- ``: grouped actionable elements by semantic page region
- Short element tags such as ``, ``, ``, ``, ``, and ``
Agents should use the `id` attributes, not CSS selectors, when performing follow-up actions.
### Baseline response
This is the shape after `navigate` when the agent has no previous state.
```xml
Acme
Docs
Sign inEmailPasswordRemember meSign in
```
### Diff response
For same-page interactions, Drisp Browser returns only the meaningful change.
```xml
Email
```
### Validation error
Readable mutations are rendered inline inside ``.
```xml
Invalid email or password.PasswordSign inInvalid email or password.
```
### Modal response
Overlay layers such as modals, popovers, and drawers show the complete active overlay so the agent can reason about available actions.
```xml
Delete product?This action cannot be undone.Delete product?CancelDelete
```
### Trimmed large region
When a page has many repeated elements, large regions may be trimmed. The agent can call `find` with the region to retrieve more.
```xml
Invoice 1001
Invoice 1002
Invoice 1003
Invoice 1004
Invoice 1005
Invoice 1048
Invoice 1049
Invoice 1050
```
---
## Real-world response examples
These examples are illustrative, but shaped according to the actual response contract: ``, ``, `` or ``, optional ``, and region-grouped short element tags.
### GitHub-style issue page
```xml
GitHub
Search or jump to...
Pull requests
Issues
Create new...
Code
Issues
Pull requests
Actions
Checkout flow fails on SafariOpen
nadeem
EditCopy linknadeem commentedSafari users cannot complete checkout after selecting Apple Pay.Add reactionComment optionsLeave a commentCommentClose issueAssigneesLabelsProjectsMilestone
```
### Linear-style issue list
```xml
Inbox
My issues
Views
Roadmaps
Projects
Active issuesNew issueDisplay optionsFilterIn ProgressCORE-61 Operations consoleCORE-62 GitHub Actions CI pipelineTodoCORE-47 KYB Step 2CORE-63 Fix Biome config drift
```
### Payments dashboard
```xml
Home
Payments
Customers
Products
Reports
PaymentsCreate paymentExportSearch paymentsStatusDate₹12,500 succeeded nadeem@example.com Jun 6₹8,999 failed client@example.com Jun 6₹2,400 refunded test@example.com Jun 5
```
---
## Tool surface
Drisp Browser exposes MCP tools across the main phases of browser use.
### Session
- `list_pages`
- `close_page`
### Navigation
- `navigate`
- `go_back`
- `go_forward`
- `reload`
### Observation
- `snapshot`
- `find`
- `get_element`
- `screenshot`
### Interaction
- `click`
- `type`
- `press`
- `select`
- `hover`
- `scroll_to`
- `scroll`
- `drag`
- `wheel`
### Forms
- `get_form`
- `get_field`
### File uploads
There is no `upload` tool. Clicking an upload control (file input, "Choose file" button, `