Skip to content

Feature Request: Support Allowed Origins & Blocked Origins list options #239

Description

@sakupi01

Is your feature request related to a problem? Please describe.

When adopting browser automation MCPs in a corporate environment, considering security is especially crucial. Any possibility of automatic/unintentional access to unknown/malicious content can be a reason for preventing adoption.
Playwright MCP, for example, has --allowed-origins & --blocked-origins to filter in/out which contents the MCP is allowed to access. This gives us more certainty on which content the tool will access, and this can bring a good reason to use the browser automation tool corporate-wide.
For example, we can restrict access except to localhost.

Describe the solution you'd like
Like Playwright MCP, providing CLI options to filter origins the MCP server can access (e.g. localhost only) prevents unintended navigation to unauthorized or potentially malicious sites while maintaining safe internal tool usage.

Playwright uses context.route(), which internally relies on the same CDP methods in the identical way as Pupeteer page.setRequestInterception() does.

Additional context

Activity

  1. DavidPoliakoff commented on Oct 8, 2025

    @DavidPoliakoff

    Adding to the "thumbs up:" an answer to this is IMO the remaining blocker for taking this up at the firm I work for, as well.

    The DevTools MCP is such a huge win, the amount of copy-pasting from the DevTools console that I'm doing is obviously wrong, this MCP really feels like the answer once we can have it in a secure way

  2. CW-EijiOsakabe commented on Dec 5, 2025

    @CW-EijiOsakabe

    @OrKoN
    Hello, can I ask you about the status of this feature?
    I see you have left a comment here saying you will consider to add the support with other implementation approach.
    #232 (comment)

    Our team would love to see this feature implemented for better security 🙇

  3. classiemilio commented on Feb 6, 2026

    @classiemilio

    +1 to this request. This is what would unblock our company from being able to adopt this MCP server, which would be a huge lift to our workflows!

  4. Oleg-Sulzhenko commented on Feb 9, 2026

    @Oleg-Sulzhenko

    +1 my company postpone adopting this MCP because of security concerns, adding the possibility to whitelist urls will address this concern.

  5. 501NotImplemented commented on Feb 13, 2026

    @501NotImplemented

    +1, the only reason that stops us from adopting the MCP is the security reasons.

  6. edgeq commented on Feb 17, 2026

    @edgeq

    +1 here too for all the above reasons. My current approach is to try and leverage a hooks-based approach on some of the tools the MCP provides... but that might get pretty unmaintainable pretty quickly..

  7. OrKoN commented on Feb 26, 2026

    @OrKoN
    Collaborator

    we should use https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-setBlockedURLs to express allowed and blocked URLs using URL patterns (to support origins and other patterns). We should implement it in Puppeteer and use it in the MCP server. cc @nattallius

  8. nattallius commented on Apr 28, 2026

    @nattallius
    Contributor

    Hi, we have implemented the puppeteer part of this feature. Relevant pull requests:
    puppeteer/puppeteer#14873
    puppeteer/puppeteer#14897

  9. mathiasbynens commented on May 26, 2026

    @mathiasbynens
    Member

    @nattallius Please post an update. What’s the status of this?

  10. nattallius commented on May 26, 2026

    @nattallius
    Contributor

    @mathiasbynens will be ready this - next week, it's mostly done, just running some checks

  11. nattallius commented on Jun 16, 2026

    @nattallius
    Contributor

    This feature has been officially implemented and merged. You can now restrict network access within your browser sessions using URL patterns via the newly added CLI options. Specifically, you can use the ---blocked-url-pattern flag to block traffic, and the --allowed-url-pattern flag to allow specific endpoints. Detailed descriptions of the configuration options can be found in the Configuration Documentation

    Here is an example of how to block endpoints using dedicated flag:

    {
      "mcpServers": {
        "chrome-devtools": {
          "command": "npx",
          "args": [
            "chrome-devtools-mcp@latest",
            "--blocked-url-pattern",
            "*://example.com/*",
            "*://*.another-blocked-example.com/*"
          ]
        }
      }
    }
    

    Important Limitations & Side Effects

    • Network Emulation/Throttling Conflict: Network throttling is disabled when a network blocklist/allowlist is configured, to avoid conflicting with Puppeteer's underlying blocking mechanisms.
      • Using the emulate tool to modify networkConditions (e.g. setting to Offline) will throw an error: Network throttling is not supported when network blocking (allowlist/blocklist) is configured.
      • Other emulation settings (e.g., cpuThrottlingRate, geolocation, viewport) are unaffected and remain fully functional.
    • Service Worker Request Bypass: Service worker-initiated fetches bypass these restrictions and are not blocked.

    We are actively collecting feedback on this implementation, so please feel free to open a new issue if you encounter any bugs or have further suggestions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions