Skip to content

feat: add MCP executable path support#360

Merged
D4Vinci merged 2 commits into
D4Vinci:devfrom
samrusani:fix/mcp-executable-path
Jul 4, 2026
Merged

feat: add MCP executable path support#360
D4Vinci merged 2 commits into
D4Vinci:devfrom
samrusani:fix/mcp-executable-path

Conversation

@samrusani

Copy link
Copy Markdown

Proposed change

Adds custom Chromium executable support to the MCP browser tools. ScraplingMCPServer now accepts a global executable_path, falls back to SCRAPLING_EXECUTABLE_PATH, and lets browser tool calls override it per request or session. The value is wired through to AsyncDynamicSession and AsyncStealthySession, and the scrapling mcp command exposes --executable-path so MCP users can configure it once.

The MCP docs and API reference now show the server-wide configuration path.

Type of change:

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests
  • Add or change doctests? -- Note: Please avoid changing both code and tests in a single pull request.
  • Documentation change?

Additional information

  • This PR fixes or closes an issue: fixes Allow specifying a custom Chromium browser #347
  • This follows the issue thread's MCP-only plumbing direction; DynamicFetcher/StealthyFetcher and their session classes already support executable_path.
  • Tests run:
    • ./.venv313/bin/python -m pytest tests/ai/test_ai_mcp.py::TestExecutablePath tests/cli/test_cli.py -q
    • ./.venv313/bin/python -m ruff check scrapling/
    • ./.venv313/bin/python -m ruff format --check scrapling/ --diff
    • ./.venv313/bin/python -m mypy scrapling/
    • ./.venv313/bin/python -m pyright --pythonpath ./.venv313/bin/python scrapling/
    • git diff --check

Checklist:

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized.
  • I know that pull requests will not be merged if they fail the automated tests.
  • All new Python files are placed inside an existing directory.
  • All filenames are in all lowercase characters with no spaces or dashes.
  • All functions and variable names follow Python naming conventions.
  • All function parameters and return values are annotated with Python type hints.
  • All functions have doc-strings.

@yetval

yetval commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Hey @samrusani, Nice work on this. I read it through against #347, and it does what was asked, with a clean setup! The executable path flows through the browser tools the right way, the global default, and per-call override both work. Two tiny things: if you ever want to polish, an empty path string is treated as unset, and a per-call path is ignored when a session id is reused, though neither blocks merging. Thanks for putting this together, this is quite helpful!!

@D4Vinci D4Vinci linked an issue Jul 4, 2026 that may be closed by this pull request
1 task
@D4Vinci

D4Vinci commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Thanks @samrusani for solving this one, and thanks @yetval for your review.

@D4Vinci D4Vinci merged commit 6f04243 into D4Vinci:dev Jul 4, 2026
5 checks passed
@D4Vinci D4Vinci mentioned this pull request Jul 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow specifying a custom Chromium browser

3 participants