DrissionPage MCP Server
DrissionPage MCP Server provides typed MCP browser automation tools for observing and controlling a local Chromium browser.
Navigate, refresh, go back/forward, and manage tabs/windows.
Capture screenshots, page snapshots, accessibility trees, PDF/MHTML artifacts, console logs, and JavaScript evaluation results.
Find, click, type, hover, select, check, upload files to, scroll to, and read text/attributes/properties/HTML/state from DOM or accessibility targets.
Move/click/drag by viewport coordinates with direct or deterministic natural pointer motion.
Work with iframes and shadow DOM elements.
Handle native dialogs and send keyboard input.
Control browser environment: headers, user agent, cache, permissions, cookies, and localStorage/sessionStorage.
Observe or block network requests and wait for elements, URLs, text, and page states.
Return structured success/error data with validation, receipts, and redaction for sensitive values.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@DrissionPage MCP Server Go to news.ycombinator.com and extract the top 10 headlines"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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.

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 stateCore interaction guarantees
Two bounded profiles:
directemits one exact move;naturalemits 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 doctorThe 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.
Edit Codex configuration:
User-level:
~/.codex/config.tomlProject-level:
.codex/config.tomlinside a trusted project
Add this configuration:
[mcp_servers.drissionpage] command = "drissionpage-mcp" startup_timeout_sec = 20 tool_timeout_sec = 60Restart Codex. In the TUI, run
/mcp; from a shell, runcodex 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 existingtab_id, or combinenew_tab=truewith optionalbackground,new_window, ornew_context;observereturns a change summarypage_navigate_with_http_auth- Navigate through a scoped HTTP auth challenge in a dedicated disposable Chromium context without returning credentialspage_go_back- Navigate backward in browser historypage_go_forward- Navigate forward in browser historypage_refresh- Reload current page
ποΈ Tab Operations (3 tools)
tab_list- List open browser tabs with stable MCP tab IDstab_switch- Switch to a tab returned bytab_listtab_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 likeh1are treated as CSSelement_find_all- Extract bounded repeated elements with text, attributes, and recommended selectorselement_click- Click any element with additive left/right/middle and single/double-click semanticselement_click_and_download- Correlate one selector, coordinate, or keyboard trigger with one integrity-checked artifact underDP_MCP_DOWNLOAD_ROOTelement_type- Input text into elementselement_upload_file- Useelement_upload_file(paths=[...])to upload files fromDP_MCP_UPLOAD_ROOTtoinput[type=file]element_click_and_upload- Arm Chromium's file chooser, click its trigger, inject approved files, and clean interception without an operating-system pickerelement_scroll_into_view- Bring an element into the viewport before actingelement_hover- Hover an element to trigger menu/tooltip stateselement_select- Select an option by value, text, or indexelement_check- Check or uncheck checkbox/radio controlselement_get_text- Get element or page textelement_get_attribute- Get an HTML attributeelement_get_property- Get a live DOM property such as an input valueelement_get_html- Get element or page HTMLelement_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 screenshotpage_screenshot_save- Save a screenshot underDP_MCP_SCREENSHOT_ROOTpage_export_artifact- Generate a managed PDF or MHTML artifact underDP_MCP_ARTIFACT_ROOTwith SHA-256 and receipt evidencepage_snapshot- Return a bounded page outline with headings, links, buttons, inputs, forms, and selector recommendationspage_accessibility_snapshot- Return a bounded Chromium accessibility tree for the page or a scoped element, with field values redacted unless explicitly requestedpage_observe- Return a compact page fingerprint with URL, title, counts, visible text samples, active element, and recent console summarypage_evaluate- Run bounded JavaScript in the current page and return a JSON-safe resultpage_scroll- Usepage_scroll(pixels=...)for relative scrolling, or passx/yfor an absolute positionkeyboard_press- Send keys to the active element/page without echoing the input in resultspage_resize- Adjust browser windowpage_pointer_move- Move to exact viewport CSS coordinates withdirector bounded deterministicnaturalmotionpage_pointer_drag- Perform one failure-safe coordinate drag through up to six optional ordered waypoints with the selected profilepage_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 hostspage_click_xy- Move withdirectornaturalmotion, optionally wait for an explicit delay, then press and release at the exact targetpage_close- Close browserpage_get_url- Get current URLpage_dialog_observe- Wait for and inspect a pending native alert, confirm, or prompt without handling itpage_dialog_respond- Usepage_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 stateframe_snapshot- Useframe_snapshot(frame_selector="...")orframe_indexto inspect one iframe with bounded outline dataframe_find- Find an element inside a selected iframeshadow_find- Find one element inside a shadow root exposed by the current supported DrissionPage runtime, including tested closed rootsshadow_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 thembrowser_user_agent_set- Override the user agent and optional platform, returning both the accepted and previous user agentsbrowser_cache_clear- Clear HTTP cache while preserving Cookies, localStorage, and sessionStoragebrowser_permission_get- Query one browser permission for the current document origin without opening an OS promptbrowser_permission_set- Usebrowser_permission_set(setting="granted")(or"denied"/"prompt") for an exact origin/current Chromium contextbrowser_permissions_reset- Reset permission overrides for the current Chromium context
πͺ Cookies & Storage (7 tools)
browser_cookies_get- Read normalized cookies with values redacted by defaultbrowser_cookies_set- Set up to 100 cookies in one call and return accepted metadata with redacted valuesbrowser_cookies_delete- Delete one named cookie with optional URL/domain/path scopebrowser_cookies_clear- Clear all browser cookiesstorage_get- Read localStorage/sessionStorage by key or as a map, with values redacted unlessinclude_values=truestorage_set- Set one localStorage/sessionStorage item without echoing the valuestorage_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- Usewait_for_url(url_pattern="...")until the current URL contains the supplied textwait_until- Usewait_until(condition="text_contains", value="...")or another documented condition/value pairwait_time- Delay execution
π Network Control & Observation (4 tools)
network_listen_start- Start bounded HTTP/XHR/Fetch observation through DrissionPagenetwork_listen_wait- Wait for bounded packet metadata with optional redacted headers or body excerptsnetwork_listen_stop- Stop observation and optionally clear queued packetsnetwork_blocked_urls_set- Usenetwork_blocked_urls_set(urls=[...])to replace blocked URL patterns; an empty list clears them
π§© Optional Skills Discovery
Resource:
drissionpage://skills/catalogPrompts: none
Repository examples:
cross-origin-iframe-probe,turnstile-testing, andxiaohongshu-content-researchEntry point:
skills/<skill-name>/SKILL.md; catalog schema v2 includes Skill/MCP versions, required tools, fixture, fixedv0.8.4source revision, verification status, and SHA-256Skills 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 |
Frame discovery, cross-origin diagnosis, coordinate fallback, and outside verification | Cannot read the inner DOM of a cross-origin iframe | |
Cloudflare test fixtures, authorized production challenge interaction, coordinate geometry, and parent-page checks | Use the documented support matrix and verify the resulting page state | |
Bounded read-only note research and the deterministic | 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 |
Installation, tools, and architecture | |
Supported Python, DrissionPage, MCP, and browser versions | |
Public MCP tool names, inputs, annotations, and response shape | |
Doctor command, browser startup, and client setup fixes | |
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 playgroundKey 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
Codex CLI / IDE (Recommended)
[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-mcpIf 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 = 60JSON 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 --jsonGitHub 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 --versionShould 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 # macOSCodex / MCP Client Not Finding Server?
Codex: run
codex mcp list; in the TUI, run/mcpJSON 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 MCPoutputSchemaStructured recovery hints in
error.details.hintsfor common failuresSanitized browser failures with
DIALOG_PENDING/DIALOG_NOT_FOUNDrecovery and strict standards-compliant JSON for non-finite JavaScript valuesBalanced
page_snapshotoutput so link-heavy pages still expose controls and formsOptional case-insensitive literal
page_snapshot(query=...)search with bounded, replayable continuation cursors tied to one tab and document generationAtomic 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_idtargeting across 63 tab-scoped tools, per-tab action serialization, target isolation, and draining close/cleanup semanticsTab management with
tab_list,tab_switch,tab_close, andpage_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 optionalobserve=truechanges on navigation, click, and typeDeadline-bounded
wait_until, includingready_statewaits, and optionalpage_navigate(timeout=...)evidence for final URL/readiness and non-negative navigation, settle, and total timingConsole observability with
page_console_logs, console summary inpage_observe, and console change fields inobserve=trueForm, 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 safeArtifactRefmetadataSecret-bearing Web Storage values require
include_values=true; keyboard and keyboard-download results expose redacted metadata onlyPer-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, andnetwork_listen_stopfor HTTP/XHR/Fetch observationPublic-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
directand deterministic boundednaturalprofiles forpage_pointer_move,page_pointer_drag, andpage_click_xy, with exact endpoints and failure-safe releaseOptional bounded
page_pointer_drag.waypointsfor one held multi-segment canvas, map, box-selection, or visual-editor gestureFile 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-backedshadow_*, with narrower pointer targeting documented separatelyFrame 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=1is reserved for restricted container/root environmentsNo 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 = 60Verify with:
codex mcp listClaude 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!
Fork the repository
Create a feature branch
Make focused changes
Run the relevant checks
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
π 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_navigateandpage_navigate_with_http_authcalls returnPOLICY_DENIEDbefore 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-managerv0.8.4revision, 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 toolsbrowser_cache_clearClear Browser CacheADestructiveIdempotent
Clear HTTP cache without clearing cookies or Web Storage.
Inputs: tab_id. Returns: object
browser_cookies_clearClear Browser CookiesBDestructiveIdempotent
Clear all cookies from the active browser context.
Inputs: tab_id. Returns: object
browser_cookies_deleteDelete Browser CookieBDestructiveIdempotent
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 CookiesBRead-onlyIdempotent
Read normalized cookies with values redacted by default.
Inputs: tab_id, all_info, all_domains, include_values. Returns: object
browser_cookies_setSet Browser CookiesADestructiveIdempotent
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 HeadersADestructiveIdempotent
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 PermissionARead-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 PermissionADestructiveIdempotent
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 PermissionsBDestructiveIdempotent
Reset all Chromium permission overrides in the current browser context.
Inputs: tab_id. Returns: object
browser_user_agent_setSet Browser User AgentADestructiveIdempotent
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 ElementCDestructive
Set a checkbox or radio element to checked/unchecked.
Inputs: selector (required), by_js, tab_id, checked, +1 more. Returns: object
element_clickClick ElementBDestructive
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 DownloadBDestructive
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 UploadBDestructive
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 ElementBRead-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 ElementsARead-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 AttributeCRead-onlyIdempotent
Get an attribute value from an element
Inputs: selector (required), attribute (required), tab_id. Returns: object
element_get_htmlGet HTMLBRead-onlyIdempotent
Get HTML from an element or the whole page
Inputs: tab_id, selector. Returns: object
element_get_propertyGet PropertyARead-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 TextCRead-onlyIdempotent
Get text from an element or the whole page
Inputs: tab_id, selector. Returns: object
element_hoverHover ElementCDestructive
Move the mouse over an element.
Inputs: selector (required), tab_id, timeout, offset_x, +1 more. Returns: object
element_scroll_into_viewScroll Element Into ViewBDestructive
Scroll an element into the viewport before a later action.
Inputs: selector (required), center, tab_id, timeout. Returns: object
element_selectSelect Element OptionCDestructive
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 StateBRead-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 TextCDestructive
Type text into an input element
Inputs: text (required), selector (required), clear, tab_id, +2 more. Returns: object
element_upload_fileUpload FileBDestructive
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 FrameBRead-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 FramesBRead-onlyIdempotent
List iframe/frame contexts on the current page without changing global state.
Inputs: limit, tab_id. Returns: object
frame_snapshotFrame SnapshotCRead-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 PressBDestructive
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 URLsBDestructiveIdempotent
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 ListenerADestructive
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 ListenerADestructive
Stop beta network observation for the active tab and optionally clear it.
Inputs: clear, tab_id, listener_token. Returns: object
network_listen_waitWait Network ListenerARead-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 SnapshotBRead-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 CoordinatesBDestructive
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 BrowserCDestructive
Close the current page/browser
Inputs: no named parameters. Returns: object
page_console_logsConsole LogsBRead-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 DialogARead-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 DialogADestructive
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 JavaScriptADestructive
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 ArtifactCDestructive
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 URLARead-onlyIdempotent
Get the current URL of the page
Inputs: tab_id. Returns: object
page_go_backGo BackCDestructive
Go back to the previous page in browser history
Inputs: tab_id. Returns: object
page_go_forwardGo ForwardBDestructive
Go forward to the next page in browser history
Inputs: tab_id. Returns: object
page_observeObserve PageBRead-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 CoordinatesADestructive
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 DestinationADestructive
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 CoordinatesADestructive
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 PageCDestructive
Refresh the current page
Inputs: tab_id. Returns: object
page_resizeResize WindowCDestructive
Resize the browser window to specified dimensions
Inputs: width (required), height (required), tab_id. Returns: object
page_screenshotTake ScreenshotBRead-onlyIdempotent
Take an inline screenshot of the current page
Inputs: tab_id, full_page. Returns: object
page_screenshot_saveSave ScreenshotBDestructive
Save a screenshot to a local path under DP_MCP_SCREENSHOT_ROOT
Inputs: path (required), tab_id, full_page. Returns: object
page_scrollScroll PageCDestructive
Scroll the current page by direction or to a position.
Inputs: x, y, pixels, tab_id, +1 more. Returns: object
page_snapshotPage SnapshotBRead-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 ElementBRead-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 ElementsCRead-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 StorageADestructive
Clear one key or all items from localStorage/sessionStorage.
Inputs: key, area, tab_id. Returns: object
storage_getGet Web StorageARead-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 StorageADestructive
Set one localStorage/sessionStorage item. The value is not echoed.
Inputs: key (required), value (required), area, tab_id. Returns: object
tab_closeClose TabADestructive
Close a browser tab by id from tab_list without closing the whole browser.
Inputs: tab_id (required). Returns: object
tab_listList TabsARead-onlyIdempotent
List browser tabs tracked by the current DrissionPage MCP session.
Inputs: no named parameters. Returns: object
tab_switchSwitch TabADestructive
Switch the active browser tab by id from tab_list.
Inputs: tab_id (required). Returns: object
wait_for_elementWait for ElementBRead-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 URLBRead-onlyIdempotent
Wait for the current URL to contain a substring
Inputs: url_pattern (required), tab_id, timeout. Returns: object
wait_timeWait TimeBRead-onlyIdempotent
Wait for a specific amount of time
Inputs: seconds (required). Returns: object
wait_untilWait UntilBRead-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
Scored across 69 tools
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.
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.
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.
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
Related MCP Connectors
Web scraping, browser automation, screenshots and AI data extraction for AI agents via MCP.
Official Browserless MCP server: browser automation, scraping, screenshots and PDFs for AI agents.
Browser automation MCP for whole web tasks in a cloud browser: saved logins, bot checks, replays.
Cloud browser, web extraction, screenshots, and remote CDP tools for AI agents.
Related MCP Servers
- AlicenseBqualityDmaintenanceAn 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.17MIT
- AlicenseAqualityBmaintenanceA 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.7264 PyPI3MIT
- AlicenseNot gradedqualityDmaintenanceA 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.1MIT
- AlicenseNot gradedqualityDmaintenanceMCP server that bridges Model Context Protocol with browser automation, offering 37 tools across three modes (Playwright, CDP, Chrome Extension) and an autonomous agent for web tasks.MIT