From e323a9d851b58a99b8b55b041218f415652a9fd6 Mon Sep 17 00:00:00 2001 From: Michael Mintz Date: Thu, 17 Sep 2026 15:58:01 -0400 Subject: [PATCH 1/4] Update the MCP server --- mcp_servers/server.py | 59 +++++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 30 deletions(-) diff --git a/mcp_servers/server.py b/mcp_servers/server.py index fb61f2f323e..02814c5d858 100644 --- a/mcp_servers/server.py +++ b/mcp_servers/server.py @@ -652,6 +652,7 @@ def get_attributes( Args: selector: CSS selector or SeleniumBase-supported XPath selector. + If multiple elements match, then only the first one is used. attribute: Specific HTML attribute to retrieve. When omitted, returns all HTML attributes of the matching element as a dictionary. @@ -1057,6 +1058,8 @@ def select_option( ) -> str: """Select an option from an HTML element. @@ -1445,8 +1448,11 @@ def manage_cookies( Notes: Loading saved cookies does not guarantee restoration of a login. Cookies may be expired, invalidated, domain/path restricted, or - dependent on other browser state. Navigate to the relevant site when - necessary so the browser has the appropriate origin for the cookies. + dependent on other browser state. + + When not to use: + - Do not use this tool to load cookies if the cookie origin does + not match the origin of the current page. """ sb = _get_sb() @@ -1800,45 +1806,38 @@ def manage_tabs( annotations=ToolAnnotations( read_only_hint=False, destructive_hint=False, - idempotent_hint=False, # A 2nd attempt on an already-handled or - # rotated CAPTCHA widget isn't guaranteed to be a no-op. + idempotent_hint=False, # Re-attempting an already-handled or + # rotated CAPTCHA is not a no-op. open_world_hint=True, # Interacts with a 3rd-party CAPTCHA widget. ), ) @handle_sb_errors def solve_captcha() -> str: - """Perform a SeleniumBase CDP-based CAPTCHA interaction, such as clicking - a CAPTCHA checkbox, or performing a drag/drop action on a slider CAPTCHA. + """Attempts a SeleniumBase CDP interaction (click or drag/drop) to solve + detectable CAPTCHAs on the current page. - Supported CAPTCHAs include: Cloudflare Turnstile, reCAPTCHA, hCaptcha, - DataDome Slider, and FriendlyCaptcha. + Supported CAPTCHAs: + - CF Turnstile, reCAPTCHA, hCaptcha, DataDome Slider, FriendlyCaptcha - This tool automatically detects the location of CAPTCHA checkboxes - for the click action. If none of the supported CAPTCHAs are detected - on the current page, then no click action is attempted. + Tool workflow: + 1. Inspect page structure (e.g., via `get_content`) to verify that a + CAPTCHA is present. + 2. Call `solve_captcha` if there's a CAPTCHA. (No-op if no CAPTCHA.) + 3. Verify success via `get_page_info`, `get_content`, or `manage_cookies`. - The tool does not guarantee that the CAPTCHA gets solved. Some CAPTCHA - controls are embedded inside shadow DOM or otherwise do not expose an - easy success signal. A successful attempt may result in changes to page - state or browser cookies. + Notes: + This tool does not guarantee that the CAPTCHA gets solved. + A successful attempt may result in changes to page state and cookies. - Tool workflow: - 1. Inspect the webpage with get_content when you need to - determine whether CAPTCHA-related controls are present. - 2. Call 'solve_captcha' to attempt the CAPTCHA interaction. - 3. Use 'get_page_info', 'get_content', 'check_if_condition', or - 'manage_cookies' to inspect the resulting page/session state - to determine whether the interaction appears to have succeeded. + Tool Selection: + - Use `solve_captcha` specifically for automated CAPTCHA widget + interactions. + - Use `click_element` for standard visible elements. + - Use `hover_action` (action="hover_and_click") to reveal and + click targets. Returns: - A message indicating that the CAPTCHA interaction was attempted. - - Tool selection: - - Need to interact with one of the supported CAPTCHAs -> - use solve_captcha. - - Need to hover an element in order to click another -> - use hover_action with action="hover_and_click". - - Need to click a specific visible element -> use click_element. + A confirmation message indicating that the attempt was initiated. """ sb = _get_sb() sb.solve_captcha() From d10f01b50168d62aea34bdc756ae249f75fdf642 Mon Sep 17 00:00:00 2001 From: Michael Mintz Date: Thu, 17 Sep 2026 15:58:34 -0400 Subject: [PATCH 2/4] Update MCP versioning --- mcp_servers/pyproject.toml | 2 +- server.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mcp_servers/pyproject.toml b/mcp_servers/pyproject.toml index 8b994dda3a2..fbeb3d83140 100644 --- a/mcp_servers/pyproject.toml +++ b/mcp_servers/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "seleniumbase-mcp" -version = "1.3.8dev0" +version = "1.3.9dev0" description = "MCP server exposing SeleniumBase CDP Mode as tools for MCP clients." readme = "README.md" requires-python = ">=3.10" diff --git a/server.json b/server.json index d48c3574ff4..ea1f1c60954 100644 --- a/server.json +++ b/server.json @@ -3,7 +3,7 @@ "name": "io.github.seleniumbase/seleniumbase", "title": "SeleniumBase MCP", "description": "Stealthy browser automation, testing, and web-scraping via CDP Mode.", - "version": "4.54.8", + "version": "4.54.9", "repository": { "url": "https://github.com/seleniumbase/SeleniumBase", "source": "github" @@ -13,7 +13,7 @@ { "registryType": "pypi", "identifier": "seleniumbase", - "version": "4.54.8", + "version": "4.54.9", "transport": { "type": "stdio" }, From bc88accb2909629f7b0af68be73bebf014c17373 Mon Sep 17 00:00:00 2001 From: Michael Mintz Date: Thu, 17 Sep 2026 15:59:05 -0400 Subject: [PATCH 3/4] Refresh Python dependencies --- requirements.txt | 6 +++--- setup.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/requirements.txt b/requirements.txt index 0feb78f0fd6..f84dce1a07f 100755 --- a/requirements.txt +++ b/requirements.txt @@ -7,7 +7,7 @@ certifi>=2026.7.22 exceptiongroup>=1.3.1 websockets~=16.1.1;python_version=="3.10" websockets>=16.1.1;python_version>="3.11" -filelock>=3.32.7 +filelock>=4.0.0 fasteners>=0.20 mycdp>=1.4.0 pynose>=1.5.5 @@ -26,7 +26,7 @@ pygments>=2.20.1 pyreadline3>=3.5.4;platform_system=="Windows" tabcompleter>=1.4.1 pdbp>=1.8.3 -idna>=3.19 +idna>=3.20 charset-normalizer>=3.5.1,<4 urllib3>=2.8.0,<3 requests~=2.34.2 @@ -49,7 +49,7 @@ pytest-html==4.0.2 pytest-metadata==3.1.1 pytest-ordering==0.6 pytest-rerunfailures==16.3;python_version=="3.10" -pytest-rerunfailures==16.6.1;python_version>="3.11" +pytest-rerunfailures==16.7;python_version>="3.11" pytest-xdist==3.8.0 parameterized==0.9.0 behave==1.2.6 diff --git a/setup.py b/setup.py index 4fcb5e4eb97..3ca053e04c1 100755 --- a/setup.py +++ b/setup.py @@ -173,7 +173,7 @@ 'exceptiongroup>=1.3.1', 'websockets~=16.1.1;python_version=="3.10"', 'websockets>=16.1.1;python_version>="3.11"', - 'filelock>=3.32.7', + 'filelock>=4.0.0', 'fasteners>=0.20', 'mycdp>=1.4.0', 'pynose>=1.5.5', @@ -192,7 +192,7 @@ 'pyreadline3>=3.5.4;platform_system=="Windows"', 'tabcompleter>=1.4.1', 'pdbp>=1.8.3', - 'idna>=3.19', + 'idna>=3.20', 'charset-normalizer>=3.5.1,<4', 'urllib3>=2.8.0,<3', 'requests~=2.34.2', @@ -215,7 +215,7 @@ 'pytest-metadata==3.1.1', 'pytest-ordering==0.6', 'pytest-rerunfailures==16.3;python_version=="3.10"', - 'pytest-rerunfailures==16.6.1;python_version>="3.11"', + 'pytest-rerunfailures==16.7;python_version>="3.11"', 'pytest-xdist==3.8.0', 'parameterized==0.9.0', 'behave==1.2.6', # Newer ones had issues From 918078082a49b2a57f3a33fc9a4149973f780e64 Mon Sep 17 00:00:00 2001 From: Michael Mintz Date: Thu, 17 Sep 2026 15:59:20 -0400 Subject: [PATCH 4/4] Version 4.54.9 --- seleniumbase/__version__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seleniumbase/__version__.py b/seleniumbase/__version__.py index 3bc0a2024eb..b4b6026e876 100755 --- a/seleniumbase/__version__.py +++ b/seleniumbase/__version__.py @@ -1,2 +1,2 @@ # seleniumbase package -__version__ = "4.54.8" +__version__ = "4.54.9"