Skip to main content
Glama
DrissionPage MCP Server

DrissionPage MCP Server

by jumodada

DrissionPage MCP Server

Professional browser automation for Codex, Claude Code, and MCP clients, powered by DrissionPage.

DrissionPage is a Python web automation library built around direct Chromium/CDP control with requests-style HTTP session support. This server exposes its browser-facing capabilities as typed, atomic MCP tools.

PyPI Downloads License Python Version CI codecov Status

DrissionPage MCP interactive Browser Lab

Open the interactive Browser Lab to replay bounded natural pointer motion, drag controls, and verify observable state.

Official Repositories: GitHub | GitCode

English Version | δΈ­ζ–‡η‰ˆζœ¬

πŸ–±οΈ Atomic Browser Control with Natural Pointer Motion

DrissionPage MCP 0.9.0 exposes 69 typed browser capabilities. The MCP server provides accurate low-level observation and interaction; the client or an optional Skill composes those capabilities for a site, component library, challenge, or business workflow.

The model decides what to do; the MCP executes the requested browser operation exactly.

Screenshot / page observation
        ↓
Multimodal model identifies viewport coordinates
        ↓
page_click_xy(x=442, y=369, profile="natural")
        ↓
24-step eased cubic path β†’ exact target β†’ press β†’ release
        ↓
Observe and verify the resulting page state

Core interaction guarantees

  • Two bounded profiles: direct emits one exact move; natural emits a deterministic 24-step eased cubic path with reproducible 8-14ms intervals and exact final arrival.

  • No hidden randomness: the same start, target, and profile produce the same path; there is no jitter, overshoot, or anti-detection logic. Pointer position is stateful, so a repeated call can begin from the previous endpoint.

  • Explicit sequences: click is the selected move profile, optional caller-specified delay, press, release; drag keeps one press across the selected path and ordered waypoints.

  • Failure-safe input: a pressed pointer button is released if execution fails after the press.

  • Fresh browser evidence: selector geometry is resolved immediately before selector-backed drag operations.

  • Typed results: outputs report the executed coordinates, button, step count, and explicit delay metadata.

Use structured DOM targets when reliable selectors exist. Use coordinates, natural motion, and explicit drag waypoints for canvas controls, editors, maps, charts, and other visual-only surfaces. Component-specific target discovery, challenge observation, multi-click sequencing, login procedures, and other business policy belong in the client or an optional Skill.

{
  "x": 442,
  "y": 369,
  "profile": "natural",
  "button": "left",
  "element": "visually identified control"
}

Designed for authorized browser automation, testing, accessibility workflows, and technical research. The core does not provide challenge-specific or site-specific workflows.

Related MCP server: WaveXisMCP

🧭 Client Setup Navigation


πŸš€ What is DrissionPage MCP?

DrissionPage MCP Server is a local Model Context Protocol (MCP) server that brings DrissionPage browser automation tools to Codex CLI/IDE, Claude Code, Claude Desktop, and other MCP clients.

The standalone server exposes 69 typed tools, zero MCP prompts, and one static optional-Skills catalog resource. Version 0.9.0 keeps that registry stable while tightening opt-in navigation policy matching and rejecting denied destinations before browser startup. Every tool loads by default; there is no capability profile or opt-in full mode. Models compose these atomic capabilities, while reusable challenge and site procedures live outside the distribution as optional Skills. Browser execution is powered by DrissionPage.

🌟 Why Choose DrissionPage MCP?

  • Structured-First, Vision-Ready: Uses DOM structure when available and multimodal coordinates when visual interaction is the better tool

  • Deterministic: Reliable element selection with CSS/XPath normalization for LLM-friendly selectors

  • Natural Pointer Motion: Offers exact direct movement and a bounded deterministic 24-step eased trajectory from the same atomic tools

  • Fast & Lightweight: Built on DrissionPage's efficient engine with minimal overhead

  • Type-Safe: Full type hints and Pydantic validation for all tools

  • Open-source Friendly: Includes compatibility notes, troubleshooting, and CI checks for maintainable contributions

  • Easy Integration: Simple pip install + Codex TOML or MCP JSON configuration

βœ… Quality and Real-World Validation

DrissionPage MCP is backed by a strict regression suite and browser-backed scenario checks:

  • Strict automated tests: unit, protocol, schema snapshot, response-contract, resource, release-metadata, security-policy, browser-integration, and coverage checks run in CI.

  • 95% coverage floor: CI enforces the current 95% coverage threshold and uploads coverage reports.

  • Real browser verification: Chrome/Chromium-backed integration tests exercise the same MCP tools exposed to clients.

  • Document-boundary verification: focused browser tests prove cross-origin OOPIF reads and DrissionPage-exposed closed Shadow DOM lookup without JavaScript piercing fallbacks.

  • Challenge-surface verification: local fixtures cover normal, hidden, off-viewport, delayed, and CSS 3D cross-origin widgets; official Turnstile dummy keys cover visible, invisible, pass, fail, and forced-interactive callbacks without retaining tokens.

  • Scenario validation: the playground MCP Lab covers realistic forms, commerce pages, social feeds, timelines, dynamic waits, iframe cases, and recovery paths without depending on public demo websites.


⚑ First Success Path

0.9.0 is currently a local candidate. Until it is published, validate it from a source checkout with python -m pip install -e . or install a locally built wheel. The PyPI version command below applies after publication.

# Install or update Codex CLI (macOS/Linux)
curl -fsSL https://chatgpt.com/codex/install.sh | sh

# Install from PyPI
python -m pip install -U "drissionpage-mcp>=0.9.0"

