Repository navigation
Description
Is your feature request related to a problem? Please describe.
Currently there is no automated way through the Chrome DevTools MCP server to intercept and modify network requests. Developers can manually override or redirect resources using the Chrome DevTools UI (e.g., Local Overrides or Response Overrides), but these actions must be done interactively and cannot be scripted or integrated into automated measurement workflows. This becomes a blocker when trying to test development versions of scripts against real production pages.
This become a blocker also to automate experiments in CI or lab environments by using built scripts before doing a production release.
In this issue I'm referring to script but it could be useful also for others resources as is done in the Chrome DevTools UI.
Example real-world impact: if a production page loads a script at https://bar.foo.com/scriptWeAlreadyHaveInWebsite.js, there is no way via MCP today to replace that with a development version and collect metrics without doing it manually in the browser.
Describe the solution you'd like
Add support in the Chrome DevTools MCP server for programmatic network request interception and modification, including:
- Redirect requests to a different URL
- Override responses with custom content (remote or local file)
Specifically, the ability to:
- Match a network request (by URL or pattern)
- Redirect it to a different URL (e.g., dev/newVersion.js)
- Optionally serve a custom or local file as the response
This would expose the same functionality found in the DevTools UI (“Override content” / “Local Overrides”) through MCP, enabling automation and tooling scenarios.
Describe alternatives you've considered
The only alternative currently available is to manually use Chrome DevTools UI (https://developer.chrome.com/docs/devtools/overrides) or by developing a custom Chrome Extension.
Additional context
No response
Activity
corradopetrelli commentedon Mar 10, 2026
This would help a lot in my case as well. It would unblock an automation workflow I'm building around MCP for testing.
Right now I need to run experiments against real production pages while temporarily replacing a production script with a development version. Since this can only be done manually via DevTools (Local Overrides), it's hard to integrate it into automated tests.
Being able to intercept and redirect the request programmatically through MCP would make this much easier! 😄
std4453 commentedon Mar 24, 2026
This sounds great, our app currently rely on redirecting some JS files on production page to local dev server to reuse production environment credentials, account, etc. An automated request redirection could really help us with our workflow.
corradopetrelli commentedon Aug 27, 2026
Has this functionality already been considered? I am asking because I would personally find it very useful and it would be particularly valuable for my needs 🥲
anacromaniac commentedon Aug 28, 2026
I'm using the feature proposed in the PR, and I'm finding it really useful as I can also have the agent measure and compare the performance metrics by replacing versions of some libraries and see which ones cause slowdowns or if the site where I'm working gets benefits. It could be included this year, that would be great!
armandoxheka commentedon Aug 31, 2026
Thanks for proposing this feature. Network request overrides would be very useful in Chrome DevTools MCP, especially for testing local builds directly on existing pages without modifying the deployed application.
It would make debugging, comparing implementations and testing alternative resources much easier to automate. It would be great to have this capability directly in the official MCP server.
natorion commentedon Oct 14, 2026
Thanks, everyone, for the use cases. We'll consider adding network request overrides (redirecting or replacing responses), similar to Local Overrides in DevTools.
EndeavorYen commentedon Oct 26, 2026
Adding a use case and some lessons from implementing this, since you mentioned you're still collecting feedback.
Use case: forcing error and empty states. Besides redirecting a script to a dev build, we use interception to let an agent check how a page handles a failing or empty API: for example, fulfill
*/api/*with a 503 and{"ok":false}, or a list endpoint with[], then inspect the UI. That is "fulfill with a status and an inline body", with no local file. It would help if the design covered this next to redirect and local-file overrides.Lessons from building this on the CDP
Fetchdomain in our own CDP tool:Fetchpatterns are compared with the whole URL, so/api/items*does not matchhttps://example.com/api/items?x=1, and the override just shows 0 hits while the page keeps the real data. We now warn when a pattern cannot match a real URL.Fetch.requestPausednever fired for them, and the page ran the originalapp.js.fetch()requests and a new tab (disk cache only) were intercepted normally.Network.setCacheDisabled({cacheDisabled: true})made every request go through interception. Since replacing a script is the main use case here, this seems worth handling in the tool rather than leaving it to the agent.The add/list/remove shape in #2371 fits these points well. I'm happy to help with review or tests, or to send a PR scoped however you prefer once the design is settled.
feat: add page-scoped network mocks (ChromeDevTools#3384)
feat: support upstream network mock responses (ChromeDevTools#3420)
feat: add abort and allow-origin network mocks (ChromeDevTools#3421)