feat(mcp): add --allowed-tools and --blocked-tools options - #42931
Open
Yury Semikhatsky (yury-s) wants to merge 4 commits into
Open
Yury Semikhatsky (yury-s) wants to merge 4 commits into
Yury Semikhatsky (yury-s) wants to merge 4 commits into
Conversation
Move browser_run_code_unsafe and WebMCP tools into core-run-code and core-webmcp capabilities that stay enabled by default but can be turned off via --disable-caps, PLAYWRIGHT_MCP_DISABLE_CAPS or the disabledCapabilities config field. Fixes: microsoft/playwright-mcp#1770
This comment has been minimized.
This comment has been minimized.
Revert the core capability split and instead filter tools by exact name. Both lists also apply to the tools registered by the page through WebMCP.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
--allowed-tools now enables tools on top of the enabled capabilities. WebMCP tools are controlled by the webmcp option only.
This comment has been minimized.
This comment has been minimized.
Contributor
|
Hi, I'm the Playwright bot and I took a first look at the CI failures. 🟢 The failures look like pre-existing flakes, not caused by this PRAll three failing tests have also failed on other PRs recently, and none of them use the new DetailsThis PR adds tool allow/block lists in Pre-existing flake / infra
Triaged by the Playwright bot - agent run |
Yury Semikhatsky (yury-s)
requested a review
from Pavel Feldman (pavelfeldman)
September 25, 2026 20:09
Contributor
Test results for "MCP"8809 passed, 1500 skipped Merge workflow run. |
Pavel Feldman (pavelfeldman)
approved these changes
Sep 28, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
--allowed-tools/--blocked-tools(PLAYWRIGHT_MCP_ALLOWED_TOOLS/PLAYWRIGHT_MCP_BLOCKED_TOOLS,allowedTools/blockedToolsin config) to adjust the MCP tool set by exact name.--allowed-toolsenables tools on top of the enabled capabilities (e.g.browser_pdf_savewithout--caps=pdf);--blocked-toolsremoves tools (e.g.browser_run_code_unsafe) and takes precedence.tools/listand rejected ontools/call; unknown tool names fail at startup.Fixes microsoft/playwright-mcp#1770