Expose a conservative browser-cli tool surface to MCP hosts without duplicating browser-control logic: every tool is a thin adapter over the existing Python SDK, and each call builds a fresh BrowserCLI so the real browser stays the only owner of tab and navigation state. The MCP process resolves BROWSER_CLI_PROFILE, BROWSER_CLI_REMOTE, and BROWSER_CLI_KEY explicitly instead of passing None down, so a pinned server targets one browser rather than fanning listing calls out across every connected browser. Explicit tool arguments still win. Tool names keep a browser_ prefix for hosts that expose raw MCP names, while BROWSER_CLI_MCP_TOOL_PREFIX lets hosts that already namespace by server drop it and avoid names like browser_cli_testing_browser_tabs_list. JavaScript evaluation, raw commands, storage writes, and session import stay unexposed, and Streamable HTTP refuses non-loopback binds because the endpoint has no authentication of its own; remote browsers go through browser-cli's authenticated remote transport instead. MCP stays an optional extra, so normal installs are unaffected.
50 lines
1.1 KiB
TOML
50 lines
1.1 KiB
TOML
[project]
|
|
name = "real-browser-cli"
|
|
version = "0.16.6"
|
|
description = "Control your real running browser from the terminal or Python SDK"
|
|
readme = "README.md"
|
|
license = { file = "LICENSE" }
|
|
authors = [{ name = "Daniel Dolezal" }]
|
|
requires-python = ">=3.10"
|
|
dependencies = [
|
|
"click>=8",
|
|
"cryptography>=48",
|
|
"rich>=13",
|
|
"msgpack>=1",
|
|
"questionary>=2",
|
|
]
|
|
|
|
[project.urls]
|
|
Homepage = "https://git.yiprawr.dev/Automatisation/browser-cli"
|
|
Repository = "https://git.yiprawr.dev/Automatisation/browser-cli"
|
|
Issues = "https://git.yiprawr.dev/Automatisation/browser-cli/issues"
|
|
|
|
[project.optional-dependencies]
|
|
# Better/faster remote response compression than the stdlib zlib/gzip fallback.
|
|
fast = ["zstandard>=0.22"]
|
|
mcp = [
|
|
"mcp>=2,<3",
|
|
]
|
|
|
|
[project.scripts]
|
|
browser-cli = "browser_cli.cli:main"
|
|
browser-cli-mcp = "browser_cli.mcp.server:main"
|
|
|
|
[dependency-groups]
|
|
dev = [
|
|
"pytest>=8",
|
|
"pytest-cov>=7.1.0",
|
|
"zstandard>=0.22",
|
|
]
|
|
|
|
[build-system]
|
|
requires = ["hatchling"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
packages = ["browser_cli"]
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests"]
|
|
log_level = "INFO"
|