# Verify package and environment
drissionpage-mcp --version
drissionpage-mcp doctor

The official installer updates an existing Codex CLI installation as well. For Windows and the Codex desktop app, see the official Codex CLI and app documentation.

Then add the Codex or MCP client configuration below and restart your client.


πŸ“¦ Setup in Codex CLI/IDE (30 seconds)

Codex supports local stdio MCP servers through config.toml; the CLI and IDE extension share the same MCP configuration.

  1. Edit Codex configuration:

    • User-level: ~/.codex/config.toml

    • Project-level: .codex/config.toml inside a trusted project

  2. Add this configuration:

    [mcp_servers.drissionpage]
    command = "drissionpage-mcp"
    startup_timeout_sec = 20
    tool_timeout_sec = 60
  3. Restart Codex. In the TUI, run /mcp; from a shell, run codex mcp list.

For Claude Code, Claude Desktop, and other JSON-based MCP clients, see Integration Examples.


🎯 Quick Examples

Navigate and Screenshot

"Visit https://example.com and take a screenshot for me"

Search and Extract

"Go to Wikipedia, search for Python, and get the first paragraph"

Form Automation

"Fill out the form at https://httpbin.org/forms/post and submit it"

Data Scraping

"Get the top 10 news headlines from news.ycombinator.com"

πŸ› οΈ 69 Typed Browser Tools

All 63 tab-scoped tools accept an optional tab_id. Omit it to capture the MCP current tab once at call start, or pass an MCP/native DrissionPage tab id to target explicitly. Successful tab-scoped results return the resolved MCP tab_id; independent tabs can run concurrently while actions on one tab remain serialized.

🌐 Navigation (5 tools)

  • page_navigate - Navigate to any URL; target an existing tab_id, or combine new_tab=true with optional background, new_window, or new_context; observe returns a change summary

  • page_navigate_with_http_auth - Navigate through a scoped HTTP auth challenge in a dedicated disposable Chromium context without returning credentials

  • page_go_back - Navigate backward in browser history

  • page_go_forward - Navigate forward in browser history

  • page_refresh - Reload current page

πŸ—‚οΈ Tab Operations (3 tools)

  • tab_list - List open browser tabs with stable MCP tab IDs

  • tab_switch - Switch to a tab returned by tab_list

  • tab_close - Reject new work, drain in-flight actions, then close one tab without closing the whole browser

🎯 Element Interaction & Extraction (16 tools)

  • element_find - Find one element by CSS selector or XPath; bare selectors like h1 are treated as CSS

  • element_find_all - Extract bounded repeated elements with text, attributes, and recommended selectors

  • element_click - Click any element with additive left/right/middle and single/double-click semantics

  • element_click_and_download - Correlate one selector, coordinate, or keyboard trigger with one integrity-checked artifact under DP_MCP_DOWNLOAD_ROOT

  • element_type - Input text into elements

  • element_upload_file - Use element_upload_file(paths=[...]) to upload files from DP_MCP_UPLOAD_ROOT to input[type=file]

  • element_click_and_upload - Arm Chromium's file chooser, click its trigger, inject approved files, and clean interception without an operating-system picker

  • element_scroll_into_view - Bring an element into the viewport before acting

  • element_hover - Hover an element to trigger menu/tooltip states

  • element_select - Select an option by value, text, or index

  • element_check - Check or uncheck checkbox/radio controls

  • element_get_text - Get element or page text

  • element_get_attribute - Get an HTML attribute

  • element_get_property - Get a live DOM property such as an input value

  • element_get_html - Get element or page HTML

  • element_state_get - Read live DrissionPage state flags and document/viewport geometry for one element

πŸ“Έ Page Operations (18 tools)

  • page_screenshot - Capture an inline full-page or viewport screenshot

  • page_screenshot_save - Save a screenshot under DP_MCP_SCREENSHOT_ROOT

  • page_export_artifact - Generate a managed PDF or MHTML artifact under DP_MCP_ARTIFACT_ROOT with SHA-256 and receipt evidence

  • page_snapshot - Return a bounded page outline with headings, links, buttons, inputs, forms, and selector recommendations

  • page_accessibility_snapshot - Return a bounded Chromium accessibility tree for the page or a scoped element, with field values redacted unless explicitly requested

  • page_observe - Return a compact page fingerprint with URL, title, counts, visible text samples, active element, and recent console summary

  • page_evaluate - Run bounded JavaScript in the current page and return a JSON-safe result

  • page_scroll - Use page_scroll(pixels=...) for relative scrolling, or pass x/y for an absolute position

  • keyboard_press - Send keys to the active element/page without echoing the input in results

  • page_resize - Adjust browser window

  • page_pointer_move - Move to exact viewport CSS coordinates with direct or bounded deterministic natural motion

  • page_pointer_drag - Perform one failure-safe coordinate drag through up to six optional ordered waypoints with the selected profile

  • page_pointer_drag_element - Resolve source and destination geometry immediately before dragging; supports CSS/XPath in the top document or one same-origin iframe, plus CSS paths through nested open Shadow DOM hosts

  • page_click_xy - Move with direct or natural motion, optionally wait for an explicit delay, then press and release at the exact target

  • page_close - Close browser

  • page_get_url - Get current URL

  • page_dialog_observe - Wait for and inspect a pending native alert, confirm, or prompt without handling it

  • page_dialog_respond - Use page_dialog_respond(action="accept") (or "dismiss") for one pending alert, confirm, or prompt

