feat: CLI binary + auto-start Chrome on connect + packaging fixes #8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
feat: CLI binary + auto-start Chrome on connect + packaging fixes
Summary
chrome-devtools-mcp
so the MCP server can be installed and run viauv tool install .
orpipx install .
and referenced by Codex CLI (or other MCP clients) as a single command.--remote-debugging-port
) whenconnect_to_browser()
is called and Chrome isn’t already running.src.tools
) are included when installed as a tool.Changes
[project.scripts]
entrychrome-devtools-mcp = "src.main:main"
.mcp[cli]
to ensure Typer-based CLI is available for the MCP tooling.[tool.setuptools.packages.find] include = ["src*"]
.connect_to_browser(port=..., auto_start=True, headless=False, chrome_path=None, url=None)
; auto-starts Chrome if missing; ensures CDP client uses the requested port before connecting.Behavior notes
connect_to_browser()
now attempts to start Chrome if it isn’t already running on the requested port. To retain prior behavior, callconnect_to_browser(auto_start=False)
.headless=True
,chrome_path=...
, andurl=...
to control auto-start behavior.Install and test
uv tool install --force .
(or bump version and useuv tool install .
)pipx install .
which chrome-devtools-mcp
chrome-devtools-mcp
logs “Registering MCP tools…” and waits for client.Codex CLI config example (TOML)
Checklist
src.tools
, etc.)--version/--help
fast-path for smoke tests