# DrissionPage MCP [Health: Active]

**Category:** 📂 Browser Automation  
**Repository:** https://github.com/jumodada/Drissionpage-MCP-Server  
**GitHub Stars:** 484  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/drissionpage-mcp

## Description
Local browser automation for MCP clients powered by DrissionPage.

## Tools
Capabilities this server exposes over MCP:

- **page_navigate** — Navigate to a specific URL in the browser
- **page_navigate_with_http_auth** — Open an isolated Chromium context, answer a bounded HTTP auth challenge, clean Fetch handlers, and retain the isolated authenticated tab until it is closed.
- **page_go_back** — Go back to the previous page in browser history
- **page_go_forward** — Go forward to the next page in browser history
- **page_refresh** — Refresh the current page
- **tab_list** — List browser tabs tracked by the current DrissionPage MCP session.
- **tab_switch** — Switch the active browser tab by id from tab_list.
- **tab_close** — Close a browser tab by id from tab_list without closing the whole browser.
- **page_resize** — Resize the browser window to specified dimensions
- **page_screenshot** — Take an inline screenshot of the current page
- **page_screenshot_save** — Save a screenshot to a local path under DP_MCP_SCREENSHOT_ROOT
- **page_export_artifact** — Generate one PDF or MHTML file under DP_MCP_ARTIFACT_ROOT and return checksum, safe relative path, and exact-once receipt evidence.
- **page_snapshot** — Return a bounded page outline with text excerpt, headings, links, buttons, inputs, forms, and recommended selectors.
- **page_accessibility_snapshot** — Return a bounded Chromium accessibility tree for the page or a scoped selector/frame/shadow target.
- **page_observe** — Return a compact current-page fingerprint with URL, title, ready state, element counts, visible text samples, active element, and recent console summary.
- **page_evaluate** — Run a bounded JavaScript function body in the current page and return a JSON-safe result. This can mutate the page.
- **page_pointer_move** — Move the viewport pointer to exact CSS pixel coordinates without pressing a button, using either one direct move or a bounded natural trajectory.
- **page_pointer_drag** — Perform one failure-safe viewport drag through optional ordered waypoints using direct or bounded natural movement while the button remains pressed. Always releases the button.
- **page_pointer_drag_element** — Resolve a source element and element, offset, or track-ratio destination immediately before one failure-safe drag. Supports CSS/XPath in the top document or one same-origin iframe, plus CSS paths through nested open Shadow DOM hosts; use coordinate drag for visual-only targets.
- **page_click_xy** — Move the viewport pointer to exact CSS pixel coordinates using a direct or bounded natural trajectory, optionally wait for an explicit delay, then press and release one mouse button.
- **page_close** — Close the current page/browser
- **page_get_url** — Get the current URL of the page
- **browser_headers_set** — Replace extra HTTP request headers for the current tab. Successful results return header names with values redacted; an empty object clears them.
- **browser_user_agent_set** — Override the current tab user agent and optional platform, returning the previous user agent so callers can restore it.
- **browser_cache_clear** — Clear HTTP cache without clearing cookies or Web Storage.
- **browser_permission_get** — Query one browser permission state for the current document origin without opening an operating-system prompt.
- **browser_permission_set** — Set one permission to granted, denied, or prompt for one bounded origin in the current Chromium context.
- **browser_permissions_reset** — Reset all Chromium permission overrides in the current browser context.
- **page_dialog_observe** — Observe a pending native alert, confirm, or prompt and return its bounded message without handling it.
- **page_dialog_respond** — Accept or dismiss one pending alert, confirm, or prompt through a capability-probed native DrissionPage dialog path.
- **element_click_and_download** — Perform one selector, coordinate, or keyboard trigger, await one completed download, and return an integrity-checked safe artifact receipt.
- **page_console_logs** — Read bounded browser console messages from the current tab. Supports level filtering, cursor pagination, and a maximum result limit.
- **element_find** — Find an element on the page using CSS selector or XPath. Bare selectors are treated as CSS; use text:... for text matching.
- **element_find_all** — Find multiple matching elements with bounded text/attribute summaries and recommended selectors for repeated lists, cards, and tables.
- **element_click** — Click an element found by CSS selector or XPath. Bare selectors are treated as CSS; use text:... for text matching.
- **element_type** — Type text into an input element
- **element_get_text** — Get text from an element or the whole page
- **element_get_attribute** — Get an attribute value from an element
- **element_get_property** — Get a live DOM property value from an element, such as an input's current value
- **element_get_html** — Get HTML from an element or the whole page
- **element_state_get** — Return DrissionPage element state and page/viewport geometry for a selector or accessibility target.
- **element_upload_file** — Set files on an input[type=file]. Paths must exist under DP_MCP_UPLOAD_ROOT and response data only returns safe file names.
- **element_click_and_upload** — Arm Chromium's file chooser, click one trigger, inject approved files, and always remove interception without opening a native operating-system picker.
- **page_scroll** — Scroll the current page by direction or to a position.
- **element_scroll_into_view** — Scroll an element into the viewport before a later action.
- **element_hover** — Move the mouse over an element.
- **keyboard_press** — Send keyboard text/keys to the active page element without echoing the input in the result.
- **element_select** — Select an option from a select element by value, text, or index.
- **element_check** — Set a checkbox or radio element to checked/unchecked.
- **frame_list** — List iframe/frame contexts on the current page without changing global state.
- **frame_snapshot** — Return a bounded page outline from a selected iframe/frame.
- **frame_find** — Find an element inside a selected iframe/frame without global frame state.
- **shadow_find** — Find one element inside a shadow root exposed by the supported DrissionPage runtime.
- **shadow_find_all** — Find repeated elements inside a shadow root exposed by the supported DrissionPage runtime.
- **browser_cookies_get** — Read normalized cookies with values redacted by default.
- **browser_cookies_set** — Set a bounded batch of browser cookies. Successful results preserve accepted metadata while redacting cookie values.
- **browser_cookies_delete** — Delete one named browser cookie with optional URL/domain/path scope.
- **browser_cookies_clear** — Clear all cookies from the active browser context.
- **storage_get** — Read localStorage or sessionStorage by key or as a bounded map, with values redacted unless explicitly requested.
- **storage_set** — Set one localStorage/sessionStorage item. The value is not echoed.
- **storage_clear** — Clear one key or all items from localStorage/sessionStorage.
- **wait_for_element** — Wait for an element to appear on the page. Bare selectors are treated as CSS; use text:... for text matching.
- **wait_for_url** — Wait for the current URL to contain a substring
- **wait_time** — Wait for a specific amount of time
- **wait_until** — Wait for observable page state: element present/visible/hidden/detached/clickable/stable, text contains/matches, or URL contains/matches.
- **network_listen_start** — Start beta HTTP/XHR/Fetch network observation for the active tab. This observes packets only; it does not intercept or modify requests.
- **network_listen_wait** — Wait for observed HTTP/XHR/Fetch packets and return bounded metadata. Bodies and headers are opt-in and sensitive headers are redacted.
- **network_listen_stop** — Stop beta network observation for the active tab and optionally clear it.
- **network_blocked_urls_set** — Replace URL patterns blocked for the current tab. Successful results echo patterns; an empty list clears them.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "drissionpage-mcp": {
    "command": "uvx",
    "args": ["drissionpage-mcp"],
    "env": {
      "DP_MCP_SCREENSHOT_ROOT": "",
      "DP_MCP_ARTIFACT_ROOT": ""
    }
  }
}
```

**Requires environment variables:** `DP_MCP_SCREENSHOT_ROOT`, `DP_MCP_ARTIFACT_ROOT` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What DrissionPage MCP does

DrissionPage MCP brings browser-facing operations to MCP clients through a local server. It uses DrissionPage's direct Chromium/CDP control and its requests-style HTTP session support, presenting browser actions as typed MCP tools. The server is designed around small, explicit operations that an MCP client can combine into a larger workflow.

Its browser controls cover ordinary navigation as well as more specialized tasks. An agent can open URLs, move through history, refresh or close a page, inspect the current URL, list and switch tabs, resize the window, and handle a bounded HTTP authentication flow in an isolated Chromium context. It can also observe or respond to native alert, confirm, and prompt dialogs.

## How it works

The server runs locally and keeps browser state for the active DrissionPage MCP session. Clients request individual operations, and the server returns typed results. Page observation can provide a bounded outline containing text excerpts, headings, links, buttons, inputs, forms, and selector suggestions. Separate tools expose a bounded Chromium accessibility tree and a compact fingerprint containing URL, title, ready state, element counts, visible text samples, active-element data, and recent console information.

For interaction, clients can use selectors where page structure is suitable or viewport coordinates for visual surfaces such as canvases, maps, charts, and editors. Pointer movement supports direct positioning or a deterministic bounded natural trajectory. Clicks and drags report execution details, and drag operations release the button if execution fails after pressing. Selector-backed element drags resolve geometry immediately before the operation and can target the top document, one same-origin iframe, or nested open Shadow DOM paths.

## Setup and configuration

Install the Python package with pip and configure the local server in an MCP client. The project specifies Python 3.10 or newer. Codex can use a TOML MCP configuration, while clients that accept MCP JSON can use the corresponding server definition. The documented client integrations include Codex CLI/IDE, Claude Code, Claude Desktop, and Cursor.

Screenshot files are written beneath the path configured by `DP_MCP_SCREENSHOT_ROOT`. PDF or MHTML exports use `DP_MCP_ARTIFACT_ROOT`; export results include a checksum, a safe relative path, and receipt evidence. A source checkout can also be installed in editable mode for local validation.

## Tools and capabilities

- Navigate, refresh, go backward or forward, close pages, and retrieve the active URL.
- List tabs, switch between them, or close one without shutting down the browser.
- Capture inline screenshots, save screenshots locally, and export a page as PDF or MHTML.
- Inspect page structure, accessibility state, compact page observations, and browser dialogs.
- Execute a bounded JavaScript function and return a JSON-safe result; the function may modify the page.
- Move, click, and drag with exact coordinates, bounded natural motion, ordered waypoints, or resolved element targets.
- Replace extra request headers, override the tab user agent, clear HTTP cache, and manage bounded origin permissions.
- Open an isolated authenticated tab for a bounded HTTP authentication challenge.

## Limitations and notes

The core package supplies atomic browser capabilities rather than site-specific procedures or business workflows. Clients or optional Skills compose those operations for particular sites and tasks. Coordinate actions require reliable viewport coordinates, while selector-based actions are preferable when the DOM provides stable targets. The server is intended for authorized use and does not provide challenge-specific workflows.

The project describes its status as beta and uses Chromium-backed browser execution. Native dialog handling is capability-probed, and permission operations are scoped to bounded origins or the current Chromium context.

_Full upstream README: https://allmcps.com/mcp/drissionpage-mcp/readme_