🧱 Frame / Shadow DOM (5 tools)

  • frame_list - List iframe/frame contexts without changing global frame state

  • frame_snapshot - Use frame_snapshot(frame_selector="...") or frame_index to inspect one iframe with bounded outline data

  • frame_find - Find an element inside a selected iframe

  • shadow_find - Find one element inside a shadow root exposed by the current supported DrissionPage runtime, including tested closed roots

  • shadow_find_all - Extract repeated elements from a DrissionPage-exposed shadow root

🌍 Browser Environment (6 tools)

  • browser_headers_set - Replace extra request headers and return names with redacted values; an empty object clears them

  • browser_user_agent_set - Override the user agent and optional platform, returning both the accepted and previous user agents

  • browser_cache_clear - Clear HTTP cache while preserving Cookies, localStorage, and sessionStorage

  • browser_permission_get - Query one browser permission for the current document origin without opening an OS prompt

  • browser_permission_set - Use browser_permission_set(setting="granted") (or "denied"/"prompt") for an exact origin/current Chromium context

  • browser_permissions_reset - Reset permission overrides for the current Chromium context

πŸͺ Cookies & Storage (7 tools)

  • browser_cookies_get - Read normalized cookies with values redacted by default

  • browser_cookies_set - Set up to 100 cookies in one call and return accepted metadata with redacted values

  • browser_cookies_delete - Delete one named cookie with optional URL/domain/path scope

  • browser_cookies_clear - Clear all browser cookies

  • storage_get - Read localStorage/sessionStorage by key or as a map, with values redacted unless include_values=true

  • storage_set - Set one localStorage/sessionStorage item without echoing the value

  • storage_clear - Clear one storage key or an entire storage area

πŸ§ͺ Debug / Observability (1 tool)

  • page_console_logs - Read bounded browser console messages with level filtering, cursor pagination, and limits

⏱️ Wait Operations (4 tools)

  • wait_for_element - Wait for element to appear (with timeout)

  • wait_for_url - Use wait_for_url(url_pattern="...") until the current URL contains the supplied text

  • wait_until - Use wait_until(condition="text_contains", value="...") or another documented condition/value pair

  • wait_time - Delay execution

🌐 Network Control & Observation (4 tools)

  • network_listen_start - Start bounded HTTP/XHR/Fetch observation through DrissionPage

  • network_listen_wait - Wait for bounded packet metadata with optional redacted headers or body excerpts

  • network_listen_stop - Stop observation and optionally clear queued packets

  • network_blocked_urls_set - Use network_blocked_urls_set(urls=[...]) to replace blocked URL patterns; an empty list clears them

🧩 Optional Skills Discovery

  • Resource: drissionpage://skills/catalog

  • Prompts: none

  • Repository examples: cross-origin-iframe-probe, turnstile-testing, and xiaohongshu-content-research

  • Entry point: skills/<skill-name>/SKILL.md; catalog schema v2 includes Skill/MCP versions, required tools, fixture, fixed v0.8.4 source revision, verification status, and SHA-256

  • Skills are Markdown procedures for the MCP host. They are not Python modules, are not executed by the server, and are excluded from wheel/sdist packages.

Validate a source checkout with python playground/validate_skills.py --json. Install the fixed catalog release from skills-manager@v0.8.4 with python install.py install --client codex --json or python install.py install --client claude --json.

πŸ“– Skills and Reusable Procedures

The MCP core exposes atomic browser operations. Skills provide reusable, reviewable procedures outside the server:

Example Skill

What it demonstrates

Stop boundary

cross-origin-iframe-probe

Frame discovery, cross-origin diagnosis, coordinate fallback, and outside verification

Cannot read the inner DOM of a cross-origin iframe

turnstile-testing

Cloudflare test fixtures, authorized production challenge interaction, coordinate geometry, and parent-page checks

Use the documented support matrix and verify the resulting page state

xiaohongshu-content-research

Bounded read-only note research and the deterministic social-notes fixture

Stop on robots, login, captcha, safety page, or rate limit

Read the full Skills guide before publishing a new procedure. Skills must use existing typed tools, collect fresh evidence, verify postconditions, redact secrets, and state unsupported cases. They do not add new MCP tools or override the server's navigation and safety policy. Multi-tab Skills should carry the returned MCP tab_id into later tab-scoped calls rather than relying on mutable current-tab state.


πŸ“š Documentation

Guide

Description

README.md

Installation, tools, and architecture

docs/compatibility.md

Supported Python, DrissionPage, MCP, and browser versions

docs/tool-contract.md

Public MCP tool names, inputs, annotations, and response shape

docs/troubleshooting.md

Doctor command, browser startup, and client setup fixes

CHANGELOG.md

Release notes


πŸ—οΈ Architecture

Built with clean, modular design:

DrissionMCP/
β”œβ”€β”€ drissionpage_mcp/
β”‚   β”œβ”€β”€ cli.py              # Process entry point
β”‚   β”œβ”€β”€ server.py           # MCP transport and request routing
β”‚   β”œβ”€β”€ context.py          # Browser and tab lifecycle facade
β”‚   β”œβ”€β”€ runtime.py          # Operation keys, receipts, artifacts, and capability state
β”‚   β”œβ”€β”€ tool_outputs.py     # Typed public result contracts
β”‚   β”œβ”€β”€ browser/            # Focused DrissionPage capabilities and page scripts
β”‚   └── tools/              # 69 typed MCP tool definitions and thin adapters
β”œβ”€β”€ tests/                  # Unit tests
└── playground/             # MCP Lab business-scenario playground

Key Principles:

  • βœ… Type-safe Pydantic models for all tools

  • βœ… Async/await throughout

  • βœ… Clean separation of concerns

  • βœ… Comprehensive error handling

  • βœ… Unit and protocol test coverage for core tool registration/response behavior


