diff --git a/mcp_servers/pyproject.toml b/mcp_servers/pyproject.toml index 7ba03939c94..559be6156c9 100644 --- a/mcp_servers/pyproject.toml +++ b/mcp_servers/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "seleniumbase-mcp" -version = "1.3.6dev0" +version = "1.3.7dev0" description = "MCP server exposing SeleniumBase CDP Mode as tools for MCP clients." readme = "README.md" requires-python = ">=3.10" diff --git a/mcp_servers/server.py b/mcp_servers/server.py index ce5558adf79..44c142b46cf 100644 --- a/mcp_servers/server.py +++ b/mcp_servers/server.py @@ -588,10 +588,7 @@ def get_content( output_format: Literal["text", "html", "urls"] = "text", timeout: float = 5, ) -> str | list[str]: - """Read visible text, HTML, or discovered URLs from the selected element. - - Use this tool when you need to get actual page content or URL information - rather than page metadata. + """Get visible text, HTML, or discovered URLs from the selected element. Args: selector: CSS selector or SeleniumBase-supported XPath selector. @@ -670,9 +667,6 @@ def get_attributes( - Need to check element presence/visibility -> use 'check_if_condition'. - This is a read-only operation: It finds elements to get the requested data, - but it does not make any modifications to those elements. - If there's no matching element found within the timeout, then @handle_sb_errors returns details from the exception raised. """ @@ -1625,10 +1619,18 @@ def scroll_page( # Windows & tabs # --------------------------------------------------------------------------- -@mcp.tool(title="Manage Window") -# Annotations intentionally omitted: 'get_rect' is a pure read while -# 'set_rect'/'maximize'/'minimize' modify window state -- no single -# read_only_hint value would be accurate for the whole tool. +@mcp.tool( + title="Manage Window", + annotations=ToolAnnotations( + destructive_hint=False, + idempotent_hint=True, + open_world_hint=False, + ), +) +# The 'read_only_hint' annotation has been intentionally omitted: +# 'get_rect' is a pure read while +# 'set_rect'/'maximize'/'minimize' modify window state. +# There's no single 'read_only_hint' value that's accurate for the whole tool. @handle_sb_errors def manage_window( action: Literal[ @@ -1808,10 +1810,8 @@ def solve_captcha() -> str: """Attempt a SeleniumBase CDP-based CAPTCHA interaction, such as clicking a CAPTCHA checkbox, or performing a drag/drop action on a slider CAPTCHA. - This tool attempts to interact with CAPTCHA controls such as Cloudflare - Turnstile, reCAPTCHA, hCaptcha, DataDome Slider, or FriendlyCaptcha via - the Chrome DevTools Protocol (CDP), which is usually stealthier than - JavaScript because CDP actions can avoid triggering `isTrusted: false`. + Supported CAPTCHAs include: Cloudflare Turnstile, reCAPTCHA, hCaptcha, + DataDome Slider, and FriendlyCaptcha. This tool automatically detects the coordinates of CAPTCHA checkboxes for determining the correct location to perform the click. If no CAPTCHA @@ -1830,8 +1830,13 @@ def solve_captcha() -> str: or 'manage_cookies' to inspect resulting page/session state. Returns: - A message confirming that the CAPTCHA interaction was attempted. + A confirmation message of the CAPTCHA interaction. The message is the same for both successful and failed attempts. + + Notes: + Clicking with the Chrome DevTools Protocol (CDP) is generally + stealthier than clicking with JavaScript because CDP actions + can avoid triggering `isTrusted: false`. """ sb = _get_sb() sb.solve_captcha() diff --git a/requirements.txt b/requirements.txt index e1c7bd2a8bc..685c8f3020a 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.6 +filelock>=3.32.7 fasteners>=0.20 mycdp>=1.4.0 pynose>=1.5.5 @@ -28,7 +28,7 @@ tabcompleter>=1.4.1 pdbp>=1.8.2 idna>=3.19 charset-normalizer>=3.5.1,<4 -urllib3>=2.7.0,<3 +urllib3>=2.8.0,<3 requests~=2.34.2 sniffio==1.3.1 h11==0.16.0 diff --git a/seleniumbase/__version__.py b/seleniumbase/__version__.py index 92d0477e38d..64d1fbb3eed 100755 --- a/seleniumbase/__version__.py +++ b/seleniumbase/__version__.py @@ -1,2 +1,2 @@ # seleniumbase package -__version__ = "4.54.6" +__version__ = "4.54.7" diff --git a/server.json b/server.json index 763cbc48c82..8f57bcc3173 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.6", + "version": "4.54.7", "repository": { "url": "https://github.com/seleniumbase/SeleniumBase", "source": "github" @@ -13,7 +13,7 @@ { "registryType": "pypi", "identifier": "seleniumbase", - "version": "4.54.6", + "version": "4.54.7", "transport": { "type": "stdio" }, diff --git a/setup.py b/setup.py index f89c306f298..600d3a9339f 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.6', + 'filelock>=3.32.7', 'fasteners>=0.20', 'mycdp>=1.4.0', 'pynose>=1.5.5', @@ -194,7 +194,7 @@ 'pdbp>=1.8.2', 'idna>=3.19', 'charset-normalizer>=3.5.1,<4', - 'urllib3>=2.7.0,<3', + 'urllib3>=2.8.0,<3', 'requests~=2.34.2', 'sniffio==1.3.1', 'h11==0.16.0', @@ -290,8 +290,8 @@ # pip install -e .[playwright] # (For the Playwright integration.) "playwright": [ - 'playwright>=1.62.0', - 'greenlet>=3.5.5', + 'playwright>=1.63.0', + 'greenlet>=3.5.6', 'pyee>=13.0.1', ], # pip install -e .[pyautogui] @@ -303,7 +303,7 @@ # Required for local MCP server debugging with: # mcp dev server.py "uv": [ - "uv>=0.12.14" + "uv>=0.12.15" ], }, packages=[