The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the DrissionPage MCP listing page.
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
DrissionPage MCP 0.8.8 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.
direct emits one exact move; natural emits a deterministic 24-step eased cubic path with reproducible 8-14ms intervals and exact final arrival.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.
Designed for authorized browser automation, testing, accessibility workflows, and technical research. The core does not provide challenge-specific or site-specific workflows.
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.8.8 keeps that registry stable while adding correlated network-listener generations, explicit packet cursors, timeout evidence, cancellation recovery, and tab-owned cleanup. 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.
pip install + Codex TOML or MCP JSON configurationDrissionPage MCP is backed by a strict regression suite and browser-backed scenario checks:
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.
Codex supports local stdio MCP servers through config.toml; the CLI and IDE extension share the same MCP configuration.
Edit Codex configuration:
~/.codex/config.toml.codex/config.toml inside a trusted projectAdd this configuration:
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.
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.
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 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 pagetab_list - List open browser tabs with stable MCP tab IDstab_switch - Switch to a tab returned by tab_listtab_close - Reject new work, drain in-flight actions, then close one tab without closing the whole browserelement_find - Find one element by CSS selector or XPath; bare selectors like h1 are 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 under DP_MCP_DOWNLOAD_ROOTelement_type - Input text into elementselement_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 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 elementpage_screenshot - Capture an inline full-page or viewport screenshotpage_screenshot_save - Save a screenshot under DP_MCP_SCREENSHOT_ROOTpage_export_artifact - Generate a managed PDF or MHTML artifact under DP_MCP_ARTIFACT_ROOT with 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 - Use page_scroll(pixels=...) for relative scrolling, or pass x/y for 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 with direct or bounded deterministic natural motionpage_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 with direct or natural motion, 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 - Use page_dialog_respond(action="accept") (or "dismiss") for one pending alert, confirm, or promptframe_list - List iframe/frame contexts without changing global frame stateframe_snapshot - Use frame_snapshot(frame_selector="...") or frame_index to 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 rootbrowser_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 - Use browser_permission_set(setting="granted") (or "denied"/"prompt") for an exact origin/current Chromium contextbrowser_permissions_reset - Reset permission overrides for the current Chromium contextbrowser_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 unless include_values=truestorage_set - Set one localStorage/sessionStorage item without echoing the valuestorage_clear - Clear one storage key or an entire storage areapage_console_logs - Read bounded browser console messages with level filtering, cursor pagination, and limitswait_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 textwait_until - Use wait_until(condition="text_contains", value="...") or another documented condition/value pairwait_time - Delay executionnetwork_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 - Use network_blocked_urls_set(urls=[...]) to replace blocked URL patterns; an empty list clears themdrissionpage://skills/catalogcross-origin-iframe-probe, turnstile-testing, and xiaohongshu-content-researchskills/<skill-name>/SKILL.md; catalog schema v2 includes Skill/MCP versions, required tools, fixture, fixed v0.8.4 source revision, verification status, and SHA-256Validate 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.
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.
| 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 |
Built with clean, modular design:
Key Principles:
You can also add it with the Codex CLI:
If Codex/Cursor/Claude Desktop is launched from a GUI and cannot see your shell
PATH or virtualenv, use the absolute Python executable instead:
Absolute-Python fallback for GUI clients:
GitHub Actions runs lint, unit, protocol, package, browser integration, and
coverage jobs. Codecov is configured through codecov.yml and the CI workflow.
✅ 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
Should output the installed package version, for example drissionpage-mcp 0.8.8.
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.
codex mcp list; in the TUI, run /mcpdrissionpage-mcp --log-level DEBUGSee docs/troubleshooting.md for the complete troubleshooting guide.
| 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.8.8 | License: Apache 2.0 | Maintained: ✅ Active
structuredContent, and typed per-tool MCP outputSchemaerror.details.hints for common failuresDIALOG_PENDING/DIALOG_NOT_FOUND recovery and strict standards-compliant JSON for non-finite JavaScript valuespage_snapshot output so link-heavy pages still expose controls and formstab_id targeting across 63 tab-scoped tools, per-tab action serialization, cross-tab parallelism, and draining close/cleanup semanticstab_list, tab_switch, tab_close, and page_navigate(new_tab=true, background=..., new_window=..., new_context=...)page_observe, page_evaluate, wait_until, and optional observe=true changes on navigation, click, and typepage_console_logs, console summary in page_observe, and console change fields in observe=truepage_dialog_respond, additive double/context click behavior, and selector/coordinate/keyboard download correlation with safe ArtifactRef metadatainclude_values=true; keyboard and keyboard-download results expose redacted metadata onlynetwork_listen_start, network_listen_wait, and network_listen_stop for HTTP/XHR/Fetch observationdirect and deterministic bounded natural profiles for page_pointer_move, page_pointer_drag, and page_click_xy, with exact endpoints and failure-safe releasepage_pointer_drag.waypoints for one held multi-segment canvas, map, box-selection, or visual-editor gestureframe_* and closed Shadow DOM lookup through DrissionPage-backed shadow_*, with narrower pointer targeting documented separatelyDP_NO_SANDBOX=1 is reserved for restricted container/root environmentsVerify with:
Config file: ~/.config/claude-code/mcp_settings.json (macOS/Linux) or
%APPDATA%\claude-code\mcp_settings.json (Windows).
Config file: ~/.cursor/mcp.json (global) or .cursor/mcp.json (project). You
can also add it from Cursor Settings → Tools & MCPs → New MCP Server.
Once connected, the tools load automatically:
Contributions are welcome!
See CONTRIBUTING.md for setup, validation, and compatibility expectations.
Best Practices:
Licensed under Apache License 2.0 - see LICENSE
If you find this project useful, please consider:
Made with ❤️ by Wukunyun
Ready to automate your workflows? Install now: python -m pip install -U drissionpage-mcp
Released on 2026-09-08. This release keeps the 69-tool registry while making network listener lifetimes explicit and recoverable:
network_listen_start returns a new listener_token, lifecycle state, packet cursor, and startup timing for each listener generation.network_listen_wait accepts the token and reports cumulative consumption, monotonic packet indices, elapsed time, explicit timeout status, and remaining timeout budget.network_listen_stop rejects stale tokens with LISTENER_NOT_FOUND, preventing an old task from stopping a replacement listener on the same tab.