πŸ”§ Configuration

[mcp_servers.drissionpage]
command = "drissionpage-mcp"
startup_timeout_sec = 20
tool_timeout_sec = 60

# Optional browser/runtime environment variables:
# [mcp_servers.drissionpage.env]
# CHROME_PATH = "/custom/path/to/chrome"
# DP_HEADLESS = "1"

You can also add it with the Codex CLI:

codex mcp add drissionpage -- drissionpage-mcp

If Codex/Cursor/Claude Desktop is launched from a GUI and cannot see your shell PATH or virtualenv, use the absolute Python executable instead:

[mcp_servers.drissionpage]
command = "/absolute/path/to/python"
args = ["-m", "drissionpage_mcp.cli"]
startup_timeout_sec = 20
tool_timeout_sec = 60

JSON MCP Clients

{
  "mcpServers": {
    "drissionpage": {
      "command": "drissionpage-mcp"
    }
  }
}

Advanced JSON Setup

{
  "mcpServers": {
    "drissionpage": {
      "command": "drissionpage-mcp",
      "args": ["--log-level", "DEBUG"],
      "env": {
        "CHROME_PATH": "/custom/path/to/chrome"
      }
    }
  }
}

Absolute-Python fallback for GUI clients:

{
  "mcpServers": {
    "drissionpage": {
      "command": "/absolute/path/to/python",
      "args": ["-m", "drissionpage_mcp.cli"],
      "env": {
        "CHROME_PATH": "/custom/path/to/chrome",
        "DP_HEADLESS": "1"
      }
    }
  }
}

πŸ“‹ Requirements

  • Python 3.10+ (3.11+ recommended)

  • Chrome or Chromium browser

  • Any MCP-compatible client: Codex CLI/IDE, Claude Code, Claude Desktop, Cursor, VS Code, etc.


πŸ§ͺ Testing

Verify Installation

# Environment diagnostics; add --launch-browser for a browser startup check
drissionpage-mcp doctor
drissionpage-mcp doctor --launch-browser

# Source checkout tests
python -m pip install -e ".[dev]"
python -m pytest tests/

# Coverage report (CI enforces the current 95% floor and uploads coverage.xml)
python -m pytest tests/ --cov=drissionpage_mcp --cov-report=term-missing --cov-report=xml

# Browser-backed MCP Lab scenario checks
DP_HEADLESS=1 python playground/run_mcp_lab.py --all --json

GitHub Actions runs lint, unit, protocol, package, browser integration, and coverage jobs. Codecov is configured through codecov.yml and the CI workflow.

Try It Out

# No-browser MCP registry check
python playground/run_mcp_lab.py --case registry

# Local deterministic site check
python playground/run_mcp_lab.py --case site

# Browser-backed form inspection scenario
DP_HEADLESS=1 python playground/run_mcp_lab.py --case form-inspect

πŸš€ Use Cases

βœ… Automated Testing - Test web applications βœ… Data Scraping - Extract structured data from websites βœ… Form Automation - Fill and submit forms βœ… Monitoring - Check for updates or changes βœ… Screenshot Verification - Capture and verify page state βœ… Content Analysis - Analyze web content programmatically


πŸ› Troubleshooting

Tools Not Loading?

drissionpage-mcp --version

Should output the installed package version, for example drissionpage-mcp 0.9.0.

drissionpage-mcp doctor must also report both mcp_supported and mcp_server_wiring as ok; package-version output alone does not prove that an MCP client can initialize the server.

Browser Issues?

# Check browser installation
which google-chrome    # Linux
which chromium         # macOS

Codex / MCP Client Not Finding Server?

  • Codex: run codex mcp list; in the TUI, run /mcp

  • JSON clients: verify config file path and JSON syntax

  • Restart Codex or your MCP client after changes

  • Check logs: drissionpage-mcp --log-level DEBUG

See docs/troubleshooting.md for the complete troubleshooting guide.


πŸ“Š Project Status

Component

Status

Core Features

βœ… Complete

Testing

βœ… Strict unit/protocol/schema checks plus browser-backed scenarios

Documentation

βœ… Setup, compatibility, troubleshooting, and public tool contracts

Package

βœ… PyPI metadata and build checks

Status

🟑 Beta; real browser behavior depends on local Chrome/Chromium and target sites

Version: 0.9.0 development candidate | License: Apache 2.0 | Maintained: βœ… Active


πŸ—ΊοΈ Roadmap

