Skip to content

Commit 5de2d46

Browse files
authored
Merge pull request #4505 from seleniumbase/mcp-server-patch-16
MCP Server: Patch 16
2 parents a3b34a7 + 8b762c5 commit 5de2d46

6 files changed

Lines changed: 32 additions & 27 deletions

File tree

‎mcp_servers/pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "seleniumbase-mcp"
3-
version = "1.3.6dev0"
3+
version = "1.3.7dev0"
44
description = "MCP server exposing SeleniumBase CDP Mode as tools for MCP clients."
55
readme = "README.md"
66
requires-python = ">=3.10"

‎mcp_servers/server.py‎

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -588,10 +588,7 @@ def get_content(
588588
output_format: Literal["text", "html", "urls"] = "text",
589589
timeout: float = 5,
590590
) -> str | list[str]:
591-
"""Read visible text, HTML, or discovered URLs from the selected element.
592-
593-
Use this tool when you need to get actual page content or URL information
594-
rather than page metadata.
591+
"""Get visible text, HTML, or discovered URLs from the selected element.
595592
596593
Args:
597594
selector: CSS selector or SeleniumBase-supported XPath selector.
@@ -670,9 +667,6 @@ def get_attributes(
670667
- Need to check element presence/visibility ->
671668
use 'check_if_condition'.
672669
673-
This is a read-only operation: It finds elements to get the requested data,
674-
but it does not make any modifications to those elements.
675-
676670
If there's no matching element found within the timeout,
677671
then @handle_sb_errors returns details from the exception raised.
678672
"""
@@ -1625,10 +1619,18 @@ def scroll_page(
16251619
# Windows & tabs
16261620
# ---------------------------------------------------------------------------
16271621

1628-
@mcp.tool(title="Manage Window")
1629-
# Annotations intentionally omitted: 'get_rect' is a pure read while
1630-
# 'set_rect'/'maximize'/'minimize' modify window state -- no single
1631-
# read_only_hint value would be accurate for the whole tool.
1622+
@mcp.tool(
1623+
title="Manage Window",
1624+
annotations=ToolAnnotations(
1625+
destructive_hint=False,
1626+
idempotent_hint=True,
1627+
open_world_hint=False,
1628+
),
1629+
)
1630+
# The 'read_only_hint' annotation has been intentionally omitted:
1631+
# 'get_rect' is a pure read while
1632+
# 'set_rect'/'maximize'/'minimize' modify window state.
1633+
# There's no single 'read_only_hint' value that's accurate for the whole tool.
16321634
@handle_sb_errors
16331635
def manage_window(
16341636
action: Literal[
@@ -1808,10 +1810,8 @@ def solve_captcha() -> str:
18081810
"""Attempt a SeleniumBase CDP-based CAPTCHA interaction, such as clicking
18091811
a CAPTCHA checkbox, or performing a drag/drop action on a slider CAPTCHA.
18101812
1811-
This tool attempts to interact with CAPTCHA controls such as Cloudflare
1812-
Turnstile, reCAPTCHA, hCaptcha, DataDome Slider, or FriendlyCaptcha via
1813-
the Chrome DevTools Protocol (CDP), which is usually stealthier than
1814-
JavaScript because CDP actions can avoid triggering `isTrusted: false`.
1813+
Supported CAPTCHAs include: Cloudflare Turnstile, reCAPTCHA, hCaptcha,
1814+
DataDome Slider, and FriendlyCaptcha.
18151815
18161816
This tool automatically detects the coordinates of CAPTCHA checkboxes
18171817
for determining the correct location to perform the click. If no CAPTCHA
@@ -1830,8 +1830,13 @@ def solve_captcha() -> str:
18301830
or 'manage_cookies' to inspect resulting page/session state.
18311831
18321832
Returns:
1833-
A message confirming that the CAPTCHA interaction was attempted.
1833+
A confirmation message of the CAPTCHA interaction.
18341834
The message is the same for both successful and failed attempts.
1835+
1836+
Notes:
1837+
Clicking with the Chrome DevTools Protocol (CDP) is generally
1838+
stealthier than clicking with JavaScript because CDP actions
1839+
can avoid triggering `isTrusted: false`.
18351840
"""
18361841
sb = _get_sb()
18371842
sb.solve_captcha()

‎requirements.txt‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ certifi>=2026.7.22
77
exceptiongroup>=1.3.1
88
websockets~=16.1.1;python_version=="3.10"
99
websockets>=16.1.1;python_version>="3.11"
10-
filelock>=3.32.6
10+
filelock>=3.32.7
1111
fasteners>=0.20
1212
mycdp>=1.4.0
1313
pynose>=1.5.5
@@ -28,7 +28,7 @@ tabcompleter>=1.4.1
2828
pdbp>=1.8.2
2929
idna>=3.19
3030
charset-normalizer>=3.5.1,<4
31-
urllib3>=2.7.0,<3
31+
urllib3>=2.8.0,<3
3232
requests~=2.34.2
3333
sniffio==1.3.1
3434
h11==0.16.0

‎seleniumbase/__version__.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# seleniumbase package
2-
__version__ = "4.54.6"
2+
__version__ = "4.54.7"

‎server.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"name": "io.github.seleniumbase/seleniumbase",
44
"title": "SeleniumBase MCP",
55
"description": "Stealthy browser automation, testing, and web-scraping via CDP Mode.",
6-
"version": "4.54.6",
6+
"version": "4.54.7",
77
"repository": {
88
"url": "https://github.com/seleniumbase/SeleniumBase",
99
"source": "github"
@@ -13,7 +13,7 @@
1313
{
1414
"registryType": "pypi",
1515
"identifier": "seleniumbase",
16-
"version": "4.54.6",
16+
"version": "4.54.7",
1717
"transport": {
1818
"type": "stdio"
1919
},

‎setup.py‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@
173173
'exceptiongroup>=1.3.1',
174174
'websockets~=16.1.1;python_version=="3.10"',
175175
'websockets>=16.1.1;python_version>="3.11"',
176-
'filelock>=3.32.6',
176+
'filelock>=3.32.7',
177177
'fasteners>=0.20',
178178
'mycdp>=1.4.0',
179179
'pynose>=1.5.5',
@@ -194,7 +194,7 @@
194194
'pdbp>=1.8.2',
195195
'idna>=3.19',
196196
'charset-normalizer>=3.5.1,<4',
197-
'urllib3>=2.7.0,<3',
197+
'urllib3>=2.8.0,<3',
198198
'requests~=2.34.2',
199199
'sniffio==1.3.1',
200200
'h11==0.16.0',
@@ -290,8 +290,8 @@
290290
# pip install -e .[playwright]
291291
# (For the Playwright integration.)
292292
"playwright": [
293-
'playwright>=1.62.0',
294-
'greenlet>=3.5.5',
293+
'playwright>=1.63.0',
294+
'greenlet>=3.5.6',
295295
'pyee>=13.0.1',
296296
],
297297
# pip install -e .[pyautogui]
@@ -303,7 +303,7 @@
303303
# Required for local MCP server debugging with:
304304
# mcp dev server.py
305305
"uv": [
306-
"uv>=0.12.14"
306+
"uv>=0.12.15"
307307
],
308308
},
309309
packages=[

0 commit comments

Comments
 (0)