Skip to main content

pydoll-browser-mcp

An MCP server for browser automation built on pydoll (real Chrome/Edge over CDP) with:

  • multi-context and multi-tab control,
  • per-context proxies (isolated cookies/storage per identity),
  • a large tool surface covering navigation, elements, network, storage, devtools, stealth, HTTP-via-browser and a raw cdp_send escape hatch.

Note: the PyPI distribution is pydoll-browser-mcp (the older pydoll-mcp name belongs to an unrelated project). The Python import package is pydoll_mcp.

Install / run (no project files needed)

Once published, run it straight from PyPI with uv:

uvx pydoll-browser-mcp

or with pipx:

pipx run pydoll-browser-mcp

Both download the server + dependencies into an isolated environment and run it over stdio, so nothing is added to the user's project directory. To install it permanently:

uv tool install pydoll-browser-mcp     # or: pipx install pydoll-browser-mcp

Development install (this repo)

python -m venv .venv
.venv\Scripts\python -m pip install -e .
.venv\Scripts\python -m pydoll_mcp.server

opencode config

Published (isolated, no project files):

{
  "mcp": {
    "pydoll": {
      "type": "local",
      "command": ["uvx", "pydoll-browser-mcp"],
      "enabled": true
    }
  }
}

Local checkout / venv:

{
  "mcp": {
    "pydoll": {
      "type": "local",
      "command": ["C:\\path\\to\\pydoll-mcp\\.venv\\Scripts\\python.exe", "-m", "pydoll_mcp.server"],
      "environment": { "PYDOLL_MCP_PROFILE": "full", "PYDOLL_MCP_HEADLESS": "true" },
      "enabled": true
    }
  }
}

Profiles

PYDOLL_MCP_PROFILE selects the default tool set: core, balanced (default) or full. balanced = core + network + storage + meta. full also enables input, stealth, devtools, http.

Configuration (environment)

Variable Default Purpose
PYDOLL_MCP_BROWSER chrome chrome or edge
PYDOLL_MCP_HEADLESS true headless new mode
PYDOLL_MCP_PROFILE balanced tool profile
PYDOLL_MCP_EXECUTABLE_PATH explicit browser binary
PYDOLL_MCP_USER_DATA_DIR persistent profile dir
PYDOLL_MCP_OUTPUT_DIR ~/.pydoll-mcp/output screenshots/PDFs/downloads
PYDOLL_MCP_SCRIPT_TIMEOUT 30 seconds a script may run before the tab call is aborted (0 = unlimited)
PYDOLL_MCP_MAX_RESULT_BYTES 2000000 max size of a tool result before it is truncated (0 = unlimited)
PYDOLL_MCP_MAX_TABS 25 max tabs per browser (0 = unlimited)
PYDOLL_MCP_MAX_CONTEXTS 10 max contexts per browser (0 = unlimited)
PYDOLL_MCP_ALLOW_JS true enable tab_execute_script
PYDOLL_MCP_ALLOW_CDP true enable cdp_send
PYDOLL_MCP_ALLOW_FILE_ACCESS true allow file inputs/PDF output
PYDOLL_MCP_ALLOW_UNRESTRICTED_FILE_ACCESS false disable the file jail
PYDOLL_MCP_FILE_ROOTS output dir + cwd comma-separated allowed roots

Proxies

context_create(proxy_server="host:port:user:password") gives that context its own egress IP. context_create(proxy_server="http://user:pass@host:port") and socks5://host:port also work. Use proxy_test(proxy_server=...) to verify the egress IP before a run. Note: Chrome does not support authenticated SOCKS5; use an unauthenticated local forwarder for that case.

Session persistence

Use context_storage_state_export / context_storage_state_import to move cookies + localStorage between runs or machines. (Chrome profile-dir persistence is unreliable because pydoll force-stops the process after Browser.close.)

Resilience

Each tab is locked independently, so a hung script or renderer on one tab no longer blocks other tabs or browsers. Scripts are aborted after PYDOLL_MCP_SCRIPT_TIMEOUT seconds (Chrome terminates them first when it can) and oversized results are truncated. tab_info reports alive plus an unresponsive_reason when a tab stops responding, browser_status lists dead_tabs whose CDP connection dropped, and closing a stuck tab (tab_close) always works.

Development

python -m venv .venv
.venv\Scripts\python -m pip install -e ".[dev]"

Test harnesses (require Chrome; some hit the network / use proxies):

.venv\Scripts\python tests\live_check.py    # every tool category, local fixture
.venv\Scripts\python tests\deep_check.py    # 155 checks, asserts 100% tool coverage
.venv\Scripts\python tests\ultra_check.py   # multi-browser, isolated contexts, persistence, stress
.venv\Scripts\python tests\stdio_check.py   # real MCP stdio handshake
.venv\Scripts\python tests\proxy_check.py   # per-context proxy egress

Publishing

python -m pip install build twine
python -m build
twine check dist/*
twine upload dist/*          # prompts for a PyPI API token (username: __token__)

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pydoll_browser_mcp-0.2.0.tar.gz (33.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pydoll_browser_mcp-0.2.0-py3-none-any.whl (41.4 kB view details)

Uploaded Python 3

File details

Details for the file pydoll_browser_mcp-0.2.0.tar.gz.

File metadata

  • Download URL: pydoll_browser_mcp-0.2.0.tar.gz
  • Upload date:
  • Size: 33.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.10

File hashes

Hashes for pydoll_browser_mcp-0.2.0.tar.gz
Algorithm Hash digest
SHA256 48ad9964faf95e868e390aefff2c24eaa01604b9ba0d3735d300ec63f0b2fb44
MD5 7522d0eb8f321025e2c457900281ce20
BLAKE2b-256 ce414fd3e1fc24ca8a158e4758a769d6ebce18612094fa5947abe52ace3d7897

See more details on using hashes here.

File details

Details for the file pydoll_browser_mcp-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pydoll_browser_mcp-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c15d0a064d7bf3bfdb437a923ae7ca1456849db87de856642de15710e9f9baaf
MD5 309a20d3617266588357389e284b9f29
BLAKE2b-256 33959bbcd71b5b1e4310f4574ee852d26bbe1adbc1e5eccb5cd561ced1bc9316

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page