Current candidate (v0.9.0)

  • 69 atomic navigation, tab/frame/shadow, accessibility, observation, interaction, browser-environment, network, Cookie/storage, wait, and console tools, all loaded by default

  • stdio MCP server integration

  • Doctor diagnostics for local setup

  • Stable JSON mirror, structuredContent, and typed per-tool MCP outputSchema

  • Structured recovery hints in error.details.hints for common failures

  • Sanitized browser failures with DIALOG_PENDING/DIALOG_NOT_FOUND recovery and strict standards-compliant JSON for non-finite JavaScript values

  • Balanced page_snapshot output so link-heavy pages still expose controls and forms

  • Optional case-insensitive literal page_snapshot(query=...) search with bounded, replayable continuation cursors tied to one tab and document generation

  • Atomic type, select, check, click, keyboard, upload, wait, and state-read tools cover native controls and framework-driven widgets without library-specific branches

  • Stable optional tab_id targeting across 63 tab-scoped tools, per-tab action serialization, target isolation, and draining close/cleanup semantics

  • Tab management with tab_list, tab_switch, tab_close, and page_navigate(new_tab=true, background=..., new_window=..., new_context=...)

  • Tab-owned network listener tokens, packet cursors, timeout evidence, cancellation-safe packet recovery, and deterministic close cleanup

  • Observable actions with page_observe, page_evaluate, wait_until, and optional observe=true changes on navigation, click, and type

  • Deadline-bounded wait_until, including ready_state waits, and optional page_navigate(timeout=...) evidence for final URL/readiness and non-negative navigation, settle, and total timing

  • Console observability with page_console_logs, console summary in page_observe, and console change fields in observe=true

  • Form, component-library, challenge, and convenience workflows remain outside the MCP core

  • Repository example Skills for cross-origin iframes, authorized Turnstile fixtures, and bounded Xiaohongshu-like research are discoverable through the static catalog and excluded from wheel/sdist packages

  • Capability-probed page_dialog_respond, additive double/context click behavior, and selector/coordinate/keyboard download correlation with safe ArtifactRef metadata

  • Secret-bearing Web Storage values require include_values=true; keyboard and keyboard-download results expose redacted metadata only

  • Per-tab download trigger locking, shared deadlines, cleanup/replay guarantees, and a 250ms fail-closed late-mission guard

  • Reproducible W01-W08 public-tool benchmark with ten isolated runs per workload, machine-readable evidence, and zero duplicate side effects

  • Network listener beta with network_listen_start, network_listen_wait, and network_listen_stop for HTTP/XHR/Fetch observation

  • Public-response redaction for URLs, credentials, headers, Cookies, network bodies, errors, receipts, and text mirrors; listener waits are isolated from unrelated browser actions

  • Browser-only request environment control with redacted header, user-agent, and blocked-URL write results plus cache-only clearing that preserves Cookies and Web Storage

  • direct and deterministic bounded natural profiles for page_pointer_move, page_pointer_drag, and page_click_xy, with exact endpoints and failure-safe release

  • Optional bounded page_pointer_drag.waypoints for one held multi-segment canvas, map, box-selection, or visual-editor gesture

  • File upload, scrolling, hover, select/check, keyboard, iframe, shadow DOM, cookie, and storage tools for DrissionPage 4.x

  • Pure browser Cookie set/get/delete/clear flow, including bounded batch writes whose successful results retain metadata with redacted values

  • Ten-cycle controlled and validation input replacement through native DrissionPage input on the supported browser matrix

  • Cross-origin OOPIF reads through frame_* and closed Shadow DOM lookup through DrissionPage-backed shadow_*, with narrower pointer targeting documented separately

  • Frame boundary/document-access classification plus outer presentation, top-level viewport coordinate, scroll receipt, and coordinate-actionability evidence for production challenge workflows

  • Local challenge-surface and opt-in official Turnstile test-key benchmarks with parent-page postconditions, screenshots, and token-safe evidence

  • Backward-compatible string or structured selector/accessibility targets across element reads, actions, waits, uploads, and click-download correlation, resolving ordered frames first and then ordered Shadow DOM hosts

  • Bounded accessibility snapshots, non-handling native dialog observation, and live element state/geometry for autonomous locate-act-verify loops

  • Browser permission observation/set/reset, managed PDF/MHTML artifacts, automatic file chooser interception, and credential-redacted HTTP auth isolated by disposable Chromium context

  • Chrome sandbox remains enabled by default; DP_NO_SANDBOX=1 is reserved for restricted container/root environments

  • No retained action history, generated code snippets, or absolute screenshot paths in public results

  • Opt-in local safety policy for navigation and screenshot paths

  • One optional-Skills catalog resource with repository example metadata, zero prompts, plus Skills, eval, compatibility, and troubleshooting documentation

  • Structured navigation policy checks before browser startup, bounded Skills compatibility, and full-CI release artifact reuse

  • Local 0.9.0 package metadata and clean-installed-package smoke coverage

  • Publish 0.9.0 to PyPI and the MCP Registry after release gates complete


πŸ“– Integration Examples

Codex CLI / IDE

[mcp_servers.drissionpage]
command = "drissionpage-mcp"
startup_timeout_sec = 20
tool_timeout_sec = 60

Verify with:

codex mcp list

Claude Code

{
  "mcpServers": {
    "drissionpage": {
      "command": "drissionpage-mcp"
    }
  }
}

Config file: ~/.config/claude-code/mcp_settings.json (macOS/Linux) or %APPDATA%\claude-code\mcp_settings.json (Windows).

Cursor

{
  "mcpServers": {
    "drissionpage": {
      "command": "drissionpage-mcp"
    }
  }
}

Config file: ~/.cursor/mcp.json (global) or .cursor/mcp.json (project). You can also add it from Cursor Settings β†’ Tools & MCPs β†’ New MCP Server.

Claude Desktop

{
  "mcpServers": {
    "drissionpage": {
      "command": "drissionpage-mcp"
    }
  }
}

Once connected, the tools load automatically:


🀝 Contributing

Contributions are welcome!

  1. Fork the repository

  2. Create a feature branch

  3. Make focused changes

  4. Run the relevant checks

  5. Submit a pull request

See CONTRIBUTING.md for setup, validation, and compatibility expectations.


πŸ”’ Security

  • Runs locally in your environment

  • Uses a local browser that may have access to authenticated sessions, cookies, downloads, and page content

  • Can open and interact with any site reachable from the local machine

  • Does not require external API credentials

Best Practices:

  • Use a dedicated browser profile for sensitive workflows

  • Review MCP client prompts before allowing actions on authenticated or production systems

  • Respect website terms of service, robots.txt, and rate limits

  • See SECURITY.md for reporting and safe-usage guidance


