chrome-devtools-mcp page navigation accepts initScript
Introduced 2026-01-29 · score 0.97
HOW TO USE IT
When navigating to a new document, set `initScript` on `navigate_page` to run JavaScript before the page’s other scripts.
navigate_page({"pageId": <pageId>, "type": "url", "url": "<url>", "initScript": "<JavaScript>"})WHY THIS HELPS
Run setup code on each new document before the page's own scripts during a navigation.
REQUIREMENTS AND LIMITATIONS
- Version: 0.15.0
- pageId (required): ID of the target page.
- initScript: JavaScript executed on each new document before other scripts for the next navigation.
- type: Navigation action; use `url` to navigate by URL.
- url: Target URL; required when `type` is `url`.
- Prerequisite: Use version 0.15.0 or later for this feature.
- Prerequisite: JavaScript evaluation must be enabled; the `--javascriptEvaluation` option defaults to true, and setting it to false disables `initScript`.
- Runs on each new document before any other scripts for the next navigation.
FIRST-PARTY EVIDENCE
- https://github.com/ChromeDevTools/chrome-devtools-mcp/releases/tag/chrome-devtools-mcp-v0.15.0
- https://github.com/ChromeDevTools/chrome-devtools-mcp/pull/568
- https://github.com/ChromeDevTools/chrome-devtools-mcp/blob/chrome-devtools-mcp-v0.15.0/docs/tool-reference.md
- https://github.com/ChromeDevTools/chrome-devtools-mcp/blob/main/docs/configuration.md
Check the installed version and the source before using it. Entry JSON