Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mcp_servers/pyproject.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
37 changes: 21 additions & 16 deletions mcp_servers/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
"""
Expand Down Expand Up @@ -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[
Expand Down Expand Up @@ -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
Expand All @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion seleniumbase/__version__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# seleniumbase package
__version__ = "4.54.6"
__version__ = "4.54.7"
4 changes: 2 additions & 2 deletions server.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -13,7 +13,7 @@
{
"registryType": "pypi",
"identifier": "seleniumbase",
"version": "4.54.6",
"version": "4.54.7",
"transport": {
"type": "stdio"
},
Expand Down
10 changes: 5 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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',
Expand Down Expand Up @@ -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]
Expand All @@ -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=[
Expand Down