πŸ“„ License

Licensed under Apache License 2.0 - see LICENSE


πŸ“ˆ Statistics

Downloads PyPI Version


🌟 Show Your Support

If you find this project useful, please consider:

  • ⭐ Starring on GitHub

  • πŸ“€ Sharing with your network

  • πŸ’¬ Leaving feedback or suggestions

  • πŸ› Reporting issues to help improve


Made with ❀️ by Wukunyun

Ready to automate your workflows? Install now: python -m pip install -U drissionpage-mcp


πŸ†• Current Candidate: v0.9.0

Candidate dated 2026-10-20. This is the current local implementation, not a claim of external publication or a completed hosted multi-platform CI run:

  • Opt-in navigation allow/block URL rules use structured origin and path-boundary matching instead of raw string prefixes. Host-only rules continue to include subdomains.

  • Denied page_navigate and page_navigate_with_http_auth calls return POLICY_DENIED before initializing Chromium, creating a tab, or applying auth credentials.

  • Matching is an operator-side navigation check, not a complete network sandbox: it does not constrain redirects, page scripts, iframes, DNS rebinding, or later browser requests.

  • Skills metadata accepts MCP 0.9.0 within bounded compatibility ranges while retaining schema v2, the fixed skills-manager v0.8.4 revision, and existing content hashes. Remote validation currently fails because pinned raw GitHub URLs return HTTP 404.

  • Release tags run the complete CI workflow before upload and reuse the exact SHA256-verified wheel and sdist artifacts that passed package smoke tests.

  • The public surface remains 69 tools, zero prompts, and one static Skills catalog resource. No runtime dependency or capability profile was added.

Available Tools

69 tools
browser_cache_clearClear Browser CacheA
DestructiveIdempotent

Clear HTTP cache without clearing cookies or Web Storage.

Inputs: tab_id. Returns: object

browser_cookies_clearClear Browser CookiesB
DestructiveIdempotent

Clear all cookies from the active browser context.

Inputs: tab_id. Returns: object

browser_cookies_deleteDelete Browser CookieB
DestructiveIdempotent

Delete one named browser cookie with optional URL/domain/path scope.

Inputs: name (required), url, path, domain, +1 more. Returns: object

browser_cookies_getGet Browser CookiesB
Read-onlyIdempotent

Read normalized cookies with values redacted by default.

Inputs: tab_id, all_info, all_domains, include_values. Returns: object

browser_cookies_setSet Browser CookiesA
DestructiveIdempotent

Set a bounded batch of browser cookies. Successful results preserve accepted metadata while redacting cookie values.

Inputs: cookies (required), tab_id. Returns: object

browser_headers_setSet Browser HeadersA
DestructiveIdempotent

Replace extra HTTP request headers for the current tab. Successful results return header names with values redacted; an empty object clears them.

Inputs: headers (required), tab_id. Returns: object

browser_permission_getGet Browser PermissionA
Read-onlyIdempotent

Query one browser permission state for the current document origin without opening an operating-system prompt.

Inputs: permission (required), tab_id. Returns: object

browser_permission_setSet Browser PermissionA
DestructiveIdempotent

Set one permission to granted, denied, or prompt for one bounded origin in the current Chromium context.

Inputs: setting (required), permission (required), origin, tab_id. Returns: object

browser_permissions_resetReset Browser PermissionsB
DestructiveIdempotent

Reset all Chromium permission overrides in the current browser context.

Inputs: tab_id. Returns: object

browser_user_agent_setSet Browser User AgentA
DestructiveIdempotent

Override the current tab user agent and optional platform, returning the previous user agent so callers can restore it.

Inputs: user_agent (required), tab_id, platform. Returns: object

element_checkCheck ElementC
Destructive

Set a checkbox or radio element to checked/unchecked.

Inputs: selector (required), by_js, tab_id, checked, +1 more. Returns: object

element_clickClick ElementB
Destructive

Click an element found by CSS selector or XPath. Bare selectors are treated as CSS; use text:... for text matching.

Inputs: selector (required), button, tab_id, observe, +2 more. Returns: object

element_click_and_downloadClick And DownloadB
Destructive

Perform one selector, coordinate, or keyboard trigger, await one completed download, and return an integrity-checked safe artifact receipt.

Inputs: selector (required), tab_id, timeout, operation_key, +2 more. Returns: object

element_click_and_uploadClick And UploadB
Destructive

Arm Chromium's file chooser, click one trigger, inject approved files, and always remove interception without opening a native operating-system picker.

Inputs: paths (required), selector (required), tab_id, timeout. Returns: object

element_findFind ElementB
Read-onlyIdempotent

Find an element on the page using CSS selector or XPath. Bare selectors are treated as CSS; use text:... for text matching.

Inputs: selector (required), tab_id, timeout. Returns: object

element_find_allFind All ElementsA
Read-onlyIdempotent

Find multiple matching elements with bounded text/attribute summaries and recommended selectors for repeated lists, cards, and tables.

Inputs: selector (required), limit, tab_id, include_html. Returns: object

element_get_attributeGet AttributeC
Read-onlyIdempotent

Get an attribute value from an element

Inputs: selector (required), attribute (required), tab_id. Returns: object

element_get_htmlGet HTMLB
Read-onlyIdempotent

Get HTML from an element or the whole page

Inputs: tab_id, selector. Returns: object

element_get_propertyGet PropertyA
Read-onlyIdempotent

Get a live DOM property value from an element, such as an input's current value

Inputs: property (required), selector (required), tab_id. Returns: object

