A comprehensive browser automation toolkit providing Chrome/Chromium control through MCP (Model Context Protocol).
# Clone to standard location
git clone https://github.com/coffeegrind123/pydoll-mcp.git ~/.pydoll-mcp
cd ~/.pydoll-mcp
# Create virtual environment and install dependencies
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
# Add to Claude Code (script auto-detects venv)
claude mcp remove pydoll-mcp && claude mcp add --scope user pydoll-mcp ~/.pydoll-mcp/pydoll-mcp# Clone to standard AppData location
git clone https://github.com/coffeegrind123/pydoll-mcp.git "$env:APPDATA\pydoll-mcp"
cd "$env:APPDATA\pydoll-mcp"
# Create virtual environment and install dependencies
python -m venv venv
.\venv\Scripts\Activate.ps1
pip install -r requirements.txtAdd to Claude Desktop:
Edit your Claude Desktop configuration file at:
%APPDATA%\Claude\claude_desktop_config.json
Add this configuration (replace C:\Users\YourUsername with your actual username):
{
"mcpServers": {
"pydoll-mcp": {
"command": "python",
"args": ["C:\\Users\\YourUsername\\AppData\\Roaming\\pydoll-mcp\\pydoll-mcp"]
}
}
}Alternative (if you know your exact path):
# Run this in PowerShell to get your exact path:
echo "$env:APPDATA\pydoll-mcp\pydoll-mcp"Then use that full path in the configuration.
Restart Claude Desktop to load the MCP server.
Note: The script automatically detects and uses the local
venvdirectory - no need to specify the venv Python path!
# Create and start browser session
mcp__pydoll-browser__create_browser_session(session_id="my-session", headless=True)
mcp__pydoll-browser__start_browser_session(session_id="my-session")
# Create tab and navigate
mcp__pydoll-browser__create_tab(browser_session_id="my-session", tab_id="tab1", url="https://example.com")
mcp__pydoll-browser__navigate(tab_id="tab1", url="https://google.com")
# Find and interact with elements
mcp__pydoll-browser__find_elements(tab_id="tab1", base_element_id="root", selector_type="css", selector_value="input")
mcp__pydoll-browser__get_element_text(element_id="element_id")
# Cleanup
mcp__pydoll-browser__close_browser_session(session_id="my-session")create_browser_session- Initialize browser with configuration optionsstart_browser_session- Start browser and create initial tabclose_browser_session- Close browser and cleanup resourceslist_sessions- View active browser and tab sessionsget_session_info- Get detailed session information
create_tab- Create new tab with optional URLclose_tab- Close specific tabbring_tab_to_front- Focus tabnavigate- Navigate to URL with wait conditionsgo_back/go_forward- Browser history navigationrefresh_page- Reload current page
find_elements- Locate elements using CSS, XPath, ID, name, tag, class selectorswait_for_element- Wait for element to appearclick_element/click_element_js- Click elementstype_text- Input text into elementsclear_text- Clear input fieldshover_element- Mouse hover actionsscroll_element- Scroll operationsdrag_and_drop- Drag and drop actions
get_element_text- Extract visible textget_element_attribute- Get HTML attributesget_element_property- Get JavaScript propertiesget_element_html- Get element HTML contentget_element_bounds- Get position and dimensionsis_element_visible/is_element_enabled/is_element_selected- State checks
get_page_title- Current page titleget_page_url- Current URLget_page_source- Complete page HTMLwait_for_page_load- Wait for page completion
execute_script- Run JavaScript in page contextexecute_script_on_element- Run JavaScript with element contextwait_for_function- Wait for JavaScript condition
take_screenshot- Capture page or element screenshotssave_pdf- Generate PDF from pageupload_file- Handle file uploadsdownload_file- Download files from URLs
enable_page_events- Monitor page load eventsenable_network_events- Track network requestsenable_runtime_events- Capture console and errorsget_network_logs- Retrieve request logs
handle_alert- Manage JavaScript dialogsset_cookies/get_cookies/delete_cookies- Cookie management
cleanup_elements- Clear cached element referenceskey_down/key_up/press_key- Keyboard actions
headless- Run without GUI (default: true)window_size- Browser dimensions (e.g., "1920,1080")user_agent- Custom user agent stringdisable_images- Block image loadingdisable_javascript- Disable JS executionproxy- Proxy server configuration
css- CSS selectorsxpath- XPath expressionsid- Element IDname- Element name attributetag- HTML tag nameclass- CSS class name
Tools return error messages for common issues:
- Invalid session/tab IDs
- Element not found
- Navigation timeouts
- Script execution failures
- Chrome/Chromium browser installed
- PyDoll MCP server running
- Appropriate system permissions for browser automation