Skip to content

feat: support configurable filesystem roots - #2605

Open
joebasrawi wants to merge 2 commits into
ChromeDevTools:mainfrom
joebasrawi:feat/configurable-filesystem-roots
Open

feat: support configurable filesystem roots#2605
joebasrawi wants to merge 2 commits into
ChromeDevTools:mainfrom
joebasrawi:feat/configurable-filesystem-roots

Conversation

@joebasrawi

Copy link
Copy Markdown

Fixes #2598

This lets people set filesystem roots through the MCP server or the Chrome DevTools CLI. Multiple roots work together with any roots sent by the MCP client, and temp directory access stays the same.

I added tests for the flags and root handling.

@google-cla

google-cla Bot commented Aug 21, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@joebasrawi
joebasrawi marked this pull request as ready for review August 21, 2026 22:11
@OrKoN
OrKoN self-requested a review August 22, 2026 06:51
Comment thread src/config/mcp-options.ts
alias: 'workspace',
describe:
'A directory that filesystem tools are allowed to access. May be specified more than once. ' +
'The OS temp directory is always allowed.',

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's set the defaults to os temp dir here, by using yargs default value option

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated. filesystemRoot now uses os.tmpdir() as its yargs default. I also added a stable default description so generated docs show OS temp directory instead of a machine-specific path.

Comment thread src/index.ts
Comment thread src/config/mcp-options.ts
'no roots are configured. Use this only when connecting a trusted local client that does not implement ' +
'MCP roots and requires access to paths outside the temp directory.',
},
filesystemRoot: {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should probably make it conflict with allowUnrestrictedPaths. I think allowUnrestrictedPaths could be deprecated in favor of specifying --workspace=/.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the conflict and deprecated --allow-unrestricted-paths in favor of --workspace=/. The old flag still works by itself for compatibility, but it is rejected when an explicit filesystem root is also supplied.

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.

Add a CLI flag to configure MCP roots

2 participants