element_get_textGet TextC
Read-onlyIdempotent

Get text from an element or the whole page

Inputs: tab_id, selector. Returns: object

element_hoverHover ElementC
Destructive

Move the mouse over an element.

Inputs: selector (required), tab_id, timeout, offset_x, +1 more. Returns: object

element_scroll_into_viewScroll Element Into ViewB
Destructive

Scroll an element into the viewport before a later action.

Inputs: selector (required), center, tab_id, timeout. Returns: object

element_selectSelect Element OptionC
Destructive

Select an option from a select element by value, text, or index.

Inputs: value (required), selector (required), by, tab_id, +1 more. Returns: object

element_state_getGet Element StateB
Read-onlyIdempotent

Return DrissionPage element state and page/viewport geometry for a selector or accessibility target.

Inputs: selector (required), tab_id, timeout. Returns: object

element_typeType TextC
Destructive

Type text into an input element

Inputs: text (required), selector (required), clear, tab_id, +2 more. Returns: object

element_upload_fileUpload FileB
Destructive

Set files on an input[type=file]. Paths must exist under DP_MCP_UPLOAD_ROOT and response data only returns safe file names.

Inputs: paths (required), selector (required), tab_id, timeout. Returns: object

frame_findFind Element In FrameB
Read-onlyIdempotent

Find an element inside a selected iframe/frame without global frame state.

Inputs: selector (required), tab_id, timeout, frame_index, +1 more. Returns: object

frame_listList FramesB
Read-onlyIdempotent

List iframe/frame contexts on the current page without changing global state.

Inputs: limit, tab_id. Returns: object

frame_snapshotFrame SnapshotC
Read-onlyIdempotent

Return a bounded page outline from a selected iframe/frame.

Inputs: tab_id, timeout, frame_index, include_html, +3 more. Returns: object

keyboard_pressKeyboard PressB
Destructive

Send keyboard text/keys to the active page element without echoing the input in the result.

Inputs: keys (required), tab_id, interval. Returns: object

network_blocked_urls_setSet Blocked URLsB
DestructiveIdempotent

Replace URL patterns blocked for the current tab. Successful results echo patterns; an empty list clears them.

Inputs: urls (required), tab_id. Returns: object

network_listen_startStart Network ListenerA
Destructive

Start beta HTTP/XHR/Fetch network observation for the active tab. This observes packets only; it does not intercept or modify requests.

Inputs: clear, method, tab_id, targets, +2 more. Returns: object

network_listen_stopStop Network ListenerA
Destructive

Stop beta network observation for the active tab and optionally clear it.

Inputs: clear, tab_id, listener_token. Returns: object

network_listen_waitWait Network ListenerA
Read-only

Wait for observed HTTP/XHR/Fetch packets and return bounded metadata. Bodies and headers are opt-in and sensitive headers are redacted.

Inputs: limit, tab_id, timeout, include_body, +3 more. Returns: object

page_accessibility_snapshotAccessibility SnapshotB
Read-onlyIdempotent

Return a bounded Chromium accessibility tree for the page or a scoped selector/frame/shadow target.

Inputs: scope, tab_id, max_nodes, include_values, +1 more. Returns: object

page_click_xyClick CoordinatesB
Destructive

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.

Inputs: x (required), y (required), button, tab_id, +3 more. Returns: object

page_closeClose BrowserC
Destructive

Close the current page/browser

Inputs: no named parameters. Returns: object

page_console_logsConsole LogsB
Read-onlyIdempotent

Read bounded browser console messages from the current tab. Supports level filtering, cursor pagination, and a maximum result limit.

Inputs: level, limit, since, tab_id. Returns: object

page_dialog_observeObserve Page DialogA
Read-onlyIdempotent

Observe a pending native alert, confirm, or prompt and return its bounded message without handling it.

Inputs: tab_id, timeout, max_message_chars. Returns: object

page_dialog_respondRespond To DialogA
Destructive

Accept or dismiss one pending alert, confirm, or prompt through a capability-probed native DrissionPage dialog path.

Inputs: action (required), tab_id, timeout, prompt_text. Returns: object

page_evaluateEvaluate JavaScriptA
Destructive

Run a bounded JavaScript function body in the current page and return a JSON-safe result. This can mutate the page.

Inputs: script (required), args, tab_id, max_chars. Returns: object

page_export_artifactExport Page ArtifactC
Destructive

Generate one PDF or MHTML file under DP_MCP_ARTIFACT_ROOT and return checksum, safe relative path, and exact-once receipt evidence.

Inputs: format (required), scale, tab_id, filename, +11 more. Returns: object

page_get_urlGet Current URLA
Read-onlyIdempotent

Get the current URL of the page

Inputs: tab_id. Returns: object

page_go_backGo BackC
Destructive

Go back to the previous page in browser history

Inputs: tab_id. Returns: object

page_go_forwardGo ForwardB
Destructive

Go forward to the next page in browser history

Inputs: tab_id. Returns: object

page_observeObserve PageB
Read-onlyIdempotent

Return a compact current-page fingerprint with URL, title, ready state, element counts, visible text samples, active element, and recent console summary.

Inputs: tab_id, max_texts, max_text_chars. Returns: object

page_pointer_dragDrag Pointer Between CoordinatesA
Destructive

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.

Inputs: end_x (required), end_y (required), start_x (required), start_y (required), +5 more. Returns: object

page_pointer_drag_elementDrag Element to Structured DestinationA
Destructive

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.

Inputs: source (required), destination (required), button, tab_id, +1 more. Returns: object

page_pointer_moveMove Pointer to CoordinatesA
Destructive

Move the viewport pointer to exact CSS pixel coordinates without pressing a button, using either one direct move or a bounded natural trajectory.

Inputs: x (required), y (required), tab_id, element, +1 more. Returns: object

page_refreshRefresh PageC
Destructive

Refresh the current page

Inputs: tab_id. Returns: object

page_resizeResize WindowC
Destructive

Resize the browser window to specified dimensions

Inputs: width (required), height (required), tab_id. Returns: object

page_screenshotTake ScreenshotB
Read-onlyIdempotent

Take an inline screenshot of the current page

Inputs: tab_id, full_page. Returns: object

page_screenshot_saveSave ScreenshotB
Destructive

Save a screenshot to a local path under DP_MCP_SCREENSHOT_ROOT

Inputs: path (required), tab_id, full_page. Returns: object

page_scrollScroll PageC
Destructive

Scroll the current page by direction or to a position.

Inputs: x, y, pixels, tab_id, +1 more. Returns: object

page_snapshotPage SnapshotB
Read-onlyIdempotent

Return a bounded page outline with text excerpt, headings, links, buttons, inputs, forms, and recommended selectors.

Inputs: tab_id, include_html, max_elements, max_text_chars. Returns: object

shadow_findFind Shadow ElementB
Read-onlyIdempotent

Find one element inside a shadow root exposed by the supported DrissionPage runtime.

Inputs: selector (required), host_selector (required), tab_id, timeout. Returns: object

shadow_find_allFind Shadow ElementsC
Read-onlyIdempotent

Find repeated elements inside a shadow root exposed by the supported DrissionPage runtime.

Inputs: selector (required), host_selector (required), limit, tab_id, +1 more. Returns: object

storage_clearClear Web StorageA
Destructive

Clear one key or all items from localStorage/sessionStorage.

Inputs: key, area, tab_id. Returns: object

storage_getGet Web StorageA
Read-onlyIdempotent

Read localStorage or sessionStorage by key or as a bounded map, with values redacted unless explicitly requested.

Inputs: key, area, tab_id, include_values. Returns: object

storage_setSet Web StorageA
Destructive

Set one localStorage/sessionStorage item. The value is not echoed.

Inputs: key (required), value (required), area, tab_id. Returns: object

tab_closeClose TabA
Destructive

Close a browser tab by id from tab_list without closing the whole browser.

Inputs: tab_id (required). Returns: object

tab_listList TabsA
Read-onlyIdempotent

List browser tabs tracked by the current DrissionPage MCP session.

Inputs: no named parameters. Returns: object

tab_switchSwitch TabA
Destructive

Switch the active browser tab by id from tab_list.

Inputs: tab_id (required). Returns: object

wait_for_elementWait for ElementB
Read-onlyIdempotent

Wait for an element to appear on the page. Bare selectors are treated as CSS; use text:... for text matching.

Inputs: selector (required), tab_id, timeout. Returns: object

wait_for_urlWait for URLB
Read-onlyIdempotent

Wait for the current URL to contain a substring

Inputs: url_pattern (required), tab_id, timeout. Returns: object

wait_timeWait TimeB
Read-onlyIdempotent

Wait for a specific amount of time

Inputs: seconds (required). Returns: object

wait_untilWait UntilB
Read-onlyIdempotent

Wait for observable page state: element present/visible/hidden/detached/clickable/stable, text contains/matches, or URL contains/matches.

Inputs: condition (required), name, value, tab_id, +4 more. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.9/5.0

    Scored across 69 tools

    Disambiguation3/5

    Many tools have overlapping purposes, such as page_screenshot/page_screenshot_save/page_export_artifact, multiple snapshot variants (page_snapshot, page_accessibility_snapshot, page_observe, frame_snapshot), click variants (element_click, page_click_xy, element_click_and_download, element_click_and_upload), and wait_for_element vs wait_until. Descriptions are detailed enough to differentiate most cases, but the large number of similar granular tools creates real misselection risk.

    Naming Consistency4/5

    All names use snake_case with clear prefix-based grouping (page_, element_, browser_, frame_, shadow_, storage_, wait_, network_, tab_). There are minor ordering deviations: some tools put the action immediately after the prefix (page_get_url, element_get_text) while others put the resource first (browser_headers_set, browser_cookies_get), but the pattern remains largely predictable.

    Tool Count1/5

    With 69 tools, the count is far beyond the typical 3-15 range and crosses the rubric's threshold for extreme mismatch (50+ tools). Many operations could be consolidated (e.g., pointer move/drag/click_xy, multiple snapshot variants), making the surface unnecessarily heavy for agent use.

    Completeness4/5

    The tool surface is exceptionally comprehensive, covering navigation, interactions, element queries, cookies, storage, network observation, dialogs, frames, shadow DOM, uploads/downloads, permissions, headers, and tab management. Minor gaps remain, such as dedicated double-click/right-click element actions, element-level screenshots, and explicit browser context creation/teardown beyond the HTTP auth path.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      An MCP server providing robust browser automation tools for AI assistants, including page navigation, element interaction, and screenshot capabilities. It leverages the DrissionPage library to enable standardized DOM analysis, network monitoring, and complex web task automation.
      17
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      A comprehensive browser automation MCP server providing 149 tools across 13 capability tiers, enabling LLMs to control Chrome/Edge via CDP or BiDi protocols with features like navigation, screenshots, network interception, and more.
      72
      64 PyPI
      3
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      A browser automation MCP server with stealth mode, profile management, and multi-browser support, enabling LLMs to control browsers for tasks like navigation, data extraction, and form filling.
      1
      MIT